A full-stack weather monitoring web application with user authentication, dynamic location management, and real-time weather data.
- User Authentication: Secure registration and login with JWT tokens
- Global Location Search: Search and add any city worldwide
- Real-Time Weather: Current weather and 7-day forecasts
- Responsive Design: Modern UI that works on desktop and mobile
- User Dashboard: Personalized weather dashboard for saved locations
- FastAPI: Modern Python web framework
- PostgreSQL: Robust relational database
- Open-Meteo API: Free weather and geocoding data
- JWT: Secure authentication
- React: Modern UI library
- TypeScript: Type-safe JavaScript
- Vite: Fast build tool
- Tailwind CSS: Utility-first styling
- Axios: HTTP client
# Clone repository
git clone <your-repo-url>
cd Fall_25_HomeNetAI
# Create PostgreSQL database
createdb homenet
# Install Python dependencies
pip install -r requirements.txt
# Update database connection in backend/database/database.py
# Change line 12 to your PostgreSQL credentials:
# self.connection_string = "postgresql://username:password@localhost/homenet"
# Start backend server
cd backend
python start_backend.py
Backend will run at: http://localhost:8000
- API Docs: http://localhost:8000/docs
- Interactive API: http://localhost:8000/redoc
- Weather Scheduler: Automatically collects weather data every 30 minutes
# Install Node.js dependencies
cd frontend
npm install
# Start development server
npm run dev
# OR use the PowerShell script:
.\start.ps1
Frontend will run at: http://localhost:5173
Fall_25_HomeNetAI/
├── backend/
│ ├── main.py # FastAPI app & API endpoints
│ ├── start_backend.py # Backend startup script
│ ├── database/
│ │ ├── database.py # Database manager
│ │ └── schema.sql # Database schema
│ └── weather/
│ └── weather_api.py # Weather API integration
├── frontend/
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Page components
│ │ ├── services/ # API services
│ │ ├── contexts/ # React contexts (Auth)
│ │ └── App.tsx # Main app component
│ ├── package.json # Frontend dependencies
│ └── start.ps1 # Frontend startup script
├── docs/
│ └── GroupProjectPlan.md # Project documentation
├── requirements.txt # Python dependencies
└── README.md # This file
POST /auth/register
- Register new userPOST /auth/login
- Login userGET /auth/me
- Get current user info
GET /locations/search?query={city}
- Search for locationsGET /locations
- Get user's saved locationsPOST /locations
- Add new locationDELETE /locations/{id}
- Delete location
GET /weather/{location_id}
- Get weather data for location
- Register/Login: Create an account or sign in
- Search Location: Click "Add Location" and search for a city
- Add to Dashboard: Select a city from search results
- View Weather: See current weather and 7-day forecast on dashboard
- Manage Locations: Delete locations you no longer need
Edit backend/database/database.py
:
self.connection_string = "postgresql://username:password@localhost:5432/homenet"
Create .env
in backend directory:
SECRET_KEY=your-secret-key-here
DATABASE_URL=postgresql://username:password@localhost/homenet
"ModuleNotFoundError"
pip install -r requirements.txt
"Database connection failed"
- Ensure PostgreSQL is running
- Verify database credentials
- Check that database
homenet
exists
"npm not recognized"
- Install Node.js from nodejs.org
- Restart terminal
"Cannot find module"
cd frontend
npm install
CORS errors
- Ensure backend is running on port 8000
- Check frontend is running on port 5173
- Setup Guide - Detailed setup instructions
- Team Setup - Quick start for team members
- Project Status - Current project state
- Group Project Plan - Project planning docs
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
See LICENSE file for details.
- Team Setup Guide - Complete setup instructions for team members
- Quick Commands - Quick reference for common tasks
- Project Plan - Detailed project documentation
CSE 310 - Fall 2025 Group Project
Happy Coding!