pgx
PGX — Lightweight Postgres for AI agents. Written in Rust. Thousands of isolated databases in one runtime. 🐘
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证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.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 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: