All work
Case study 03 07
MailFlow — Enterprise Multi-Provider Email & Workflow Platform
A high-throughput unified inbox for Google Workspace, Microsoft 365, and IMAP accounts, with five-tier RBAC and strict tenant isolation.
- Client
- B2B SaaS platform
- Role
- Full-Stack Software Engineer & Backend Architect
- Next.js (App Router)
- NestJS
- TypeScript
- PostgreSQL
- Prisma ORM
- IMAPFlow
- Tailwind CSS
Outcomes
- RBAC: Super Admin, Admin, Manager, Sales, Support
- 5-tier
- High-concurrency message intake without stalling the Node.js event loop
- Strict tenant and role isolation across all inbox communications
- Optimistic UI updates for zero-lag folder triage and mail search
The problem
Sales and support teams switch constantly between Google Workspace, Microsoft 365, and IMAP accounts. That context switching risks dropped leads — and scattered access risks data leaks.
The approach
I engineered an asynchronous, high-throughput mail client that unifies multi-provider accounts into a single inbox.
- Non-blocking background synchronisation with IMAPFlow keeps intake off the request path.
- A five-tier RBAC system (Super Admin, Admin, Manager, Sales, Support) with rotating JWT refresh tokens.
- PgBouncer connection pooling in front of PostgreSQL to hold up under concurrent sync workers.
- Optimistic UI in the Next.js client so triage and search feel instant.
Need something similar?
Open to contract, freelance & contract-to-hire — 30+ hrs/week.