Skip to content

Latest commit

 

History

History
74 lines (56 loc) · 2.09 KB

File metadata and controls

74 lines (56 loc) · 2.09 KB

Documentation

Complete setup and deployment guide for NutriSync.

Setup Guide

Follow these guides in order:

  1. Prerequisites - Required software and accounts
  2. Database Setup - Supabase configuration and migrations
  3. API Configuration - Google Gemini AI and USDA API
  4. Running Locally - Start the application
  5. Google OAuth - Optional: "Sign in with Google"
  6. Testing - Run and write tests
  7. Deployment - Production deployment
  8. Troubleshooting - Common issues and solutions

Database Migrations

Database schema is managed through sequential migration files in backend/migrations/.

See backend/migrations/README.md for details.

Additional Resources

Quick Reference

Environment Variables

Backend (backend/.env):

SUPABASE_URL=https://[project-ref].supabase.co
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
SUPABASE_KEY=your_anon_key
GOOGLE_API_KEY=your_gemini_api_key
USDA_API_KEY=your_usda_key

Frontend (frontend/.env.local):

VITE_SUPABASE_URL=https://[project-ref].supabase.co
VITE_SUPABASE_ANON_KEY=your_anon_key
VITE_API_URL=http://localhost:8000

Common Commands

Backend:

cd backend
source venv/bin/activate  # Activate virtual environment
uvicorn app.main:app --reload  # Start server
pytest tests/ -v  # Run tests

Frontend:

cd frontend
npm install  # Install dependencies
npm run dev  # Start development server
npm test  # Run tests

Getting Help

  • Check troubleshooting sections in each guide
  • Review error messages in browser console and terminal
  • Verify environment variables are set correctly
  • Ensure all migrations completed successfully