A production-grade background job queue built with Bun, TypeScript, and MySQL.
- REST API to submit jobs
- 10 concurrent workers processing jobs in parallel
- Automatic retry with exponential backoff (up to 3 attempts)
- Live dashboard showing real-time queue stats
- Load tested at 500+ jobs/minute
- Runtime: Bun
- Language: TypeScript
- Database: MySQL
- Frontend: Vanilla HTML/JS
- Clone the repo
- Run
bun install - Copy
.env.exampleto.envand fill in your MySQL credentials - Run
mysql -u root -p < schema.sqlto create the database - Run
bun run server.tsto start the API - Run
bun run worker.tsto start the workers
Submit a job:
```
curl -X POST http://localhost:3000/jobs
-H "Content-Type: application/json"
-d '{"type": "send_email", "payload": {"to": "user@gmail.com"}}'
```
Open dashboard.html in your browser to monitor jobs live.
**3 — Create a `.gitignore` file:**
node_modules/ .env bun.lock