π Master Deployment Guide: Dodge AI
Follow these steps to take your project from local to live.
π Repository Structure (Monorepo)
Your project is now organized for professional deployment:
dodge-ai/
βββ backend/ # FastAPI + SQLite
β βββ dodge_ai.py # Main API
β βββ data.db # Database
β βββ requirements.txt
βββ frontend/ # React (Vite)
βββ src/ # UI Components
βββ .env # Environment config
π’ Step 1: Backend Deployment (Render.com)
- Create Account: Go to Render and connect your GitHub.
- New Web Service: Select your repository.
- Configure:
- Name:
dodge-ai-backend - Root Directory:
backend - Runtime:
Python 3 - Build Command:
pip install -r requirements.txt - Start Command:
uvicorn dodge_ai:app --host 0.0.0.0 --port 10000
- Name:
- Env Variables:
- Add
OPENROUTER_API_KEY:your_key_here
- Add
- Wait: Once deployed, you will get a URL like
https://dodge-ai-backend.onrender.com.
π΅ Step 2: Frontend Deployment (Vercel.com)
- Create Account: Go to Vercel and connect your GitHub.
- Import Project: Select the same repository.
- Configure:
- Project Name:
dodge-ai-frontend - Framework Preset:
Vite - Root Directory:
frontend
- Project Name:
- Env Variables (CRITICAL):
- Add
VITE_API_URL:https://dodge-ai-backend.onrender.com(from Step 1)
- Add
- Deploy: Click Deploy. Your site will be live at
https://dodge-ai-frontend.vercel.app.
π§ Master Prompt for Future AI Help
If you need to explain this deployment to another AI or for documentation, use this:
Goal: Deploy a monorepo ERP AI System. Backend: FastAPI in
/backend, port 10000, Root Dir:backend. Frontend: React (Vite) in/frontend, Root Dir:frontend. Linkage: Frontend usesVITE_API_URLto hit the Render backend. Features: Intent detection, SQL generation, Cytoscape graph, Recharts.