Real-time weather intelligence with beautiful visualizations and smart alerts
π Global Weather Data - Get real-time weather for any city worldwide
π Interactive Forecasts - 7-day detailed forecasts with hourly breakdown
β‘ Smart Alerts - Intelligent weather warnings and notifications
π± Responsive Design - Beautiful UI that works on all devices
π― Auto-Location - Automatic weather detection for your current location
πΎ Smart Caching - Fast performance with Redis caching
π Real-time Updates - Live data refresh every 15 minutes
π¨ Dynamic Themes - Weather-adaptive UI themes and animations
- React 18.3 - Modern UI framework with hooks
- TypeScript 5.6 - Type-safe development
- Tailwind CSS 3.4 - Utility-first styling
- Alpine.js 3.14 - Lightweight interactivity
- Vite 5.4 - Lightning-fast build tool
- Lucide React - Beautiful icon system
- .NET 8.0 - High-performance runtime
- Azure Functions v4 - Serverless compute
- OpenWeatherMap API - Real-time weather data
- Redis Cache - High-speed data caching
- Application Insights - Performance monitoring
- Azure Static Web Apps - Frontend hosting
- Azure Function Apps - API backend
- Azure Cache for Redis - Data caching layer
- GitHub Actions - CI/CD pipeline
graph TB
A[Web Browser] --> B[Nginx Proxy :8080]
B --> C[React Frontend :3000]
B --> D[Azure Functions API :7071]
D --> E[OpenWeatherMap API]
D --> F[Redis Cache :6379]
D --> G[Azurite Storage]
subgraph "Development Stack"
C --> H[Vite + Hot Reload]
D --> I[.NET 8 Functions]
F --> J[Redis Commander :8081]
G --> K[Azure Storage Emulator]
end
- Docker and Docker Compose
- OpenWeatherMap API Key (Get free key here)
-
Clone and configure
git clone https://github.com/your-username/weather-dashboard.git cd weather-dashboard # Copy environment template cp .env.example .env # Edit .env and add your OpenWeatherMap API key nano .env # or use your preferred editor
-
Add your API key to .env
OPENWEATHER_API_KEY=your_api_key_here
-
Start everything with Docker
# Start all services docker-compose up -d # View logs (optional) docker-compose logs -f
-
Access your application
- π Main App: http://localhost:8080
- βοΈ Frontend Direct: http://localhost:3000
- π§ API Backend: http://localhost:7071
- π Redis UI: http://localhost:8081
Service | URL | Description |
---|---|---|
π Main Application | http://localhost:8080 |
Complete app via Nginx proxy |
βοΈ Frontend | http://localhost:3000 |
React development server |
π§ Backend API | http://localhost:7071 |
Azure Functions API |
π Redis Commander | http://localhost:8081 |
Redis management UI |
βοΈ Azurite Storage | http://localhost:10000-10002 |
Azure Storage emulator |
# OpenWeatherMap API (Required)
OPENWEATHER_API_KEY=your_api_key_here
# Application URLs
VITE_API_BASE_URL=http://localhost:7071/api
VITE_APP_NAME=Weather Dashboard
# Cache Configuration
CACHE_DURATION_MINUTES=15
FORECAST_CACHE_DURATION_MINUTES=60
# Redis Configuration
REDIS_PASSWORD=weather_redis_pass
REDIS_CONNECTION_STRING=redis:6379,password=weather_redis_pass
# Temperature Thresholds
HIGH_TEMPERATURE_THRESHOLD=35.0
LOW_TEMPERATURE_THRESHOLD=0.0
HIGH_WIND_SPEED_THRESHOLD=15.0
# Rate Limiting
RATE_LIMIT_MAX_REQUESTS=3
RATE_LIMIT_WINDOW_SECONDS=10
weather-dashboard/
βββ docker-compose.yml # π³ Complete development stack
βββ nginx.conf # π Proxy configuration
βββ .env # βοΈ Environment variables
βββ apps/
β βββ backend/ # π§ .NET Azure Functions
β β βββ Dockerfile
β β βββ src/WeatherDashboard.Functions/
β βββ frontend/ # βοΈ React + TypeScript + Vite
β βββ Dockerfile
β βββ src/
βββ docs/ # π Documentation
Endpoint | Method | Description | Example |
---|---|---|---|
/api/weather/{city} |
GET | Current weather by city | /api/weather/Lima |
/api/weather-coords |
GET | Weather by coordinates | /api/weather-coords?lat=-12.04&lon=-77.04 |
/api/forecast/{city} |
GET | 5-day forecast | /api/forecast/Lima |
/api/forecast-coords |
GET | Forecast by coordinates | /api/forecast-coords?lat=-12.04&lon=-77.04 |
/api/alerts/{city} |
GET | Weather alerts | /api/alerts/Lima |
/api/health |
GET | API health check | /api/health |
# Test weather API
curl "http://localhost:8080/api/weather-coords?lat=-12.0464&lon=-77.0428&units=metric"
# Test health endpoint
curl "http://localhost:8080/api/health"
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f [service-name]
# Restart specific service
docker-compose restart [service-name]
# Stop all services
docker-compose down
# Rebuild and start
docker-compose up -d --build
# Clean everything (β οΈ removes data)
docker-compose down -v
# Frontend only (if you want to develop without Docker)
cd apps/frontend
npm install
npm run dev
# Backend only (if you want to develop without Docker)
cd apps/backend/src/WeatherDashboard.Functions
dotnet restore
func start
Ready to deploy? Check our deployment guide for Azure, AWS, or other cloud providers.
# Test all services
curl http://localhost:8080/health # Nginx
curl http://localhost:7071/api/health # Backend
docker-compose exec redis redis-cli ping # Redis
curl http://localhost:10000 # Azurite
# Install k6
brew install k6 # macOS
# Run load test
k6 run tests/load-test.js
β Port conflicts
# Check what's using ports
lsof -i :8080,:3000,:7071
# Change ports in .env if needed
β API key not working
# Verify API key
curl "https://api.openweathermap.org/data/2.5/weather?q=London&appid=YOUR_API_KEY"
β Docker issues
# Reset everything
docker-compose down -v
docker system prune -f
docker-compose up -d --build
# Enable verbose logging
docker-compose logs -f weather-backend
docker-compose logs -f weather-frontend
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes
- Test with Docker:
docker-compose up -d --build
- Commit:
git commit -m 'Add amazing feature'
- Push:
git push origin feature/amazing-feature
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenWeatherMap for weather data
- Docker for containerization
- Azure for cloud infrastructure
- Tailwind CSS for styling
- Lucide for icons
- π§ Email: [email protected]
- π¬ Issues: GitHub Issues
- π Docs: Documentation
π³ Powered by Docker β’ βοΈ Built with React β’ β€οΈ Made for Miguel Barreto
β Star this repo if you found it helpful!