Skip to content

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Code Trainer

Code Trainer, interactive TypeScript interview practice

Code Trainer is a browser-based interview practice app for intermediate full-stack TypeScript developers. Short MDX lessons lead into coding, debugging, refactoring, React, tracing, written, and system design exercises.

All 60 lessons are available across five tracks. Guest progress works without an account and stays in the current browser. Optional GitHub accounts sync progress across devices through Convex.

Features

  • A guided curriculum covering algorithms, JavaScript and TypeScript, frontend engineering, backend topics, testing, and system design
  • An in-browser Monaco workspace for TypeScript and React exercises
  • Automated tests, static checks, and type checks for problems with deterministic answers
  • Structured reference and rubric reviews for written and design work
  • Local progress, drafts, completion tracking, and a recommended next lesson
  • GitHub sign-in with cross-device progress sync
  • Responsive navigation, keyboard focus states, and light and dark themes
  • Selectable color themes for the code editor and example code

The exercise runtime stays in the browser. Workers run inside an opaque-origin sandbox that blocks access to application storage and network requests. Sucrase transpiles submitted TypeScript and TSX for execution; a separate TypeScript compiler worker grades type fixtures.

Run it locally

Guest mode needs no external services or environment variables.

bun install
bun run dev:vite

Open http://127.0.0.1:5173.

Use bun run dev:all to start Vite and convex dev together. Convex uses the selected development deployment, which may be local or cloud. See DEPLOYMENT.md for backend variables and deployment setup.

Useful commands

Command Purpose
bun run dev:vite Start the frontend at http://127.0.0.1:5173
bun run dev:convex Watch backend changes against the selected Convex development deployment
bun run dev:all Start Vite and convex dev together
bun run test Run the Vitest suite
bun run test:e2e Run local Playwright browser checks; see setup
bun run lint Run ESLint
bun run build Type-check and create the production build
bun run preview Serve the production build locally

How it is built

  • React 19, TypeScript, React Router, and Vite
  • Tailwind CSS and shadcn/ui components
  • MDX lesson content with a typed curriculum model
  • Monaco Editor, Sucrase, TypeScript, and Web Workers for browser-side exercises
  • Local storage for guest progress, plus Better Auth and Convex for account sync
  • Vitest, Playwright, and ESLint for automated checks

The main project areas are:

Path Responsibility
src/curriculum Lesson content, tracks, problem definitions, and availability
src/components/problems Exercise interfaces and grading feedback
src/runtime JavaScript, TypeScript, and React execution workers
src/state Progress, drafts, recommendations, and sync behavior
convex Authenticated progress persistence

Contributor documentation

  • Lesson authoring covers teaching conventions, problem selection, and grading requirements.
  • Architecture explains the runtime and progress-sync boundaries.
  • Deployment covers local account sync, hosting, and release operations.

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages