Task Vault is a backend-focused task processing system built with Node.js, Express, Prisma, PostgreSQL, and BullMQ.
It provides job creation, queuing, processing, status tracking, and a complete authentication flow with JWT cookies.
This project simulates a real-world production backend where jobs are added to a queue and processed asynchronously by a dedicated worker.
- Backend: Node.js, Express
- Queue System: BullMQ (Redis)
- Database: PostgreSQL
- ORM: Prisma
- Authentication: JWT (HttpOnly Cookies)
- Environment Management: dotenv
- Validation & Utilities: bcrypt, cookie-parser
- Worker: BullMQ Worker (separate process)
- User registration with email verification OTP.
- Secure login with JWT stored in HttpOnly cookies.
- Protected routes using custom
authenticateJWTmiddleware. - Create new jobs and store them in the database.
- Push jobs to BullMQ for background processing.
- Dedicated worker to process tasks asynchronously.
- Retrieve all jobs belonging to an authenticated user.
- Retrieve details of a specific job.
- Clean and modular code architecture following service/controller patterns.
- Node.js (v16 or higher recommended)
- npm
- PostgreSQL installed locally
- Redis installed and running locally (required for BullMQ)
- Clone the repository
git clone https://github.com/MustafaHabibX/task-vault.git- Navigate into the project folder
cd task-vault- Install dependencies
npm install- Configure environment variables
cp .env.example .env- Setup Prisma
npx prisma migrate dev --name init
npx prisma generate- Start the server
npm start- Start the job worker
npm run worker- Access the API at:
http://localhost:3000
task-vault/
│
├─ prisma/ # Prisma schema and migrations
├─ src/
│ ├─ controllers/ # Express route controllers
│ ├─ services/ # Business logic
│ ├─ routes/ # Express routes
│ ├─ queue/ # BullMQ queue setup
│ ├─ workers/ # Worker that processes background jobs
│ ├─ middleware/ # JWT authentication middleware
│ ├─ utils/ # Helper utilities (OTP, email, etc.)
│ ├─ server.js # Main API server entry point
│
├─ package.json
├─ .env.example
├─ .env
└─ README.md
- Implemented full authentication with JWT cookies.
- Built a production-like job queue system with BullMQ and Redis.
- Used Prisma for database management and migrations.
- Structured Node.js backend using modern service → controller → route layering.
- Handled OTP email flows and secure login.
- Learned real-world worker/queue architecture used in industry.