Skip to content

BYU-I-Student-Projects/Fall_25_HomeNetAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HomeNetAI Weather Application

A full-stack weather monitoring web application with user authentication, dynamic location management, and real-time weather data.

Features

  • 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

Tech Stack

Backend

  • FastAPI: Modern Python web framework
  • PostgreSQL: Robust relational database
  • Open-Meteo API: Free weather and geocoding data
  • JWT: Secure authentication

Frontend

  • React: Modern UI library
  • TypeScript: Type-safe JavaScript
  • Vite: Fast build tool
  • Tailwind CSS: Utility-first styling
  • Axios: HTTP client

Prerequisites

Quick Start

1. Clone & Setup Database

# Clone repository
git clone <your-repo-url>
cd Fall_25_HomeNetAI

# Create PostgreSQL database
createdb homenet

2. Backend Setup

# 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

3. Frontend Setup

# 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

Project Structure

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

API Endpoints

Authentication

  • POST /auth/register - Register new user
  • POST /auth/login - Login user
  • GET /auth/me - Get current user info

Locations

  • GET /locations/search?query={city} - Search for locations
  • GET /locations - Get user's saved locations
  • POST /locations - Add new location
  • DELETE /locations/{id} - Delete location

Weather

  • GET /weather/{location_id} - Get weather data for location

Usage

  1. Register/Login: Create an account or sign in
  2. Search Location: Click "Add Location" and search for a city
  3. Add to Dashboard: Select a city from search results
  4. View Weather: See current weather and 7-day forecast on dashboard
  5. Manage Locations: Delete locations you no longer need

Configuration

Database Connection

Edit backend/database/database.py:

self.connection_string = "postgresql://username:password@localhost:5432/homenet"

Environment Variables (Optional)

Create .env in backend directory:

SECRET_KEY=your-secret-key-here
DATABASE_URL=postgresql://username:password@localhost/homenet

Troubleshooting

Backend Issues

"ModuleNotFoundError"

pip install -r requirements.txt

"Database connection failed"

  • Ensure PostgreSQL is running
  • Verify database credentials
  • Check that database homenet exists

Frontend Issues

"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

Documentation

Contributing

  1. Create a feature branch
  2. Make your changes
  3. Test thoroughly
  4. Submit a pull request

License

See LICENSE file for details.

📚 Documentation

Team

CSE 310 - Fall 2025 Group Project


Happy Coding!

About

Will update

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •