Skip to content

yamanalbezrah/Weather-Data-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌀️ Real-time Weather Dashboard

A modern, full-stack weather application with real-time updates, database storage, and a beautiful dashboard interface.

✨ Features

  • 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

Frontend

  • 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

πŸ“¦ Installation

Prerequisites

  • Node.js 18+
  • Python 3.8+
  • Git

Backend Setup

cd backend
pip install -r requirements.txt
uvicorn main:app --reload

Frontend Setup

cd frontend
npm install
npm run dev

🌐 Usage

  1. Start both servers:

    • Backend: http://localhost:8000
    • Frontend: http://localhost:3000
  2. Submit Weather Request:

    • Enter date, location, and optional notes
    • Click submit to create a weather record
  3. View Weather Data:

    • Use the lookup feature to retrieve weather by ID
    • View dashboard statistics
    • Browse weather history

πŸ“Š API Endpoints

  • POST /weather - Create weather record
  • GET /weather/{id} - Get weather by ID
  • GET /weather - Get all weather records
  • GET /dashboard/stats - Get dashboard statistics
  • GET /weather/location/{location} - Get weather by location
  • WS /ws - WebSocket for real-time updates

πŸ”§ Development

Project Structure

β”œβ”€β”€ 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

Environment Variables

Create a .env file in the backend directory:

WEATHERSTACK_API_KEY=your_api_key_here

🎯 Future Enhancements

  • Weather maps integration
  • Email notifications
  • Mobile app
  • Advanced analytics
  • Weather alerts
  • Multi-language support

About

Interactive Weather Retrieval Tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published