EnterChat: An Open-Source End-to-End Encrypted Messaging Platform
说明与用途
EnterChat 是一个自托管的消息平台,具备客户端 X3DH 类似的端到端加密、基于 Node.js/TypeScript 的六边形架构 API 网关以及 PostgreSQL 后端,涵盖完整的聊天功能。
问题
Building a secure messenger that keeps message contents unreadable by the server while supporting real‑time delivery, offline queuing, media, payments, and moderation.
结果
EnterChat delivers a fully functional, self‑hostable messenger with end‑to‑end encryption, real‑time messaging, media handling, payments, and moderation, all backed by a clean architecture and comprehensive database migrations.
工作流
- Set up Docker environment and run postgres/redis containers
- Install backend dependencies and start API gateway (REST on :3000, WebSocket on :3001)
- Install Flutter dependencies and run the mobile app
- Use phone number + OTP flow for authentication
- Send encrypted messages via WebSocket with idempotent clientMessageId
- Receive real‑time updates and delivery receipts
- Upload media via presigned S3 URLs
- Process payments through Razorpay/Stripe
- Moderate content and manage blocked contacts
证据
EnterChat is a complete, self-hostable messaging platform — a Flutter mobile app, a Node.js/TypeScript API gateway, and a PostgreSQL backend — built with real end-to-end encryption (X25519 key exchange + AES-256-GCM)
The standout file is lib/core/security/e2e_crypto_engine.dart (~11KB). It implements an X3DH-inspired key exchange
The API gateway is a Node.js/TypeScript backend built on Express with a hexagonal architecture
The database: 19 migrations covering users, devices, sessions, contacts, chats, partitioned messages, media, groups, calls, notifications, audit logs, OTP verifications, social features, push tokens, delivery receipts and E2EE key-bundle tables, and payments/monetization
- 记录日期: 2026-10-12T22:56:00.754Z