Skip to content

YashB118/GTUAI-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GTU ExamAI — Backend

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).

Repositories & remotes

What Where Purpose
Backend source origingithub.com/YashB118/GTUAI-Backend This repo.
Backend deploy mirror hf-spacehuggingface.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.

Local development

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:8000

Frontend talks to backend via NEXT_PUBLIC_BACKEND_URL in frontend/.env.local (set in the frontend repo).

Deploy

Backend → HuggingFace Space

./scripts/deploy-hf-space.sh             # normal push
./scripts/deploy-hf-space.sh --force     # force-overwrite HF history

The 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-backend

The HF token must be in your git credential helper, or embedded as https://USER:TOKEN@huggingface.co/... in the remote URL.

Frontend → Vercel

Handled in the frontend repo. Push to main there → Vercel rebuilds.

Environment variables

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.

About

AI exam prediction + RAG-grounded answer generation for Gujarat Technological University (GTU) students. Next.js + FastAPI + Supabase + Qdrant + Groq/Gemini.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages