尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗A community-driven certification exam preparation platform. CertGym combines spaced repetition flashcards, adaptive mock exams, AI-assisted question generation, and social learning tools to help you pass cloud, networking, and project management certifications on the first try.
Create flashcard decks organized by certification domain. The SM-2 algorithm schedules daily reviews to maximize long-term retention — cards you struggle with reappear at 1, 3, 7, and 21-day intervals.
The fastest path is Docker Compose — one command brings up the full stack.
git clone <repository-url>
cd brain-gym
cp .env.example .env # optional: edit defaults
docker-compose up -d --build
| Service | URL |
|---|---|
| Frontend | http://localhost |
| Backend API | http://localhost/api/v1 |
| Swagger docs | http://localhost/api/docs |
| Markitdown | http://localhost:8001 (internal) |
Stop all services: docker-compose down
| Layer | Technology |
|---|---|
| Frontend | React 18, TypeScript, Vite + SWC, React Router v6, TanStack Query, Zustand, shadcn/ui, Tailwind CSS, Framer Motion |
| Backend | NestJS 11, TypeScript, Prisma ORM, Passport.js (JWT), Swagger/OpenAPI |
| Database | PostgreSQL 16 |
| Cache | Redis 7 |
| Infrastructure | Docker, Docker Compose, Nginx, Markitdown |
| Testing | Vitest (frontend), Jest (backend), Playwright (e2e) |
brain-gym/
├── src/ # Frontend (React + Vite)
│ ├── components/ # Reusable UI components
│ │ ├── dashboard/ # Dashboard panels (burnout, LLM cost, etc.)
│ │ ├── exam/ # Exam UI components
│ │ └── ui/ # shadcn/ui primitives
│ ├── pages/ # Route-level page components
│ │ ├── Admin/ # Admin tools (moderation, audit logs)
│ │ └── org/ # Multi-tenant org pages
│ ├── services/ # API call functions + TanStack Query hooks
│ │ └── api.ts # Shared Axios instance (auth + refresh interceptor)
│ ├── stores/ # Zustand stores
│ │ ├── auth.store.ts # Auth state + JWT tokens
│ │ └── org.store.ts # Active org context
│ └── lib/ # Utilities and formatters
├── backend/ # Backend (NestJS)
│ ├── src/
│ │ ├── auth/ # JWT auth, guards, refresh token
│ │ ├── training/ # Flashcards, coach, SRS scheduling
│ │ ├── exam/ # Exam engine, submissions, analytics
│ │ ├── ai-question-bank/ # AI generation, LLM usage tracking
│ │ ├── organizations/ # Multi-tenant org management
│ │ └── squads/ # Squad/peer-group features
│ ├── prisma/
│ │ ├── schema.prisma # Database schema
│ │ ├── migrations/ # SQL migration history
│ │ └── seed.ts # Development seed data
│ └── test/ # E2E test suites
├── infra/ # Terraform modules (AWS deployment)
├── nginx/ # Nginx reverse-proxy config
├── docs/ # All project documentation
├── docker-compose.yml
└── .github/workflows/ # CI/CD pipelines
docker-compose up -d postgres redis markitdown
cd backend
npm install # also runs prisma generate
cp .env.example .env # fill in DATABASE_URL, JWT secrets
npx prisma migrate dev # apply migrations
npx prisma db seed # seed demo data
npm run start:dev # hot-reload on :3000
# from repo root
npm install
npm run dev # Vite dev server on :8080
The frontend proxies /api to localhost:3000 via Vite's dev server — no CORS config needed.
Frontend (root)
| Command | Description |
|---|---|
npm run dev | Start Vite dev server on :8080 |
npm run build | Production bundle → dist/ |
npm run test | Vitest unit tests |
npm run test:watch | Watch mode |
npm run lint | ESLint |
npm run preview | Preview production build |
Backend (/backend)
| Command | Description |
|---|---|
npm run start:dev | NestJS with hot reload |
npm run build | Compile TypeScript |
npm run test | Jest unit tests |
npm run test:e2e | End-to-end tests |
npx prisma migrate dev | Run pending migrations |
npx prisma db seed | Seed database |
npx prisma studio | Interactive DB GUI |
.env)VITE_API_BASE_URL=/api/v1 # override for cloud deployments
VITE_GOOGLE_CLIENT_ID= # required for Google OAuth (Docker build)
backend/.env)DATABASE_URL=postgresql://certgym:password@localhost:5432/certgym?schema=public
REDIS_HOST=localhost
REDIS_PORT=6379
JWT_SECRET=change-me
JWT_REFRESH_SECRET=change-me
LLM_KEY_ENCRYPTION_SECRET=change-me
PORT=3000
NODE_ENV=development
MARKITDOWN_LOCAL_URL=http://markitdown:8001
Do not commit
.envfiles..gitignorealready excludes them.
# Frontend unit tests
npm run test
# Backend unit tests
cd backend && npm run test
# Backend e2e tests
cd backend && npm run test:e2e
# Playwright e2e (requires running app)
npx playwright test
Coverage reports are written to coverage/. The project targets ≥80% coverage on all new code.
docker-compose up -d --build
The production stack runs on AWS: ECS Fargate (backend), S3 + CloudFront (frontend), RDS PostgreSQL, ElastiCache Redis. CI/CD is handled by GitHub Actions (.github/workflows/deploy.yml).
Full deployment guides:
terraform applyAll technical and product documentation lives in docs/.
| Document | Description |
|---|---|
| Architecture Overview | C4 context/container diagrams, technology stack |
| Data Model | Database schema and ERDs |
| API Design | REST conventions, auth, module overview |
| Frontend Architecture | React structure, routing, state management |
| Security | JWT auth flow, RBAC, data protection |
| Basic Design (single doc) | Full system design in one place |
| Document | Description |
|---|---|
| Exam Engine | State machine, timer modes, scoring, submission flow |
| Coach Tier Gating | How the AI coach feature is gated by subscription tier |
| Burnout Detection | Signal model, severity levels, user guidance |
| Local LLM Question Generation | Using local LLM providers |
| Organization Management | Multi-tenant orgs, roles, onboarding |
| Document | Description |
|---|---|
| On-Call Runbook | Incident response, rollback procedures, log access |
| Deployment Overview | Docker, Nginx, environment configuration |
| AWS Deployment Guide | Cloud infrastructure reference |
| Document | Description |
|---|---|
| ADR Index | Architecture Decision Records |
| Vision & Strategy | Product philosophy and roadmap |
| Working Agreement | Team norms and process |
| Security Threat Model | Threat analysis and mitigations |
mainnpm run lint and npm run test before opening a PRSee Working Agreement for team norms, and Architecture Overview before making structural changes.
MIT — see LICENSE.
Developed with the CertGym Community.