- Quick Start with one Command
- Frontend Application Setup
- Backend Service Setup
- Architecture & Core Design
- Tech Stack
git clone https://github.com/rajathshttgr/Inbox.git
cd Inboxchmod +x quickstart.sh
./quickstart.sh- Frontend: http://localhost:3000
- Backend: http://localhost:4000
git clone https://github.com/rajathshttgr/Inbox.git
cd Inbox/frontendnpm installCopy the .env.example file and update if needed:
cp .env.example .envUpdate NEXT_PUBLIC_SERVER in .env if required.
npm run devServer will run at:
http://localhost:3000
- Node.js (v18+ recommended)
- PostgreSQL
- Redis
- Docker Compose (v2+)
git clone https://github.com/rajathshttgr/Inbox.git
cd Inbox/backenddocker compose -f docker-compose.yml upcp .env.example .envMake sure .env uses localhost DB URLs.
npm installnpx prisma migrate devnpm run devServer will run at:
http://localhost:4000
-
Each recipient email is stored as a row in
EmailJob. -
Jobs are enqueued into BullMQ with a delayed execution:
delay = scheduledAt - currentTime -
BullMQ persists delayed jobs in Redis, ensuring:
- Future emails are sent correctly after server restarts
- Jobs are not duplicated or restarted
- Worker concurrency is configurable via
config/env.ts:
export const worker = {
concurrency: 10,
delayBetweenEmail: 2,
hourlyLimit: 500,
};- Multiple jobs can be processed in parallel safely using BullMQ workers.
-
Campaign-level limits
- Hourly limit and delay between emails are configurable at compose time.
- Default values are applied when not explicitly provided.
- Limits are applied during initial scheduling.
-
User-level hourly limits
- Configurable via environment variables.
- Enforced at send time using Redis atomic counters (Lua).
- When limits are exceeded, jobs are rescheduled into the next available hour window instead of failing.
Backend
- Node.js + TypeScript
- Express
- Prisma ORM
- PostgreSQL
- Redis + BullMQ
- Google OAuth
- Ethereal SMTP
- Docker
Frontend
- Next.js + TypeScript
- Tailwind CSS