A modern, full-stack weather application with real-time updates, database storage, and a beautiful dashboard interface.
- Real-time Weather Data: Live weather information from WeatherStack API
- Database Storage: Persistent SQLite database for weather history
- Beautiful Dashboard: Modern UI with responsive design
- Weather History: Track and analyze weather patterns over time
- Multiple Locations: Support for multiple cities
- Real-time Updates: WebSocket integration for live data
- Weather Analytics: Dashboard statistics and trends
π Tech Stack
Backend
- FastAPI - Modern Python web framework
- SQLAlchemy - Database ORM
- SQLite - Lightweight database
- WebSockets - Real-time communication
- WeatherStack API - Weather data provider
- Next.js 15 - React framework with App Router
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- Radix UI - Accessible component primitives
- Lucide React - Beautiful icons
- Node.js 18+
- Python 3.8+
- Git
cd backend
pip install -r requirements.txt
uvicorn main:app --reloadcd frontend
npm install
npm run dev-
Start both servers:
- Backend:
http://localhost:8000 - Frontend:
http://localhost:3000
- Backend:
-
Submit Weather Request:
- Enter date, location, and optional notes
- Click submit to create a weather record
-
View Weather Data:
- Use the lookup feature to retrieve weather by ID
- View dashboard statistics
- Browse weather history
POST /weather- Create weather recordGET /weather/{id}- Get weather by IDGET /weather- Get all weather recordsGET /dashboard/stats- Get dashboard statisticsGET /weather/location/{location}- Get weather by locationWS /ws- WebSocket for real-time updates
βββ backend/
β βββ main.py # FastAPI application
β βββ database.py # Database models
β βββ requirements.txt # Python dependencies
βββ frontend/
β βββ src/
β β βββ app/ # Next.js app router
β β βββ components/ # React components
β β βββ lib/ # Utility functions
β βββ package.json # Node.js dependencies
βββ README.md
Create a .env file in the backend directory:
WEATHERSTACK_API_KEY=your_api_key_here- Weather maps integration
- Email notifications
- Mobile app
- Advanced analytics
- Weather alerts
- Multi-language support