How zayonx-0/chatisen works
ChatISEN is a real-time chat product with two runtime profiles: a local standalone server and a Compose target built around a TypeScript API and PostgreSQL. The main user journey is account access, finding or creating a conversation, sending messages, and receiving updates; group conversations and call signaling are additional stages. The graph separates those domain stages from persistence, transport, and client layers. The README documents more Compose integrations than the excerpts verify, so LiveKit is shown as optional and unverified; the Compose profile’s full operation is not demonstrated.
Main entry points: server.ts Fastify entry · postgres-routes.ts Identity and sessions · postgres.ts Postgres repository · server.mjs Local server
Components 20
Standalone profile
- Local server
apps/standalone/server.mjs - Push delivery
apps/standalone/push.mjs
Compose API
- Fastify entry
apps/api/src/server.ts - Identity and sessions
apps/api/src/identity/postgres-routes.ts - Conversation and messages
apps/api/src/chat/postgres-routes.ts - Group operations
apps/api/src/chat/group-operations.ts - Call signaling
apps/api/src/calls/postgres-routes.ts - WebSocket events
apps/api/src/chat/postgres-websocket.ts - Password and CSRF
apps/api/src/security.ts - API metrics
apps/api/src/metrics.ts
Persistence
- Postgres repository
apps/api/src/repositories/postgres.ts - Memory store
apps/api/src/store.ts - PostgreSQL
db/migrations/001_initial.sql
Clients
- Compose web client
apps/web/src/main.tsx - Standalone web client
apps/web/public/app.js - Browser notifications
apps/web/public/sw.js
Realtime integrations
- LiveKit service
- Peer WebRTC
Other components
- Chat participant
- Browser
Connections 30
- Chat participant → Browser: uses
README.md - Browser → Standalone web client: loads
README.md - Browser → Compose web client: uses
README.md - Standalone web client → Local server: requests
README.md - Compose web client → Fastify entry: requests
README.md - Local server → Push delivery: creates
apps/standalone/server.mjs - Local server → Standalone web client: serves
apps/standalone/server.mjs - Local server → Peer WebRTC: signals calls
README.md - Fastify entry → Identity and sessions: registers
apps/api/src/server.ts - Fastify entry → Conversation and messages: registers
apps/api/src/server.ts - Fastify entry → WebSocket events: registers
apps/api/src/server.ts - Fastify entry → Call signaling: registers
apps/api/src/server.ts - Fastify entry → Postgres repository: creates
apps/api/src/server.ts - Fastify entry → Memory store: uses
apps/api/src/server.ts - Fastify entry → Password and CSRF: uses
apps/api/src/server.ts - Fastify entry → API metrics: records
apps/api/src/server.ts - Identity and sessions → Postgres repository: reads/writes
apps/api/src/identity/postgres-routes.ts - Identity and sessions → Password and CSRF: hashes and checks
apps/api/src/identity/postgres-routes.ts - Conversation and messages → Postgres repository: reads/writes
apps/api/src/chat/postgres-routes.ts - Conversation and messages → Group operations: uses
apps/api/src/chat/postgres-routes.ts - Conversation and messages → Identity and sessions: authenticates with
apps/api/src/chat/postgres-routes.ts - Call signaling → Postgres repository: reads/writes
apps/api/src/calls/postgres-routes.ts - Call signaling → Identity and sessions: authenticates with
apps/api/src/calls/postgres-routes.ts - WebSocket events → Postgres repository: reads events
apps/api/src/chat/postgres-websocket.ts - WebSocket events → Identity and sessions: authenticates with
apps/api/src/chat/postgres-websocket.ts - Postgres repository → PostgreSQL: queries
- Local server → PostgreSQL: stores separately
- Push delivery → Browser: sends notifications
apps/standalone/push.mjs - Browser notifications → Browser: displays notifications
- Call signaling → LiveKit service: optional media