Solo project

Rottom Mail.

Schedule cold-email campaigns that go out on time, exactly once, and within safe sending limits.

A cold email sent twice is worse than one never sent. Rottom Mail schedules thousands of emails across several mailboxes, keeps every hourly limit even with many workers, and survives restarts and crashes without losing or repeating a single send.

  • Duplicate sends

    0

    atomic claim plus a mailbox check after a crash.

  • Hourly cap

    200

    per sender, overflow delayed in order, never dropped.

  • Min gap

    2 s

    between sends from one mailbox.

  • Automated tests

    43

    37 backend, 6 frontend.

How it works

The life of one email.

  1. Schedule

    POST /api/campaigns validates the form with zod, saves one row per lead in a single transaction, then adds one BullMQ delayed job per row, with the email id as the job id.

  2. Wait

    The job sleeps in Redis (AOF, noeviction) until its send time. On startup the API re-adds any job Redis lost, from Postgres, and overdue emails go out right away.

  3. Rate limit

    A worker asks a Redis Lua limiter for a slot. If the hour is full, the email moves to the next window, keeping its place in line, and Slack gets one alert.

  4. Claim and send

    The worker claims the row in one atomic update (scheduled → sending), so two workers can't both send it, then sends through the sender's Ethereal mailbox with a fixed Message-ID.

  5. Record

    The row becomes sent with the SMTP reply, an append-only audit event is written in the same transaction, and a sync job copies the change to Elasticsearch for search.

Tech stack

What it's built with.

Backend

Express, TypeScript
The API, with Google login (PKCE) and Redis sessions
PostgreSQL, Prisma
Source of truth, with a trigger keeping the audit log append-only
Redis, BullMQ
Delayed jobs, the rate limiter and workers that scale out
Elasticsearch
Search across recipients, subjects and messages

Frontend

React, Vite
Gmail-style dashboard with Scheduled and Sent tabs
Bull Board
Live queue dashboard for admins

Delivery and ops

Ethereal SMTP + IMAP
Fake mailboxes for sending and the mailbox check
Slack OAuth
Alerts when a sending limit is reached
AWS EC2, Docker Compose, Caddy
Production with automatic HTTPS

My part

What I built.

  • Built a full-stack email scheduler on BullMQ delayed jobs with no cron, surviving restarts through Redis AOF and a startup repair from Postgres.
  • Guaranteed no double sends with a job id per email, an atomic database claim and a Message-ID mailbox check after crashes.
  • Enforced per-sender and global hourly limits across many workers with a Redis Lua script, delaying overflow in order instead of dropping it.
  • Deployed it on AWS EC2 with Docker Compose and Caddy, behind Google login, encrypted secrets and an append-only audit trail.

Next project

Zenith

Hiring for backend, forward-deployed or GPU work? Let’s talk.

saxena.shikhar1808@gmail.com