A place for your thoughts. Powered by email.
MailSocial lets you post by sending emails. Send an email to your unique address, and the subject becomes a post on your handle. Private or public, personal or shared—just your thoughts, captured without friction.
- Frontend & Backend: Next.js 15 (App Router) with TypeScript
- Hosting: Cloudflare Workers with OpenNext
- Database: Cloudflare D1 (SQLite)
- ORM: Drizzle ORM
- Authentication: Better Auth (passwordless OTP via email)
- Email Service: Resend (transactional emails & OTP delivery)
- Email Routing: Cloudflare Email Worker
- Payments: DodoPayments (one-time $10 Forever Plan)
- UI: Tailwind CSS + Radix UI
- User purchases access via DodoPayments checkout
- Webhook handler processes payment and sends confirmation email
- User signs in with email OTP authentication
- System generates unique secret email address (e.g.,
username.abc123@mailsocial.sudipbiswas.dev) - User sends email to that address—subject line becomes a post
- Cloudflare Email Worker intercepts email and POSTs to Next.js API
- Post appears on user's profile page
- Node.js 18+ and pnpm
- Cloudflare account (for D1 database and email routing)
- Resend API key
- DodoPayments account
- Clone the repository:
git clone https://github.com/sudipbuilds/mailsocial.git
cd mailsocial- Install dependencies:
pnpm install- Copy environment variables:
cp .env.example .env-
Fill in your
.envwith required credentials (see.env.examplefor required variables) -
Run database migrations:
pnpm run db:migrate- Start development server:
pnpm devVisit http://localhost:3000
pnpm run previewpnpm run deploy- Email Worker: mailsocial-email-worker - Cloudflare Email Worker that handles incoming emails
Production: mailsocial.sudipbiswas.dev
- Email-to-post publishing (subject line only)
- Passwordless authentication with OTP
- One-time payment ($10 Forever Plan)
- Public or private profiles
- Username-based URLs
- Webhook-driven order processing
- Automated transactional emails
Built with ❤️ by Sudip Biswas