{"id":28754650,"url":"https://github.com/miguelbtcode/weather-dashboard","last_synced_at":"2026-04-09T08:02:47.347Z","repository":{"id":299293849,"uuid":"1002592346","full_name":"miguelbtcode/weather-dashboard","owner":"miguelbtcode","description":"🌤️ Real-time weather dashboard with smart alerts - React + Azure Functions + Redis caching","archived":false,"fork":false,"pushed_at":"2025-06-15T19:43:59.000Z","size":129,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-15T20:47:56.718Z","etag":null,"topics":["azure-functions","azure-static-web-apps","ci-cd","docker","dotnet-8","openweathermap","react","real-time","redis","serverless","tailwindcss","typescript","weather-api","weather-dashboard"],"latest_commit_sha":null,"homepage":"https://github.com/miguelbtcode/weather-dashboard","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miguelbtcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-15T19:43:11.000Z","updated_at":"2025-06-15T19:49:09.000Z","dependencies_parsed_at":"2025-06-15T20:48:05.988Z","dependency_job_id":"9130c47a-d370-4785-be83-f1032cd9b179","html_url":"https://github.com/miguelbtcode/weather-dashboard","commit_stats":null,"previous_names":["miguelbtcode/weather-dashboard"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/miguelbtcode/weather-dashboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelbtcode%2Fweather-dashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelbtcode%2Fweather-dashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelbtcode%2Fweather-dashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelbtcode%2Fweather-dashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miguelbtcode","download_url":"https://codeload.github.com/miguelbtcode/weather-dashboard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelbtcode%2Fweather-dashboard/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260269459,"owners_count":22983649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-functions","azure-static-web-apps","ci-cd","docker","dotnet-8","openweathermap","react","real-time","redis","serverless","tailwindcss","typescript","weather-api","weather-dashboard"],"created_at":"2025-06-17T01:11:15.763Z","updated_at":"2025-10-16T19:16:46.079Z","avatar_url":"https://github.com/miguelbtcode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌤️ SkySense - Weather Dashboard\n\n\u003e Real-time weather intelligence with beautiful visualizations and smart alerts\n\n[![Azure Static Web Apps](https://img.shields.io/badge/Azure-Static%20Web%20Apps-0078d4?style=flat-square\u0026logo=microsoft-azure)](https://azure.microsoft.com/services/app-service/static/)\n[![Azure Functions](https://img.shields.io/badge/Azure-Functions-0062ad?style=flat-square\u0026logo=azure-functions)](https://azure.microsoft.com/services/functions/)\n[![.NET 8](https://img.shields.io/badge/.NET-8.0-512bd4?style=flat-square\u0026logo=dotnet)](https://dotnet.microsoft.com/)\n[![React](https://img.shields.io/badge/React-18.3-61dafb?style=flat-square\u0026logo=react)](https://reactjs.org/)\n[![Tailwind CSS](https://img.shields.io/badge/Tailwind-3.4-38bdf8?style=flat-square\u0026logo=tailwind-css)](https://tailwindcss.com/)\n\n## ✨ Features\n\n🌍 **Global Weather Data** - Get real-time weather for any city worldwide  \n📊 **Interactive Forecasts** - 7-day detailed forecasts with hourly breakdown  \n⚡ **Smart Alerts** - Intelligent weather warnings and notifications  \n📱 **Responsive Design** - Beautiful UI that works on all devices  \n🎯 **Auto-Location** - Automatic weather detection for your current location  \n💾 **Smart Caching** - Fast performance with Redis caching  \n🔄 **Real-time Updates** - Live data refresh every 15 minutes  \n🎨 **Dynamic Themes** - Weather-adaptive UI themes and animations  \n\n## 🛠️ Tech Stack\n\n### Frontend\n- **React 18.3** - Modern UI framework with hooks\n- **TypeScript 5.6** - Type-safe development\n- **Tailwind CSS 3.4** - Utility-first styling\n- **Alpine.js 3.14** - Lightweight interactivity\n- **Vite 5.4** - Lightning-fast build tool\n- **Lucide React** - Beautiful icon system\n\n### Backend\n- **.NET 8.0** - High-performance runtime\n- **Azure Functions v4** - Serverless compute\n- **OpenWeatherMap API** - Real-time weather data\n- **Redis Cache** - High-speed data caching\n- **Application Insights** - Performance monitoring\n\n### Infrastructure\n- **Azure Static Web Apps** - Frontend hosting\n- **Azure Function Apps** - API backend\n- **Azure Cache for Redis** - Data caching layer\n- **GitHub Actions** - CI/CD pipeline\n\n## 🏗️ Architecture\n\n```mermaid\ngraph TB\n    A[Web Browser] --\u003e B[Nginx Proxy :8080]\n    B --\u003e C[React Frontend :3000]\n    B --\u003e D[Azure Functions API :7071]\n    D --\u003e E[OpenWeatherMap API]\n    D --\u003e F[Redis Cache :6379]\n    D --\u003e G[Azurite Storage]\n    \n    subgraph \"Development Stack\"\n        C --\u003e H[Vite + Hot Reload]\n        D --\u003e I[.NET 8 Functions]\n        F --\u003e J[Redis Commander :8081]\n        G --\u003e K[Azure Storage Emulator]\n    end\n```\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- **Docker** and **Docker Compose**\n- **OpenWeatherMap API Key** ([Get free key here](https://openweathermap.org/api))\n\n### Setup\n\n1. **Clone and configure**\n   ```bash\n   git clone https://github.com/your-username/weather-dashboard.git\n   cd weather-dashboard\n   \n   # Copy environment template\n   cp .env.example .env\n   \n   # Edit .env and add your OpenWeatherMap API key\n   nano .env  # or use your preferred editor\n   ```\n\n2. **Add your API key to .env**\n   ```env\n   OPENWEATHER_API_KEY=your_api_key_here\n   ```\n\n3. **Start everything with Docker**\n   ```bash\n   # Start all services\n   docker-compose up -d\n   \n   # View logs (optional)\n   docker-compose logs -f\n   ```\n\n4. **Access your application**\n   - **🌐 Main App**: http://localhost:8080\n   - **⚛️ Frontend Direct**: http://localhost:3000\n   - **🔧 API Backend**: http://localhost:7071\n   - **📋 Redis UI**: http://localhost:8081\n\n## 🔧 Development URLs\n\n| Service | URL | Description |\n|---------|-----|-------------|\n| **🌐 Main Application** | `http://localhost:8080` | Complete app via Nginx proxy |\n| **⚛️ Frontend** | `http://localhost:3000` | React development server |\n| **🔧 Backend API** | `http://localhost:7071` | Azure Functions API |\n| **📋 Redis Commander** | `http://localhost:8081` | Redis management UI |\n| **☁️ Azurite Storage** | `http://localhost:10000-10002` | Azure Storage emulator |\n\n## ⚙️ Environment Configuration\n\n### Main Configuration (.env)\n```env\n# OpenWeatherMap API (Required)\nOPENWEATHER_API_KEY=your_api_key_here\n\n# Application URLs\nVITE_API_BASE_URL=http://localhost:7071/api\nVITE_APP_NAME=Weather Dashboard\n\n# Cache Configuration\nCACHE_DURATION_MINUTES=15\nFORECAST_CACHE_DURATION_MINUTES=60\n\n# Redis Configuration\nREDIS_PASSWORD=weather_redis_pass\nREDIS_CONNECTION_STRING=redis:6379,password=weather_redis_pass\n\n# Temperature Thresholds\nHIGH_TEMPERATURE_THRESHOLD=35.0\nLOW_TEMPERATURE_THRESHOLD=0.0\nHIGH_WIND_SPEED_THRESHOLD=15.0\n\n# Rate Limiting\nRATE_LIMIT_MAX_REQUESTS=3\nRATE_LIMIT_WINDOW_SECONDS=10\n```\n\n## 📁 Project Structure\n\n```\nweather-dashboard/\n├── docker-compose.yml              # 🐳 Complete development stack\n├── nginx.conf                      # 🌐 Proxy configuration\n├── .env                            # ⚙️ Environment variables\n├── apps/\n│   ├── backend/                    # 🔧 .NET Azure Functions\n│   │   ├── Dockerfile\n│   │   └── src/WeatherDashboard.Functions/\n│   └── frontend/                   # ⚛️ React + TypeScript + Vite\n│       ├── Dockerfile\n│       └── src/\n└── docs/                           # 📖 Documentation\n```\n\n## 🌐 API Documentation\n\n### Weather Endpoints\n\n| Endpoint | Method | Description | Example |\n|----------|--------|-------------|---------|\n| `/api/weather/{city}` | GET | Current weather by city | `/api/weather/Lima` |\n| `/api/weather-coords` | GET | Weather by coordinates | `/api/weather-coords?lat=-12.04\u0026lon=-77.04` |\n| `/api/forecast/{city}` | GET | 5-day forecast | `/api/forecast/Lima` |\n| `/api/forecast-coords` | GET | Forecast by coordinates | `/api/forecast-coords?lat=-12.04\u0026lon=-77.04` |\n| `/api/alerts/{city}` | GET | Weather alerts | `/api/alerts/Lima` |\n| `/api/health` | GET | API health check | `/api/health` |\n\n### Quick API Test\n```bash\n# Test weather API\ncurl \"http://localhost:8080/api/weather-coords?lat=-12.0464\u0026lon=-77.0428\u0026units=metric\"\n\n# Test health endpoint\ncurl \"http://localhost:8080/api/health\"\n```\n\n## 🛠️ Development Commands\n\n### Docker Commands\n```bash\n# Start all services\ndocker-compose up -d\n\n# View logs\ndocker-compose logs -f [service-name]\n\n# Restart specific service\ndocker-compose restart [service-name]\n\n# Stop all services\ndocker-compose down\n\n# Rebuild and start\ndocker-compose up -d --build\n\n# Clean everything (⚠️ removes data)\ndocker-compose down -v\n```\n\n### Service-Specific Development\n```bash\n# Frontend only (if you want to develop without Docker)\ncd apps/frontend\nnpm install\nnpm run dev\n\n# Backend only (if you want to develop without Docker)\ncd apps/backend/src/WeatherDashboard.Functions\ndotnet restore\nfunc start\n```\n\n## 🚀 Deployment\n\nReady to deploy? Check our [deployment guide](docs/deployment.md) for Azure, AWS, or other cloud providers.\n\n## 🧪 Testing\n\n### Health Checks\n```bash\n# Test all services\ncurl http://localhost:8080/health        # Nginx\ncurl http://localhost:7071/api/health    # Backend\ndocker-compose exec redis redis-cli ping # Redis\ncurl http://localhost:10000              # Azurite\n```\n\n### Load Testing (Optional)\n```bash\n# Install k6\nbrew install k6  # macOS\n\n# Run load test\nk6 run tests/load-test.js\n```\n\n## 🔧 Troubleshooting\n\n### Common Issues\n\n**❌ Port conflicts**\n```bash\n# Check what's using ports\nlsof -i :8080,:3000,:7071\n\n# Change ports in .env if needed\n```\n\n**❌ API key not working**\n```bash\n# Verify API key\ncurl \"https://api.openweathermap.org/data/2.5/weather?q=London\u0026appid=YOUR_API_KEY\"\n```\n\n**❌ Docker issues**\n```bash\n# Reset everything\ndocker-compose down -v\ndocker system prune -f\ndocker-compose up -d --build\n```\n\n### Debug Mode\n```bash\n# Enable verbose logging\ndocker-compose logs -f weather-backend\ndocker-compose logs -f weather-frontend\n```\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/amazing-feature`\n3. Make your changes\n4. Test with Docker: `docker-compose up -d --build`\n5. Commit: `git commit -m 'Add amazing feature'`\n6. Push: `git push origin feature/amazing-feature`\n7. Open a Pull Request\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- [OpenWeatherMap](https://openweathermap.org/) for weather data\n- [Docker](https://docker.com/) for containerization\n- [Azure](https://azure.microsoft.com/) for cloud infrastructure\n- [Tailwind CSS](https://tailwindcss.com/) for styling\n- [Lucide](https://lucide.dev/) for icons\n\n## 📞 Support\n\n- 📧 **Email**: support@skysense.app\n- 💬 **Issues**: [GitHub Issues](https://github.com/your-username/weather-dashboard/issues)\n- 📖 **Docs**: [Documentation](https://docs.skysense.app)\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003cp\u003e🐳 Powered by Docker • ⚛️ Built with React • ❤️ Made for Miguel Barreto\u003c/p\u003e\n  \u003cp\u003e⭐ Star this repo if you found it helpful!\u003c/p\u003e\n\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelbtcode%2Fweather-dashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiguelbtcode%2Fweather-dashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelbtcode%2Fweather-dashboard/lists"}