Skip to content

Latest commit

Β 

History

History
99 lines (80 loc) Β· 2.95 KB

File metadata and controls

99 lines (80 loc) Β· 2.95 KB

AITutor - Easy Deployment Structure

🎯 Project Overview

Your AITutor application has been restructured for easy deployment with separate frontend and backend modules.

πŸ“ New Structure

aitutor/
β”œβ”€β”€ backend/              # 🐍 FastAPI Backend (Deploy to Render)
β”‚   β”œβ”€β”€ app/             # Application code
β”‚   β”œβ”€β”€ requirements.txt  # Python dependencies
β”‚   β”œβ”€β”€ render.yaml      # Render configuration
β”‚   β”œβ”€β”€ .env.example     # Environment template
β”‚   β”œβ”€β”€ deploy.sh        # One-command deployment
β”‚   └── README.md        # Backend deployment guide
β”‚
β”œβ”€β”€ frontend/            # 🌐 Next.js Frontend (Deploy to Vercel)
β”‚   β”œβ”€β”€ app/             # React components
β”‚   β”œβ”€β”€ package.json     # Node.js dependencies
β”‚   β”œβ”€β”€ vercel.json      # Vercel configuration
β”‚   β”œβ”€β”€ .env.example     # Environment template
β”‚   β”œβ”€β”€ deploy.sh        # One-command deployment
β”‚   └── README.md        # Frontend deployment guide
β”‚
β”œβ”€β”€ src/                 # Original structure (still works)
β”œβ”€β”€ deployment/          # Additional deployment tools
β”œβ”€β”€ docs/               # Documentation
└── README.md           # Main project guide

πŸš€ Super Quick Deployment

1. Backend to Render

cd backend
cp .env.example .env
# Add your OPENROUTER_API_KEY to .env
./deploy.sh

2. Frontend to Vercel

cd frontend
cp .env.example .env.local
# Add your backend URL to .env.local
./deploy.sh

✨ Benefits

  • πŸ”₯ One-command deployment: ./deploy.sh in each module
  • πŸš€ Independent services: Deploy frontend/backend separately
  • ⚑ Faster builds: Smaller codebases
  • πŸ‘₯ Team collaboration: Frontend/backend teams work independently
  • πŸ“± Separate scaling: Scale services independently
  • πŸ›  Easy maintenance: Update one service without affecting other

🌐 Production URLs

After deployment:

πŸ“š Documentation

πŸ”§ Environment Variables

Backend (.env)

OPENROUTER_API_KEY=sk-or-v1-your-key-here
PORT=8000
NODE_ENV=production

Frontend (.env.local)

NEXT_PUBLIC_API_URL=https://aitutor-backend.onrender.com
NODE_ENV=production

βœ… Ready to Deploy!

Both modules are production-ready with:

  • βœ… Deployment configurations
  • βœ… Environment variable templates
  • βœ… One-command deploy scripts
  • βœ… Individual README guides
  • βœ… Health checks
  • βœ… Error handling

Choose your deployment option and deploy in minutes! πŸŽ‰