git404hub

what is mail-box fr?

prashant4900/mail-box — explained in plain English

Analysis updated 2026-05-18

17TypeScriptAudience · developerLicenseSetup · moderate

tl;dr

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

vibe map

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 make with this?

VIBE 1

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

VIBE 2

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

VIBE 3

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

VIBE 4

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

what's the stack?

Next.jsPrismaTypeScriptCloudflare WorkersReact Query

how it stacks up fr

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 i run it?

Difficulty · moderate time til it works · 30min

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

in plain english

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.

prompts (copy fr)

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 fr?

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.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.