Skip to content

Repository files navigation

📧 Email Command Center

A unified dashboard for managing all your Gmail accounts in one place. Built with Next.js 14+, TypeScript, and Tailwind CSS.

Next.js TypeScript Tailwind CSS

✨ Features

📊 Dashboard

  • Stats Cards - Total unread, urgent count, connected accounts, inbox zero progress
  • Account Overview - All 7 accounts with individual stats
  • Unified Inbox - All emails in one place, sorted by urgency

📬 Email Management

  • Archive - One-click archive
  • Mark as Read - Quickly mark emails as read
  • Star/Unstar - Flag important emails
  • Urgent Detection - Auto-flags urgent emails based on keywords
  • VIP Senders - Highlights emails from important senders

🎨 UI/UX

  • Dark Mode - Toggle between light and dark themes
  • Color-coded Accounts - Each account has a unique color
  • Real-time Updates - Auto-refreshes every minute
  • Responsive Design - Works on desktop and mobile

📝 Daily Digest

  • API Endpoint - /api/digest generates formatted summary
  • Stats Overview - Unread, urgent, needs reply
  • Per-Account Breakdown - Status of each account
  • Ready for Automation - Use with cron or chatbot

🚀 Quick Start

Prerequisites

  • Gmail OAuth credentials in /home/ubuntu/clawd/gmail/credentials.json
  • Account tokens in /home/ubuntu/clawd/gmail/tokens/

Development

npm install
npm run dev

Open http://localhost:3000

Production (Docker)

docker-compose up --build

📁 Project Structure

email-command-center/
├── app/
│   ├── page.tsx              # Main dashboard
│   ├── layout.tsx            # Root layout
│   └── api/
│       ├── accounts/         # Account stats
│       ├── emails/           # Email list & actions
│       └── digest/           # Daily digest
├── components/
│   ├── AccountCard.tsx       # Account selector
│   ├── EmailRow.tsx          # Email list item
│   ├── StatsCards.tsx        # Dashboard stats
│   └── ThemeToggle.tsx       # Dark mode
├── lib/
│   └── gmail/
│       ├── client.ts         # Gmail API client
│       └── config.ts         # Accounts & keywords
├── types/
│   └── email.ts              # TypeScript types
├── Dockerfile
└── docker-compose.yml

🔌 API Endpoints

GET /api/accounts

Returns stats for all configured accounts.

GET /api/emails

Query params:

  • account - Account ID or 'all' (default: 'all')
  • limit - Max emails to return (default: 10)

PATCH /api/emails/[id]

Body:

{
  "accountId": "admin",
  "action": "archive" | "read" | "star" | "unstar"
}

GET /api/digest

Returns formatted daily digest for all accounts.

⚙️ Configuration

Accounts

Edit lib/gmail/config.ts to add/remove accounts.

Urgent Keywords

const URGENT_KEYWORDS = [
  'urgent', 'asap', 'important', 'deadline', ...
];

VIP Senders

const VIP_SENDERS = [
  '@anthropic.com', '@stripe.com', ...
];

📜 License

MIT


🐾 Built by Klawd for Alex

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages