A self-hosted coding interview practice platform
Practice algorithms, SQL, system design β all in one place.
| β‘ Monaco Editor | VS Code-grade editor in the browser |
| π Custom Categories | Add, edit, and delete categories with custom colors |
| π Instant Answers | View solutions without submitting |
| βοΈ Full CRUD | Add, edit, delete problems via UI |
| π Smart Filters | Filter by difficulty, category, tags |
| πΎ Local First | No cloud, no account, runs on SQLite |
| π€ AI Grading | Submit code to get instant feedback from GPT-4.1 β logic errors, syntax issues, and fix suggestions |
Frontend
Backend
Database
- Node.js >= 18 β Download
- Git
# 1. Clone the repo
git clone https://github.com/andrewyang0620/ByteQuiz.git
cd ByteQuiz
# 2. Install all dependencies
cd client && npm install
cd ../server && npm install
# 3. Start development servers
# Terminal 1 β backend
cd server && npm run dev
# Terminal 2 β frontend
cd client && npm run dev| Service | URL |
|---|---|
| Frontend | http://localhost:5173 |
| API | http://localhost:3001/api |
Production (single process): Build the client (
npm run buildinclient/), then runnpm run build && node dist/index.jsinserver/. Everything is served from one Express process.
bytequiz/
βββ client/ # React frontend (Vite)
β βββ src/
β βββ components/ # Reusable UI components
β βββ pages/ # Route-level pages
β βββ api/ # Axios API client
βββ server/ # Express backend
β βββ src/
β βββ routes/ # API route handlers
β βββ db/ # Schema, seed data
β βββ executor/ # Code runner (vm sandbox)
βββ README.md
βββ package.json # Root scripts
- Add problems β click
+ Add Problem, fill in title, category, description, and optional examples / test cases - Practice β open any problem, write code in the Editor tab, hit
βΆ Runto test against saved test cases - AI Grading β click
βΆ Submitto send your code to GPT-4.1 for instant feedback: logic errors with line-by-line fixes and format/syntax issues - View answer β switch to the Answer tab in the right panel
- Track progress β hit
+1on any problem to track how many times you've practiced it - Manage categories β go to Categories to add, edit (name + color), or delete categories
ByteQuiz uses OpenAI GPT-4.1 to review your code submissions.
- Add your API key to
server/.env:OPENAI_API_KEY=sk-... - Rebuild and restart the server:
cd server && npm run build && pm2 restart bytequiz-server
- Open any problem, write code, and click βΆ Submit β the AI Grading tab will show feedback structured as:
- π΄ Logic Errors β line-level issues with suggested fixes
- π‘ Format / Syntax Errors β typos, naming violations, syntax mistakes
The output language defaults to English. To switch to Chinese, change
OUTPUT_LANGUAGEinserver/src/routes/grade.tsline 5 to'zh', then rebuild.
Contributions are welcome!
- Fork the repo
- Create your branch:
git checkout -b feat/your-feature - Commit your changes:
git commit -m 'feat: add some feature' - Push and open a PR
To add new built-in problems or categories, edit server/src/db/seed.ts.
MIT Β© 2025 β feel free to fork and self-host.
- Add your own problems with full Markdown support
- Create custom categories (SQL, system design, etc.)
- Zero external dependencies - runs fully on your machine
| Layer | Technology |
|---|---|
| Frontend | React + Vite + TypeScript + Tailwind CSS |
| Backend | Node.js + Express + TypeScript |
| Database | SQLite (node:sqlite built-in) |
| Editor | Monaco Editor |
- Node.js >= 22.5
git clone https://github.com/andrewyang0620/ByteQuiz.git
cd ByteQuiz
npm run install:all
npm run dev- Frontend: http://localhost:5173
- Backend API: http://localhost:3001
bytequiz/
|-- client/ # React frontend
|-- server/ # Express backend
| -- data/ # SQLite database (gitignored)
-- README.md
Click "+ Add Problem" in the nav bar to add a problem via the UI, or seed the database directly via server/src/db/seed.ts.
Go to Categories in the nav bar to add or remove custom categories. Built-in categories (Array, SQL, etc.) cannot be deleted.
MIT
