Skip to content

trinathone/humanize-mail

Repository files navigation



██╗  ██╗██╗   ██╗███╗   ███╗ █████╗ ███╗   ██╗██╗███████╗███████╗
██║  ██║██║   ██║████╗ ████║██╔══██╗████╗  ██║██║╚══███╔╝██╔════╝
███████║██║   ██║██╔████╔██║███████║██╔██╗ ██║██║  ███╔╝ █████╗  
██╔══██║██║   ██║██║╚██╔╝██║██╔══██║██║╚██╗██║██║ ███╔╝  ██╔══╝  
██║  ██║╚██████╔╝██║ ╚═╝ ██║██║  ██║██║ ╚████║██║███████╗███████╗
╚═╝  ╚═╝ ╚═════╝ ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝╚═╝╚══════╝╚══════╝
███╗   ███╗ █████╗ ██╗██╗     
████╗ ████║██╔══██╗██║██║     
██╔████╔██║███████║██║██║     
██║╚██╔╝██║██╔══██║██║██║     
██║ ╚═╝ ██║██║  ██║██║███████╗
╚═╝     ╚═╝╚═╝  ╚═╝╚═╝╚══════╝

Your AI draft. Human voice. Zero robot residue.


Live Demo


> what is this

You write an email. AI helps you draft it. Then it comes out sounding like a language model wrote it — and everyone can tell.

HumanizeMail fixes that. Paste your draft, pick a voice, get back something that sounds like you actually typed it at 2pm between meetings.

- "I hope this email finds you well. I wanted to reach out and explore 
-  potential synergies and delve into ways we could collaborate going forward."

+ "Hope you're doing well — wanted to see if there's something worth 
+  building together here."

> features

🎭 3 Tone Presets

  • Subtle — light cleanup, keeps your structure
  • Human — sounds like a real person wrote it
  • CEO — ultra-short, sent-from-iPhone energy

⚡ Smart Controls

  • Strength slider — Light / Balanced / Aggressive
  • Target length — compress down to 30%
  • Keyboard shortcut — ⌘↵ to humanize instantly

🔍 Diff Highlighting

Changed words highlighted in yellow so you can see exactly what the AI touched.

📜 Local History

Last 20 rewrites saved in your browser. Fully restorable. Nothing sent to a server.


> provider chain

No single point of failure. If one provider is rate-limited, it automatically tries the next:

Request
   │
   ├─▶  Groq (llama-3.3-70b)        ← fastest
   │         │ quota hit?
   ├─▶  OpenRouter (llama-3.3-70b)  ← fallback
   │         │ quota hit?
   └─▶  Gemini (gemini-2.0-flash)   ← last resort

> stack

Layer Tech
Frontend React 18 + Vite 5
Styling CSS variables, dark/light via system preference
API Vercel Serverless Functions (Node.js)
LLMs Groq → OpenRouter → Gemini (auto-fallback)
Auth HttpOnly cookie, 7-day session
Storage localStorage only — no database

> run locally

# 1. Clone
git clone https://github.com/trinathone/humanize-mail
cd humanize-mail

# 2. Install
npm install

# 3. Configure — copy and fill in at least one key
cp .env.example .env.local

# 4. Start API server + frontend
node dev-server.js &   # API on :3000
npm run dev            # Vite on :5173

Open http://localhost:5173

.env.local options

# ── Option A: Groq (recommended, free, fast) ──────────────────────────
GROQ_API_KEY=gsk_...          # console.groq.com

# ── Option B: OpenRouter ──────────────────────────────────────────────
OPENROUTER_API_KEY=sk-or-...  # openrouter.ai

# ── Option C: Gemini ──────────────────────────────────────────────────
GEMINI_API_KEY=AIza...        # aistudio.google.com/app/apikey

# ── Option D: Ollama (fully local, no internet) ───────────────────────
LLM_PROVIDER=ollama
OLLAMA_MODEL=llama3.1
OLLAMA_URL=http://localhost:11434

> deploy your own

# 1. Fork this repo, then:
npm i -g vercel
vercel --prod

# 2. Set env vars in Vercel dashboard:
#    GROQ_API_KEY, OPENROUTER_API_KEY, or GEMINI_API_KEY
#    APP_PASSWORD  (optional — locks the app with a password)

Deploy with Vercel


> file structure

humanize-mail/
├── api/
│   ├── rewrite.js     # LLM provider chain (Groq → OpenRouter → Gemini)
│   └── auth.js        # Password gate (httpOnly cookie)
├── src/
│   ├── App.jsx        # Full UI + password gate component
│   ├── main.jsx       # React entry
│   └── styles.css     # CSS variables, animations, dark/light theme
├── dev-server.js      # Local dev API server (no Vercel CLI needed)
├── .env.example       # All supported env vars
├── vercel.json        # Routing config
└── vite.config.js     # Vite + proxy config

> roadmap

  • Telegram bot — same rewrite logic via webhook
  • Share links — short URL for a specific rewrite
  • Custom tone presets — save your own voice to localStorage
  • Browser extension — popover on any text field

Built by Neo · Deployed on Vercel

Drafts never leave your device unless you click Humanize. No logs, no database, no tracking.

About

AI email rewriter — strips the robot out of your drafts. Groq + OpenRouter + Gemini fallback chain.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors