A monitoring dashboard for agricultural plots (talhões) that consumes public weather data, computes stress alerts, and exports CSV — built as a portfolio capstone aligned with AgTech/AgriSAAS products (inspired by Solinftec, Syngenta, Climate Fieldview).
🇧🇷 Versão em português · 🇺🇸 English version
AgriWeather is a full-stack reference app that:
- Lets you register agricultural plots (talhão) with name, crop type, area (ha), and lat/long coordinates.
- Fetches the next 7 days of weather for each plot from the public, free, no-auth Open-Meteo API.
- Generates a water-stress alert when forecasted rainfall < 30% probability AND max temperature > 32°C — a simple agronomic heuristic documented in the code.
- Exports a CSV of the plot's forecast for further analysis (Excel, R, Pandas).
- Visualises everything in a Vue 3 SPA: dashboard with KPIs, a Leaflet map with plot pins, line charts of temperature/rainfall, and a "Create plot" form.
It is intentionally a small but production-shaped app: REST design, migrations, layered architecture, automated tests, containerised, CI on every push.
+-----------------------+ +-----------------------+ +----------------------+
| Vue 3 SPA | HTTP | Spring Boot 3 API | HTTP | Open-Meteo (public) |
| (Vite + Tailwind) | ------> | (Java 21, JPA, | ------> | No auth required |
| Leaflet map | JSON | Flyway, Springdoc) | JSON | |
+-----------------------+ +-----------+-----------+ +----------------------+
|
| JDBC
v
+-----------+-----------+
| Postgres 16 |
| (Timescale-ready) |
+-----------------------+
I am preparing for a Junior Web Developer role at an AgTech company (Solinftec's public stack on GitHub shows Vue + Kotlin/Java + YOLOv5 + MapLibre, so this project mirrors those choices at jr level). I wanted a complete, runnable, well-documented system that demonstrates:
- I can design a clean REST API with Spring Boot 3.
- I can build a usable, accessible Vue 3 UI.
- I understand that agriculture is a data-and-time-series domain at scale.
- I care about production hygiene: tests, migrations, containerisation, CI.
| Layer | Tech | Why |
|---|---|---|
| Backend | Java 21, Spring Boot 3.3, Spring Web, Spring Data JPA, Flyway, Springdoc OpenAPI, JUnit 5 | Modern LTS, industry standard for backend roles in Brazil |
| Database | PostgreSQL 16 | Open source, supports PostGIS (future) and TimescaleDB (future) for the time-series direction |
| Frontend | Vue 3 (Composition API) + Vite, Pinia, Vue Router, Tailwind CSS, Axios, Leaflet, Chart.js | Vue 3 is explicitly listed in the job description; Leaflet is a free alternative to Mapbox/MapLibre |
| Migrations | Flyway 10 | Versioned SQL migrations, no surprises when onboarding |
| Container | Docker + Docker Compose | One command to start the whole stack |
| CI | GitHub Actions | Build, test, lint on every push — green badge at the top |
Prerequisites: Docker Desktop, Node 20+ (only if you want to run the frontend outside Docker), Java 21 + Maven 3.9+ (only if you want to run the backend outside Docker).
# 1) Clone
git clone https://github.com/DRoqueProgrammer/agriweather.git
cd agriweather
# 2) Start everything (postgres, backend, frontend)
docker compose up --build
# 3) Open
# Frontend (dev): http://localhost:5173
# Backend API: http://localhost:8080
# OpenAPI docs: http://localhost:8080/swagger-ui.html
# Postgres: localhost:5432 (user/pass: agriweather/agriweather)To stop: docker compose down. To wipe the database: docker compose down -v.
cd backend
# start postgres any way you like, then:
export DATABASE_URL=jdbc:postgresql://localhost:5432/agriweather
export DATABASE_USERNAME=agriweather
export DATABASE_PASSWORD=agriweather
./mvnw spring-boot:runcd frontend
npm install
npm run dev
# opens http://localhost:5173, talks to the backend at http://localhost:8080| Method | Path | Description |
|---|---|---|
GET |
/api/plots |
List all plots |
POST |
/api/plots |
Create a plot |
GET |
/api/plots/{id} |
Get one plot |
PUT |
/api/plots/{id} |
Update a plot |
DELETE |
/api/plots/{id} |
Delete a plot |
GET |
/api/plots/{id}/forecast?days=7 |
Get 1–14 day forecast (calls Open-Meteo) |
GET |
/api/plots/{id}/alerts |
Get active water-stress alerts |
GET |
/api/plots/{id}/export.csv?days=7 |
Download forecast as CSV |
Full schema: http://localhost:8080/swagger-ui.html (Springdoc).
cd backend && ./mvnw test # 14 unit + slice tests
cd frontend && npm run test # Vitest unit tests- How to wire Flyway migrations with Spring Boot 3 and JPA, and the gotcha of
@Column↔ SQLNOT NULLdivergence. - How to call an external REST API with RestClient (Spring 6.1) and how to add a simple in-memory cache to be polite to the public API.
- How to draw a real Leaflet map with custom markers, popups, and a "fit bounds" to multiple plots.
- How to set up GitHub Actions with services (Postgres) and parallel matrix jobs for backend + frontend.
- Add a Vuexy/Plotly heatmap of soil moisture interpolated from weather.
- PostGIS column for the plot polygon (not just point) — would enable buffer/area analysis.
- JWT auth with a
userstable — currently the API is open. - WebSocket push of alerts instead of polling.
- Helm chart for Kubernetes.
MIT — see LICENSE.
O AgriWeather é uma aplicação full-stack de referência que:
- Permite cadastrar talhões agrÃcolas com nome, cultura, área (ha) e coordenadas lat/long.
- Busca a previsão dos próximos 7 dias para cada talhão na API pública Open-Meteo (grátis, sem chave).
- Gera um alerta de estresse hÃdrico quando a previsão tem < 30% de probabilidade de chuva E temperatura máxima > 32°C — uma heurÃstica agronômica simples documentada no código.
- Exporta um CSV da previsão do talhão pra análise em Excel, R, Pandas.
- Visualiza tudo numa SPA Vue 3: dashboard com KPIs, mapa Leaflet com pins dos talhões, gráficos de temperatura/chuva, formulário de criação.
É intencionalmente um app pequeno mas com forma de produção: REST design, migrations, arquitetura em camadas, testes automatizados, containerizado, CI em todo push.
Estou me preparando pra vaga de Analista Desenvolvimento Web Jr numa AgTech (a Solinftec, cujo stack público no GitHub mostra Vue + Kotlin/Java + YOLOv5 + MapLibre — este projeto espelha essas escolhas em nÃvel jr). Eu queria um sistema completo, executável e bem documentado que demonstrasse:
- Sei desenhar uma API REST limpa com Spring Boot 3.
- Sei construir uma UI Vue 3 usável e acessÃvel.
- Entendo que agro é um domÃnio de dados e séries temporais em escala.
- Me importo com higiene de produção: testes, migrations, containerização, CI.
Pré-requisitos: Docker Desktop, Node 20+ (só se quiser rodar o frontend fora do Docker), Java 21 + Maven 3.9+ (só se quiser rodar o backend fora do Docker).
git clone https://github.com/DRoqueProgrammer/agriweather.git
cd agriweather
docker compose up --buildAbra:
- Frontend (dev): http://localhost:5173
- Backend API: http://localhost:8080
- OpenAPI docs: http://localhost:8080/swagger-ui.html
- Postgres: localhost:5432 (user/pass: agriweather/agriweather)
| Método | Path | Descrição |
|---|---|---|
GET |
/api/plots |
Lista todos os talhões |
POST |
/api/plots |
Cria um talhão |
GET |
/api/plots/{id} |
Busca um talhão |
PUT |
/api/plots/{id} |
Atualiza um talhão |
DELETE |
/api/plots/{id} |
Remove um talhão |
GET |
/api/plots/{id}/forecast?days=7 |
Previsão de 1–14 dias (chama Open-Meteo) |
GET |
/api/plots/{id}/alerts |
Alertas de estresse hÃdrico ativos |
GET |
/api/plots/{id}/export.csv?days=7 |
Baixa a previsão em CSV |
Schema completo: http://localhost:8080/swagger-ui.html (Springdoc).
- Como ligar Flyway com Spring Boot 3 e JPA, e o gotcha da divergência entre
@Columne SQLNOT NULL. - Como chamar API REST externa com RestClient (Spring 6.1) e como adicionar cache em memória pra ser educado com a API pública.
- Como desenhar um mapa Leaflet real com markers customizados, popups e "fit bounds" pra múltiplos talhões.
- Como configurar GitHub Actions com services (Postgres) e jobs em matriz paralela pra backend + frontend.
- Heatmap de umidade do solo interpolada a partir do clima (Plotly/Vuexy).
- Coluna PostGIS pro polÃgono do talhão (não só ponto) — permitiria análise de buffer/área.
- JWT auth com tabela
users— hoje a API é aberta. - WebSocket pra push de alertas em vez de polling.
- Helm chart pra Kubernetes.
MIT — veja LICENSE.
Issues e PRs são bem-vindos! Por favor leia CONTRIBUTING.md antes.
Davi Roque — daviroque.luiz03@gmail.com · LinkedIn · GitHub
Built as a portfolio capstone while preparing for a Junior Web Developer role at an AgTech company (Solinftec — public job posting 4425371310).