Dr. Claw
Full-stack research workspace. From idea to paper with AI agents.
A gym for your brain - community-driven certification exam prep
EducationTypeScript · HTMLGitHub @thanhpt-25OnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full 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.