AI-powered exam prediction platform for GTU students. This repo holds the backend only.
GTU-ExamAI/
├── backend/ FastAPI app — deploys to HuggingFace Spaces
├── scripts/ Deploy automation
├── docs/ Project docs
└── DAILY.md 30-day growth plan tracker
Frontend lives in a separate repo: YashB118/GTUAI-Frontend (deploys to Vercel).
| What | Where | Purpose |
|---|---|---|
| Backend source | origin → github.com/YashB118/GTUAI-Backend |
This repo. |
| Backend deploy mirror | hf-space → huggingface.co/spaces/YashB2004/gtu-examai-backend |
Auto-builds Docker image from backend/. Push-only target. |
| Frontend repo | github.com/YashB118/GTUAI-Frontend |
Separate. Deploys to Vercel. |
cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # fill in keys
uvicorn main:app --reload # http://localhost:8000Frontend talks to backend via NEXT_PUBLIC_BACKEND_URL in frontend/.env.local (set in the frontend repo).
./scripts/deploy-hf-space.sh # normal push
./scripts/deploy-hf-space.sh --force # force-overwrite HF historyThe script runs git subtree split --prefix=backend main and pushes that synthetic SHA to hf-space main. HF Space then rebuilds its Docker image from backend/Dockerfile.
First-time setup (already done):
git remote add hf-space https://huggingface.co/spaces/YashB2004/gtu-examai-backendThe HF token must be in your git credential helper, or embedded as https://USER:TOKEN@huggingface.co/... in the remote URL.
Handled in the frontend repo. Push to main there → Vercel rebuilds.
| Where | File | Required keys |
|---|---|---|
| Backend dev | backend/.env |
SUPABASE_URL, SUPABASE_SERVICE_KEY, GEMINI_API_KEY, QDRANT_URL, QDRANT_API_KEY (+ others — see backend/config.py) |
| Backend prod | HF Space secrets | same as dev |
Never commit any .env* file.