# ruankao-exam-prep-api **Repository Path**: exam-prep/ruankao-exam-prep-api ## Basic Information - **Project Name**: ruankao-exam-prep-api - **Description**: Go API service for the ruankao exam prep platform. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-29 - **Last Updated**: 2026-06-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # exam-prep-api Go API service for the universal exam training platform. ## Stack - Go - Gin - GORM - PostgreSQL - Redis - Viper - Zap ## Local Run Start PostgreSQL and Redis from the repository root: ```bash docker compose up -d postgres redis ``` Apply migrations and seed the default admin plus sample exam projects, questions, and strict mock exam blueprint: ```bash psql "postgres://ruankao:ruankao123@localhost:5432/ruankao_exam_prep?sslmode=disable" -f migrations/001_create_auth_tables.up.sql psql "postgres://ruankao:ruankao123@localhost:5432/ruankao_exam_prep?sslmode=disable" -f migrations/002_create_question_bank_tables.up.sql psql "postgres://ruankao:ruankao123@localhost:5432/ruankao_exam_prep?sslmode=disable" -f scripts/seed_admin.sql psql "postgres://ruankao:ruankao123@localhost:5432/ruankao_exam_prep?sslmode=disable" -f scripts/seed_question_bank.sql ``` Run the API: ```bash go run ./cmd/server ``` Health check: ```bash curl http://localhost:8080/healthz ``` Default admin account: - Username: `admin` - Password: `admin123` ## Main Routes - Public: `GET /api/v1/exam-projects`, `GET /api/v1/exam-subjects`, `GET /api/v1/syllabus-nodes`, `GET /api/v1/questions`, `GET /api/v1/exam-blueprints` - User auth required: `POST /api/v1/practice/submit`, `POST /api/v1/exam-attempts/start`, `POST /api/v1/exam-attempts/:id/submit`, `GET /api/v1/wrong-questions`, `GET /api/v1/favorites` - Admin auth required: `/admin-api/v1/exam-projects`, `/admin-api/v1/exam-subjects`, `/admin-api/v1/syllabus-nodes`, `/admin-api/v1/questions`, `/admin-api/v1/exam-blueprints`