├── apps/
│ ├── http-server/
│ ├── ws-server/
│ ├── genAI/ # FastAPI GenAI service (Python)
│ └── frontend/
│
├── packages/
│ └── db/ # Prisma + PostgreSQL setup
│
├── docker-compose.yml
├── turbo.json
├── pnpm-workspace.yaml
└── package.json
*Node.js (>= 20)
*pnpm (>= 9)
*Python (>= 3.11) # for the genAI service
*Docker
*Docker Compose
git clone https://github.com/TheCodeHeist-Coder/Qtrive.git
cd Qtrivenpm install -g pnpmpnpm install*Create a .env in /packages/db and put this ennvironment variable
DATABASE_URL=postgresql://postgres:postgres@db:5432/mydb*Create a .env file in /apps/http-server and put these variables
PORT=4000
JWT_SECRET=<yourJWTSecret>
DATABASE_URL=postgresql://postgres:postgres@db:5432/Qtrive
FRONTEND_URL=http://localhost:5173
*Create a .env file in /apps/genAI (copy from .env.example)
cp apps/genAI/.env.example apps/genAI/.envThen fill in your keys:
GROQ_API_KEY=<yourGroqKey>
GOOGLE_API_KEY=<yourGoogleKey>
TAVILY_API_KEY=<yourTavilyKey>docker-compose up --build*Build all services (http-server, ws-server, frontend, genAI) *Start PostgreSQL database *Start all containers
Frontend → http://localhost:5173
HTTP Server → http://localhost:4000
WebSocket Server → ws://localhost:8080
GenAI Service → http://localhost:8000 (docs at /docs)
PostgreSQL → localhost:5432
The Python service is part of the Turborepo workspace, so pnpm dev at the
repo root starts it alongside the JS apps — but it needs a virtualenv first:
cd apps/genAI
pnpm run setup # creates .venv and installs requirements.txtAfter that, from the repo root:
pnpm dev # runs frontend, http-server, ws-server and genAIOr run just the AI service:
pnpm --filter genai dev| Method | Path | Description |
|---|---|---|
| GET | /health |
Health check (used by Docker) |
| POST | /chat |
Chat agent, with web search when needed |
| POST | /generate-questions |
Generate quiz questions from a PDF |
| POST | /ask-pdf |
Ask a question about an uploaded PDF |