Skip to content

ArunSisarran/Respira

Repository files navigation

Wildfire-Protection

Monorepo with FastAPI backend and Next.js + Tailwind frontend.

🚀 Quick Start (Recommended)

Option 1: Automated Setup

# Start both frontend and backend with one command
./dev-start.sh

Option 2: Manual Setup

# Terminal 1: Start backend with Docker
docker-compose up

# Terminal 2: Start frontend locally
cd frontend
npm install
npm run dev

📋 Development Workflow

Backend (FastAPI)

Frontend (Next.js)

🛠️ Available Scripts

Frontend Scripts

cd frontend

# Development
npm run dev          # Start dev server with Turbopack
npm run dev:full     # Start with helpful messages

# Production
npm run build        # Build for production
npm run start        # Start production server

# Utilities
npm run lint         # Run ESLint
npm run clean        # Clean and reinstall dependencies

Backend Scripts

# Using Docker (recommended)
docker-compose up

# Using Poetry (alternative)
cd backend
poetry install
poetry run uvicorn app.main:app --reload --port 8000

🌐 Environment Configuration

Frontend Environment

  • Local: Uses .env.local (automatically loads)
  • Production: Configured via Vercel environment variables
  • API URL: NEXT_PUBLIC_API_URL=http://localhost:8000 (local)

Backend Environment

  • Local: Uses Docker environment variables
  • Production: Configured via Render environment variables

📁 Project Structure

├── backend/           # FastAPI application
├── frontend/          # Next.js application
├── docker-compose.yml # Backend containerization
├── dev-start.sh       # Development startup script
├── vercel.json        # Frontend deployment config
└── README.md          # This file

🚀 Deployment

Frontend (Vercel)

  • Automatically deploys from main branch
  • Builds from frontend/ directory
  • Uses vercel.json configuration

Backend (Render)

  • Deploys from backend/ directory
  • Uses render.yaml configuration

🔧 Troubleshooting

Frontend Issues

# Clean install
cd frontend
npm run clean

# Check dependencies
npm install

Backend Issues

# Rebuild containers
docker-compose down
docker-compose up --build

# Check logs
docker-compose logs backend

Port Conflicts

  • Frontend: Change port in frontend/package.json dev script
  • Backend: Change port in docker-compose.yml

About

No description, website, or topics provided.

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors