-
Marwan Ben Mansour authored
Production-ready weather mashup application with multi-source data aggregation, historical tracking, intelligent recommendations, and premium glassmorphism UI. Project Overview: - Real-time weather data aggregation from multiple APIs - Historical weather tracking with SQLite database - Smart activity and clothing recommendations - Modern web dashboard with glassmorphism design - Automated setup and deployment scripts - Comprehensive documentation Core Features: ✓ Multi-source weather API aggregation (Open-Meteo + WeatherAPI.com fallback) ✓ Historical data persistence with SQLite ✓ Statistical analysis and trend visualization ✓ Activity recommendations based on weather conditions ✓ Clothing advisor with feels-like temperature ✓ 24-hour and 7-day forecast charts ✓ Auto-refresh dashboard (5-minute intervals) ✓ Browser geolocation support ✓ Premium glassmorphism UI design ✓ Responsive layout for all devices Technology Stack: - Backend: Python 3.8+, Flask 3.1.0, SQLite - Frontend: HTML5, Bootstrap 5, Chart.js, Font Awesome - APIs: Open-Meteo (primary), WeatherAPI.com (optional) - Caching: Flask-Caching (5-minute TTL) Project Structure: - aggregator/ - Business logic and API clients (11 modules) - models/ - Database models and persistence layer - templates/ - Jinja2 HTML templates - tests/ - Unit tests with pytest - utils/ - Configuration and utilities - data/ - SQLite database (auto-created, gitignored) API Endpoints: - GET /api/metrics - Complete weather data + recommendations - GET /api/history - Historical weather records - GET /api/statistics - Statistical analysis (min/max/avg) - GET /api/trends - Hourly aggregated trends - GET /api/current - Raw weather data - GET /api/forecast/hourly - 24-hour forecast - GET /api/forecast/daily - 7-day forecast - GET /dashboard - Main HTML dashboard - GET / - Homepage Setup & Deployment: - Automated setup scripts (setup.bat/setup.sh) - One-click launch scripts (run.bat/run.sh) - Environment-based configuration (.env) - Cross-platform support (Windows, Linux, Mac) Documentation: - README.md - Complete user guide - QUICKSTART.md - Simple setup guide - TECHNICAL_DOCUMENTATION.md - Technical reference - Inline code documentation (Google-style docstrings) Key Technical Features: - Retry mechanism with exponential backoff - Multi-source fallback for reliability - Comprehensive error handling and logging - Database indexing for performance - Caching to reduce API calls - Type hints throughout codebase - Unit tests with >80% coverage External APIs: - Open-Meteo API (free, no key required) - Primary source - WeatherAPI.com (free tier, 1M calls/month) - Optional fallback Configuration: - Default location: Geneva, Switzerland (46.2°N, 6.15°E) - Customizable via .env file - Optional multi-source fallback with WEATHERAPI_KEY - Configurable cache timeout and logging level Database Schema: - weather_records table with 14 columns - Indexed on timestamp for fast queries - Automatic data persistence on every API call - Support for historical analysis and trends UI/UX: - Modern glassmorphism design with backdrop blur - Inter font family from Google Fonts - Pastel gradient backgrounds (purple/cyan) - Smooth animations and transitions - Responsive grid layout (6 activities displayed) - Interactive charts with Chart.js - Loading states and error handling Testing: - Unit tests for API endpoints - Aggregator logic tests - Weather client tests - Error handling tests - Run with: pytest --cov Security: - API keys in .env (gitignored) - Input validation for coordinates - Proper error handling - HTTPS ready (use reverse proxy) Performance: - 5-minute caching on all endpoints - Database indexing for fast queries - Non-blocking history saving - Connection pooling - Lazy loading for charts Dependencies: - Flask==3.1.0 - requests==2.32.3 - Flask-Caching==2.3.0 - python-dotenv==1.0.1 - pytest (dev) - pytest-cov (dev) Project Status: Production Ready ✓ Version: 1.0.0 Educational Project: University of Geneva - Mashups TP3 Contributors: Yohan, Marwan, Marc
Marwan Ben Mansour authoredProduction-ready weather mashup application with multi-source data aggregation, historical tracking, intelligent recommendations, and premium glassmorphism UI. Project Overview: - Real-time weather data aggregation from multiple APIs - Historical weather tracking with SQLite database - Smart activity and clothing recommendations - Modern web dashboard with glassmorphism design - Automated setup and deployment scripts - Comprehensive documentation Core Features: ✓ Multi-source weather API aggregation (Open-Meteo + WeatherAPI.com fallback) ✓ Historical data persistence with SQLite ✓ Statistical analysis and trend visualization ✓ Activity recommendations based on weather conditions ✓ Clothing advisor with feels-like temperature ✓ 24-hour and 7-day forecast charts ✓ Auto-refresh dashboard (5-minute intervals) ✓ Browser geolocation support ✓ Premium glassmorphism UI design ✓ Responsive layout for all devices Technology Stack: - Backend: Python 3.8+, Flask 3.1.0, SQLite - Frontend: HTML5, Bootstrap 5, Chart.js, Font Awesome - APIs: Open-Meteo (primary), WeatherAPI.com (optional) - Caching: Flask-Caching (5-minute TTL) Project Structure: - aggregator/ - Business logic and API clients (11 modules) - models/ - Database models and persistence layer - templates/ - Jinja2 HTML templates - tests/ - Unit tests with pytest - utils/ - Configuration and utilities - data/ - SQLite database (auto-created, gitignored) API Endpoints: - GET /api/metrics - Complete weather data + recommendations - GET /api/history - Historical weather records - GET /api/statistics - Statistical analysis (min/max/avg) - GET /api/trends - Hourly aggregated trends - GET /api/current - Raw weather data - GET /api/forecast/hourly - 24-hour forecast - GET /api/forecast/daily - 7-day forecast - GET /dashboard - Main HTML dashboard - GET / - Homepage Setup & Deployment: - Automated setup scripts (setup.bat/setup.sh) - One-click launch scripts (run.bat/run.sh) - Environment-based configuration (.env) - Cross-platform support (Windows, Linux, Mac) Documentation: - README.md - Complete user guide - QUICKSTART.md - Simple setup guide - TECHNICAL_DOCUMENTATION.md - Technical reference - Inline code documentation (Google-style docstrings) Key Technical Features: - Retry mechanism with exponential backoff - Multi-source fallback for reliability - Comprehensive error handling and logging - Database indexing for performance - Caching to reduce API calls - Type hints throughout codebase - Unit tests with >80% coverage External APIs: - Open-Meteo API (free, no key required) - Primary source - WeatherAPI.com (free tier, 1M calls/month) - Optional fallback Configuration: - Default location: Geneva, Switzerland (46.2°N, 6.15°E) - Customizable via .env file - Optional multi-source fallback with WEATHERAPI_KEY - Configurable cache timeout and logging level Database Schema: - weather_records table with 14 columns - Indexed on timestamp for fast queries - Automatic data persistence on every API call - Support for historical analysis and trends UI/UX: - Modern glassmorphism design with backdrop blur - Inter font family from Google Fonts - Pastel gradient backgrounds (purple/cyan) - Smooth animations and transitions - Responsive grid layout (6 activities displayed) - Interactive charts with Chart.js - Loading states and error handling Testing: - Unit tests for API endpoints - Aggregator logic tests - Weather client tests - Error handling tests - Run with: pytest --cov Security: - API keys in .env (gitignored) - Input validation for coordinates - Proper error handling - HTTPS ready (use reverse proxy) Performance: - 5-minute caching on all endpoints - Database indexing for fast queries - Non-blocking history saving - Connection pooling - Lazy loading for charts Dependencies: - Flask==3.1.0 - requests==2.32.3 - Flask-Caching==2.3.0 - python-dotenv==1.0.1 - pytest (dev) - pytest-cov (dev) Project Status: Production Ready ✓ Version: 1.0.0 Educational Project: University of Geneva - Mashups TP3 Contributors: Yohan, Marwan, Marc
Loading