✉️ Mail-Wise — Open-Source AI Email Composer & Cold Outreach SaaS (Free Lavender AI / Reply.io Alternative)
Generate high-conversion business emails, cold outreach pitches, and follow-ups in seconds. A production-ready, self-hostable Next.js SaaS boilerplate with template presets, tone & language controls, one-click mail dispatch, and built-in Stripe billing. A free open-source alternative to Lavender AI, Reply.io, Mailmodo, Superhuman AI, and Instantly.ai — powered by the MuAPI AI engine.
Tech stack: Next.js 14 (App Router) · Prisma · PostgreSQL · NextAuth (Google OAuth) · Stripe · Tailwind CSS · MuAPI any-llm Use cases: Sales outreach teams · Cold email marketers · Freelancers · Recruiters · SaaS growth teams · Agency account managers · B2B founders · Business development reps
Hosted Demo: mail-wise-khaki.vercel.app
Experience the full glassmorphic, responsive interface. Sign in with Google to explore the Studio, customize dropdowns (Language, Length, Tones, and Presets), and preview your high-converting business copies directly from your browser.
Mail-Wise is a production-ready, highly-optimized AI web application. Out of the box, it seamlessly manages User Authentication, Credits & Billing, Creations Persistence, and asynchronous AI generation polling using a sleek Next.js (App Router) architecture. It empowers you to build professional-grade AI workflows with built-in mobile optimization, making it the perfect starting point for your next AI SaaS.
Why use Mail-Wise?
- Production-Ready SaaS — Complete with Google OAuth and Stripe Checkout workflows built-in.
- Studio Control Center — Customize dropdowns for template presets, tone of voice, language translation, and character constraints.
- Tactile Toggle Controls — Replace generic checkboxes with beautiful, sliding pill switches transitioning smoothly from charcoal to active brand colors.
- Real Dispatch Intents — One-click integration with your local mail application pre-populated with subject lines and email copy.
- Responsive UX — Dynamic sliding dropdowns, micro-animations, and complete mobile-stacked responsiveness.
- Kinetic Studio Panel — Input topics in an expanding textarea, specify target recipients, select tones, and toggle advanced settings (Include CTA, Suggest Subjects).
- Custom Dropdowns — Sleek custom selectors featuring Chevron down/up animations, absolute overlays, and
overscroll-containwheel scroll-chaining preventions. - Upward-Opening Dropdowns — Configured dropdown lists positioned near view limits to open upwards, avoiding parent viewport boundaries.
- History Archive — A persistent gallery with complete modal detail views, subject lists, body copy, and updates.
- Credit Tiers & Billing — Complete Stripe integration. Deduct 4 credits ($0.02) per generated post and route users to price tier panels (Basic, Standard, Pro, Business) to buy bundles.
Deploying an instance of Mail-Wise to the web requires minimal configuration. The architecture is engineered explicitly for Vercel serverless environments.
Pro Tip: Fork this repository, replace
YOUR_GITHUB_USERin the link above, to streamline deployments for your private forks.
To successfully deploy and run, you must populate the following environment variables in your Vercel project settings:
| Service | Variable | Description & Source |
|---|---|---|
| Database | DATABASE_URL |
PostgreSQL connection string (Supabase shared pool with pgbouncer) |
DIRECT_URL |
Direct DB connection for Prisma migrations and pushes | |
| NextAuth / Google | NEXTAUTH_SECRET |
Secure random string generated via openssl rand -base64 32 |
NEXTAUTH_URL |
Your production domain (e.g. https://mail-wise-khaki.vercel.app) |
|
GOOGLE_CLIENT_ID |
Get from Google Cloud Console | |
GOOGLE_CLIENT_SECRET |
Get from Google Cloud Console | |
| Stripe Billing | STRIPE_SECRET_KEY |
Get from Stripe Dashboard |
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY |
Get from Stripe Dashboard | |
STRIPE_WEBHOOK_SECRET |
Webhook secret for resolving credit purchases | |
| AI Generator | MU_API_KEY |
Create an account and get key from muapi.ai/access-keys |
WEBHOOK_URL |
Callback URL for receiving slow-running generation events |
Ready to iterate locally? Setup is straightforward.
- Node.js (v18 or higher)
- A local PostgreSQL instance or a free cloud Database URL.
# 1. Clone the repository
git clone https://github.com/SamurAIGPT/mail-wise
cd mail-wise
# 2. Install dependencies
npm install
# 3. Setup Environment
cp .env.example .env
# Open .env and insert your specific keys. You can use a local DB or your dev cloud DB.
# 4. Initialize Database Schema
npx prisma generate
npx prisma db push
# 5. Start the Development Server
npm run devThe graphical console should now be heavily responsive on http://localhost:3000.
⚠️ Database Safety Warning: This application shares a single PostgreSQL database instance on Supabase with other applications in this workspace. Follow the cycle below to synchronize models safely:
- Pull all existing tables:
npx prisma db pull(introspects all active tables)- Declare relation changes: Inject the
EmailCreationmodel in your localschema.prismaand link it inside theUsermodel.- Push to database: Run
npx prisma db pushto merge changes safely.- Local Schema Cleanup: Strip away other applications' models from your local
schema.prisma, leaving onlyAccount,Session,User,VerificationToken, andEmailCreation.- Compile local client: Run
npx prisma generateto build your local Prisma client.
This application decouples visually rich UI elements from core business logic layers, emphasizing modularization.
mail-wise/
├── prisma/
│ └── schema.prisma # Postgres tables: Users, Accounts, EmailCreations
├── src/
│ ├── app/ # Next.js 16 App Router
│ │ ├── api/ # Backend API Routes (Stripe, MuAPI LLM, Auth)
│ │ │ ├── auth/ # NextAuth catch-all routes
│ │ │ ├── billing/ # Stripe Checkout session builders and webhook listeners
│ │ │ └── creations/ # Creations database fetch and POST polling endpoints
│ │ ├── gallery/ # Detailed css grid completed email drafts gallery
│ │ ├── pricing/ # Interactive packaging tier checkout selection page
│ │ ├── layout.js # Head assets and metadata
│ │ ├── globals.css # Styling system theme and gradients
│ │ └── page.js # Main Studio generation and social preview interface
│ ├── components/
│ │ ├── Navbar.jsx # Collapsible responsive navigation component
│ │ ├── CustomToggle.jsx # Custom sliding toggle pill switch
│ │ └── CustomSelect.jsx # Sleek custom dropdown options select card
│ └── lib/
│ ├── prisma.js # Shared ORM client singleton
│ ├── auth.js # Google OAuth callback options
│ ├── config.js # Platform metadata and price tiers
│ └── services/
│ ├── user.js # Credit adjustment database hooks
│ ├── billing.js # Stripe construction services
│ └── ai.js # MuAPI predictions submissions and fallback mocks
├── next.config.mjs # Next Configuration
├── package.json
MIT Licensed.
Mail-Wise: A modular, mobile-ready, production-grade AI email copywriting application engine built for creators and builders.
