What if your inbox felt like a messaging app? ConverseMail turns your Gmail threads into a clean, real-time chat interface — so you can read and reply to emails just like you would on WhatsApp.
- Connect your Gmail account via OAuth2
- Only contacts listed in
ALLOWED_CONTACTSappear in the sidebar — no inbox scanning - Click a contact to see all threads, click a thread to open the chat
- Each email is rendered as a chat bubble (sent/received)
- Reply directly from the chat UI — replies stay threaded properly in Gmail
- Polls for new messages every 5s (active thread) / 15s (contacts & thread list)
- Columns are resizable (drag the handles between them)
- Go to https://console.cloud.google.com/apis/credentials
- Create an OAuth 2.0 Client ID (Web application)
- Add
http://localhost:3001/auth/google/callbackto authorized redirect URIs - Enable the Gmail API: https://console.cloud.google.com/apis/library/gmail.googleapis.com
cd backend
cp .env.example .env
Edit .env with your Google OAuth credentials, then generate secure keys:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
Put the output as SESSION_SECRET and ENCRYPTION_KEY.
ALLOWED_CONTACTS is required — set it to the emails you want to chat with:
ALLOWED_CONTACTS=friend@example.com,colleague@example.com
npm install
npm run dev
cd frontend
npm install
npm run dev
Open http://localhost:5173 — on first login a loading screen syncs your messages before showing the chat UI.
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REDIRECT_URI=http://localhost:3001/auth/google/callback
SESSION_SECRET= # crypto.randomBytes(32).toString('hex')
ENCRYPTION_KEY= # crypto.randomBytes(32).toString('hex')
FRONTEND_URL=http://localhost:5173
ALLOWED_CONTACTS= # required — comma-separated list of allowed emails
PORT=3001
DB_PATH=./data/conversemail.db
MAX_THREADS=100 # optional — max threads to fetch per contact
PUBSUB_TOPIC= # optional — Gmail push notification topic
ConverseMail/
├── backend/
│ ├── src/
│ │ ├── auth/ OAuth2 flow, token encryption
│ │ ├── gmail/ Gmail API client & email parser
│ │ ├── db/ SQLite schema & migrations
│ │ ├── routes/ Express route handlers
│ │ └── server.js Entry point, ALLOWED_CONTACTS validation
│ ├── .env
│ └── package.json
├── frontend/
│ ├── src/
│ │ ├── components/ ChatBubble, Sidebar, ThreadList, MessageInput
│ │ ├── pages/ ChatView, LoginPage
│ │ ├── services/ API client
│ │ ├── App.jsx Three-column layout, login → sync → chat flow
│ │ └── main.jsx
│ └── package.json
├── .gitignore
└── README.md
Frederic Uhrweiller