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
