chat-schema
v0.10.0
Published
Shared Zod schemas + TypeScript types for the centralised chat system (text + audio + video) across all Jansathi product surfaces.
Maintainers
Readme
chat-schema
Shared Zod schemas and TypeScript types for the centralised Jansathi chat system.
Single source of truth consumed by:
chat-server(Node.js WebSocket + REST server holding live chat connections)reform-backend(REST endpoints for conversation lifecycle, abuse reports, push subscriptions)- All product frontends (
jansathi-frontend,ghf-npo,ufh-frontend,survey-frontend)
Covers:
- Conversations (1:1 DM, group, community thread)
- Messages (text, image, voice, video, file, shared listing, system, call log)
- Typing indicators and presence
- Delivery + read receipts (WhatsApp-parity double-tick semantics)
- WebRTC call signalling (offer / answer / ICE candidate / hangup) for 1:1 audio + video
- Web Push subscriptions and payloads
- Socket.io event name constants and payload schemas
- REST request / response schemas for the chat module on reform-backend
Install
npm install chat-schemaLicense
MIT
