Lexiverse
Lexiverse - AI contextual reading engine for English learners. Your next article is your next review.
翻訳待ち
No updates detected yet. GitHub releases will appear here.
NestJS REST API with PostgreSQL for a fullstack driving theory exam app — auth, questions, results
翻訳待ち
Loading the full README.
Read the full README ↗Georgian driving-license theory exam prep — practice tickets, timed exams, and progress tracking.
Live: https://prava.ge · API: https://api.prava.ge
prava.ge helps users prepare for the Georgian driving license theory exam. Pick a license category (AM, A/A1, B/B1, C, D…), practice by topic, take realistic timed exams, and review weak areas on a personal profile.
| Frontend | This repo — github.com/lursmana1/driving-theory-front |
| Backend | github.com/lursmana1/driving-theory-back |
| Host | Hetzner via Coolify (Nixpacks). Site https://prava.ge, API https://api.prava.ge. |
git clone https://github.com/lursmana1/driving-theory-front.git
cd prava
npm install
Create .env.local:
NEXT_PUBLIC_API_URL=http://localhost:3000
getApiBaseUrl() also accepts NEXT_PUBLIC_BACKEND_URL if NEXT_PUBLIC_API_URL is unset. No trailing slash.
Production (already set in Coolify as Build variables):
NEXT_PUBLIC_API_URL=https://api.prava.ge
NEXT_PUBLIC_SITE_URL=https://prava.ge
NEXT_PUBLIC_* is compiled into the browser bundle. Changing one needs a Coolify redeploy (force without cache if the old host sticks), not a restart.
# Terminal 1 — backend (see nest repo), port 3000
# Terminal 2 — frontend
npm run dev
Open http://localhost:3001.
npm run dev # development
npm run build # production build
npm run start # serve build
npm run lint # eslint
npm run typecheck # tsc --noEmit
The production app is https://prava.ge. Coolify uses Nixpacks (no Dockerfile). Full checklist: deploy/coolify.md.
| Setting | Value |
|---|---|
| Build pack | Nixpacks |
| Ports Exposes | 3000 |
| Domain | https://prava.ge |
| Health check | /api/health |
| API | NEXT_PUBLIC_API_URL=https://api.prava.ge (Build + Runtime) |
| Canonical | NEXT_PUBLIC_SITE_URL=https://prava.ge (Build + Runtime) |
The NestJS app must allow CORS from https://prava.ge with credentials. Tickets render on the Next server; exam, auth, and answers run in the browser.
| Path | Description |
|---|---|
/ | Landing |
/subjectpicker | Category + topics → start exam |
/exam | Timed exam |
/tickets/[category] | Practice by topic |
/profile | Stats & history |
/auth | Login / register |
Per-category rules (questions, pass score, allowed mistakes) live in src/data/categories.json and are loaded via getExamRules() in src/CONSTS/categories.ts.
OAuth runs on the API, not on the Next app.
| Value | |
|---|---|
| Callback | https://api.prava.ge/auth/google/callback |
| After login | https://prava.ge/ka/profile |
| Google Console redirect URIs | …/auth/google/callback on localhost + https://api.prava.ge |
src/
├── app/[locale]/ # App Router (ka, en, ru)
├── api/ # API client
├── components/ # Feature UI
├── CONSTS/ # Categories, subjects, rules
├── contexts/ # Auth (client)
├── data/ # Static JSON
└── i18n/ # Locales
Private / all rights reserved unless stated otherwise.