whatisgithub

What is mail-box?

prashant4900/mail-box — explained in plain English

Analysis updated 2026-05-18

17TypeScriptAudience · developerLicenseSetup · moderate

In one sentence

A self-hosted email client that routes incoming mail through Cloudflare Email Routing into a real-time Next.js dashboard.

Mindmap

mindmap
  root((mail-box))
    What it does
      Self-hosted email client
      Cloudflare routing integration
      Real-time dashboard
    Tech stack
      Next.js
      Prisma
      Cloudflare Workers
    Use cases
      Team inbox self-hosting
      Custom email workflows
      Multi-database flexibility
    Architecture
      Repositories layer
      Services layer
      Query bridge layer
    License
      Business Source License

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Self-host a team email inbox that receives mail routed through your own Cloudflare domain.

USE CASE 2

Build a custom support or ticketing-style email workflow on top of a real database instead of IMAP.

USE CASE 3

Swap between SQLite, PostgreSQL, and MySQL for local development versus production deployment.

USE CASE 4

Deploy a self-managed alternative to a hosted email service on your own Vercel or Docker setup.

What is it built with?

Next.jsPrismaTypeScriptCloudflare WorkersReact Query

How does it compare?

prashant4900/mail-box5uck1ess/ciceroaaglexx/mcp-man
Stars171717
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasy
Complexity2/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Needs a Cloudflare account and domain for the email routing integration to work.

So what is it?

Mailbox is a self-hosted email client and management platform built on Next.js and Prisma. It sits between your Cloudflare-managed domain and your own users, automatically setting up mailboxes and routing rules so incoming email on your domain shows up inside a real-time dashboard rather than a traditional inbox. When someone sends an email to an address on your domain, Cloudflare's Email Routing service catches it, matches it against a Worker script, and forwards the raw message to a webhook inside the Mailbox application. The app parses that message, verifies the recipient, saves the email thread to a database, and the dashboard updates automatically for anyone viewing it, using React Query to refetch data. Sending outgoing email is handled separately, through your own SMTP settings configured in the environment file, since the Cloudflare integration only covers receiving. The codebase follows a strict four-layer structure: a repositories layer that only talks to the database through Prisma, a services layer that holds the actual business logic and authorization rules, a query layer that bridges the backend to React Query hooks, and a components and pages layer that is presentation only, with no direct database access allowed. Shared TypeScript types live in one central file, and every icon used in the app is registered in a central icon registry rather than imported ad hoc. Mailbox supports SQLite for quick local development, or PostgreSQL and MySQL through Docker for more production-like testing, and it can also connect to serverless Postgres providers like Neon or Supabase. It ships with a Docker setup for self-hosting and documented steps for deploying to Vercel. The project is licensed under the Business Source License.

Copy-paste prompts

Prompt 1
Explain how incoming email flows from Cloudflare Email Routing into this Mailbox dashboard.
Prompt 2
Walk me through setting up the .env file and running this with SQLite for local development.
Prompt 3
Show me how the repositories, services, queries, and components layers are separated in this codebase.
Prompt 4
Help me configure Cloudflare Email Routing to forward mail to this app's webhook endpoint.

Frequently asked questions

What is mail-box?

A self-hosted email client that routes incoming mail through Cloudflare Email Routing into a real-time Next.js dashboard.

What language is mail-box written in?

Mainly TypeScript. The stack also includes Next.js, Prisma, TypeScript.

How hard is mail-box to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is mail-box for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.