pgx
PGX — Lightweight Postgres for AI agents. Written in Rust. Thousands of isolated databases in one runtime. 🐘
Translation pending
Enterprise Email Analytics Dashboard
Translation pending
DataTypeScript · CSSGitHub @VaibhavYadav1409OnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Enterprise email management platform — Node/Express/Prisma backend, Next.js admin dashboard, and a Vite/React (Electron-capable) employee app, unified in a pnpm monorepo.
Taken from the repository README
Loading the full README.
Read the full README ↗A comprehensive, enterprise-grade email management system combining a robust backend infrastructure with a modern, feature-rich employee application and administrative dashboard.
MailPilot Enterprise is a monorepo project consisting of three main components:
mailpilot-enterprise/
├── backend/ # Express + Prisma + PostgreSQL backend
│ ├── src/
│ │ ├── routes/ # API endpoints (auth, emails, analytics, etc.)
│ │ ├── services/ # Business logic (Gmail sync, AI pipeline, etc.)
│ │ ├── middleware/ # Auth, RBAC middleware
│ │ ├── lib/ # Utilities (crypto, db, JWT, LLM)
│ │ └── server.ts # Express app entry point
│ ├── prisma/
│ │ └── schema.prisma # Database schema
│ └── package.json
│
├── admin-dashboard/ # Next.js admin interface
│ ├── src/
│ │ ├── app/ # Next.js app directory
│ │ ├── components/ # React components
│ │ ├── services/ # API integration
│ │ └── store/ # State management
│ └── package.json
│
├── employee-app/ # Modern React employee application (Project 2)
│ ├── src/
│ │ ├── components/ # UI components (shadcn/ui based)
│ │ ├── pages/ # Page components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── lib/ # Utilities and API client
│ │ ├── contexts/ # React contexts (theme, etc.)
│ │ └── main.tsx # React entry point
│ ├── index.html
│ └── package.json
│
├── shared/ # Shared types and constants
│ ├── types.ts # TypeScript type definitions
│ ├── const.ts # Shared constants
│ └── _core/errors.ts # Error definitions
│
├── pnpm-workspace.yaml # pnpm workspace configuration
└── package.json # Root package.json
Clone and Install Dependencies
cd mailpilot-enterprise
pnpm install
Configure Environment Variables
# Backend
cp backend/.env.example backend/.env
# Admin Dashboard
cp admin-dashboard/.env.example admin-dashboard/.env
# Employee App
cp employee-app/.env.example employee-app/.env
Set Up Database
# Generate and apply migrations
pnpm db:push
# Seed with demo data (optional)
pnpm db:seed
Start Development Servers
# Start all services
pnpm dev
# Or start individual services
pnpm -C backend dev
pnpm -C admin-dashboard dev
pnpm -C employee-app dev
Access Applications
This project runs against a plain Postgres connection string, so it works as-is with Neon:
DATABASE_URL in backend/.env, e.g.:
DATABASE_URL="postgresql://<user>:<password>@<host>/<db>?sslmode=require"
pnpm -C backend prisma:generate
pnpm db:push
pnpm db:seed
No Docker or local Postgres install is required — every service (backend,
admin-dashboard, employee-app) runs directly with pnpm dev / pnpm build
/ pnpm start as shown above.
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/mailpilot
# JWT
JWT_SECRET=your-super-secret-key-min-32-chars
# Gmail OAuth
GOOGLE_CLIENT_ID=your-client-id
GOOGLE_CLIENT_SECRET=your-client-secret
# Email Service
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
[email protected]
SMTP_PASSWORD=your-app-password
# Analytics
ANALYTICS_ENABLED=true
# Node
NODE_ENV=development
PORT=3000
NEXT_PUBLIC_API_URL=http://localhost:3000
NEXT_PUBLIC_APP_NAME=MailPilot Admin
VITE_API_URL=http://localhost:3000
VITE_APP_TITLE=MailPilot
POST /api/auth/login - Login with email and passwordPOST /api/auth/logout - LogoutGET /api/auth/me - Get current userPOST /api/auth/refresh - Refresh JWT tokenGET /api/emails - List emails (with pagination)GET /api/emails/:id - Get email detailsPOST /api/emails/sync - Sync emails from GmailPOST /api/emails/:id/reply - Send replyPOST /api/emails/:id/summary - Generate summaryPOST /api/emails/:id/suggested-reply - Generate suggested replyPATCH /api/emails/:id - Update email (mark read, star, trash, etc.)GET /api/gmail/status - Check Gmail connection statusPOST /api/gmail/connect - Initiate Gmail OAuth flowPOST /api/gmail/disconnect - Disconnect Gmail accountGET /api/analytics/dashboard - Get dashboard metricsGET /api/analytics/reports - Get analytics reportsGET /api/analytics/leaderboard - Get employee leaderboard# Run all tests
pnpm test
# Run tests in watch mode
pnpm -C backend test --watch
# Run specific test file
pnpm -C backend test auth.test.ts
# Type check
pnpm check
# Format code
pnpm format
# Lint (if configured)
pnpm lint
# Create new migration
pnpm -C backend prisma:migrate
# View migrations
pnpm -C backend prisma studio
# Build all services
pnpm build
# Start production servers
pnpm start
The project follows a monorepo structure with clear separation of concerns:
All components communicate through well-defined APIs and share common types defined in the shared directory.
# Check database connection
psql $DATABASE_URL
# Reset database
pnpm -C backend prisma:migrate reset
# Find and kill process using port
lsof -i :3000
kill -9 <PID>
# Clear cache and reinstall
pnpm clean
pnpm install
pnpm testMIT License - See LICENSE file for details
For issues and questions: