Paragliding Weather Dashboard
Real-time paragliding weather conditions and forecasting application.
Features
- 🌤️ Real-time weather data from Open-Meteo
- 🪂 Paragliding-specific condition assessment
- 📊 Historical weather data tracking
- 🎯 Customizable safety thresholds
- ⚡ Fast API with caching
- 🔄 Automatic weather data updates
Tech Stack
- Backend: Go 1.24, Chi router, PostgreSQL
- Frontend: Next.js 14, React 18, TailwindCSS, Recharts
- Database: PostgreSQL 16
- Deployment: Docker/Podman, Kubernetes
Quick Start
Local Development (Fastest)
Run only PostgreSQL in a container, everything else natively:
# One command - setup AND start everything!
./dev.sh --start
# Or setup only, then start manually:
./dev.sh
make run-backend # Terminal 1
make run-frontend # Terminal 2
That's it! The --start flag sets up PostgreSQL, creates config files, runs migrations, AND starts both backend and frontend in the background.
Why local development?
- ✨ Faster hot-reload and rebuild times
- 🔧 Better debugging experience
- 📦 Smaller resource footprint
- 🚀 Quicker iteration cycles
See DEV_SETUP.md for detailed local development guide.
Full Container Development
Run everything in containers:
make dev
Access at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080/api/v1
Available Make Commands
Local Development
./dev.sh- Recommended: Idempotent setup scriptmake dev-local- Setup local development (runs dev.sh)make dev-db- Start PostgreSQL onlymake dev-db-down- Stop PostgreSQLmake run-backend- Run backend locallymake run-frontend- Run frontend locally
Container Development
make dev- Start all services in containersmake dev-down- Stop all containersmake dev-logs- View backend logsmake dev-logs-frontend- View frontend logsmake dev-logs-postgres- View PostgreSQL logs
Database
make migrate-up- Run migrationsmake migrate-down- Rollback last migrationmake migrate-create name=<name>- Create new migration
Testing
make test- Run all testsmake test-backend- Run backend tests onlymake test-frontend- Run frontend tests only
Build
make build- Build backend and frontendmake build-backend- Build backend onlymake build-frontend- Build frontend only
API Endpoints
GET /api/v1/health- Health checkGET /api/v1/weather/current- Current conditionsGET /api/v1/weather/forecast- Weather forecastGET /api/v1/weather/historical?date=YYYY-MM-DD- Historical dataPOST /api/v1/assess- Assess conditions with custom thresholds
Configuration
Backend Environment Variables
See backend/.env.example for all configuration options:
DATABASE_URL- PostgreSQL connection stringPORT- Server port (default: 8080)LOCATION_LAT- Latitude for weather dataLOCATION_LON- Longitude for weather dataLOCATION_NAME- Location display nameTIMEZONE- Timezone for weather dataFETCH_INTERVAL- How often to fetch weather (default: 15m)CACHE_TTL- API response cache duration (default: 10m)
Frontend Environment Variables
See frontend/.env.local.example:
NEXT_PUBLIC_API_URL- Backend API URL
Project Structure
.
├── backend/ # Go backend
│ ├── cmd/api/ # Application entry point
│ ├── internal/ # Internal packages
│ │ ├── cache/ # Caching layer
│ │ ├── client/ # External API clients
│ │ ├── config/ # Configuration
│ │ ├── model/ # Data models
│ │ ├── repository/ # Database layer
│ │ ├── server/ # HTTP server
│ │ └── service/ # Business logic
│ └── migrations/ # Database migrations
├── frontend/ # Next.js frontend
│ ├── app/ # Next.js app directory
│ ├── components/ # React components
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utilities
│ └── store/ # State management
├── docker-compose.yml # Full stack containers
├── docker-compose.dev.yml # PostgreSQL only
├── dev.sh # Idempotent dev setup script
├── Makefile # Development commands
└── DEV_SETUP.md # Detailed dev guide
Development Workflow
Initial Setup
# 1. Clone the repository
git clone <repo-url>
cd paragliding
# 2. Run setup script
./dev.sh
# 3. Start services (in separate terminals)
make run-backend
make run-frontend
Daily Development
# Start PostgreSQL (if not running)
make dev-db
# Start backend
make run-backend
# Start frontend
make run-frontend
Making Changes
- Backend: Changes auto-reload with Air (if installed) or restart manually
- Frontend: Changes auto-reload with Next.js Fast Refresh
- Database: Create migrations with
make migrate-create name=<name>
Deployment
Docker/Podman
# Build and start all services
docker-compose up -d
# Or with podman
podman-compose up -d
Kubernetes
# Apply configurations
kubectl apply -f k8s.yaml
# Check status
kubectl get pods
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
make test - Submit a pull request
License
ISC
Support
For issues and questions, please open a GitHub issue.
Description
Languages
Go
48.1%
TypeScript
32.9%
Shell
10.2%
JavaScript
4.3%
Makefile
2.6%
Other
1.9%