
ZynChat
Real-time mobile chat app with secure auth, friend graph workflows, instant messaging, presence/typing indicators, and offline push notifications.
Technology Stack
Key Challenges
- Mobile Session Auth + Socket Handshake
- Friend-only Conversation Authorization
- Unread Count Consistency
- Presence and Typing Reliability
- Offline Push Notification Delivery
- Optimistic UI + Server State Reconciliation
Key Learnings
- Event-driven Chat Architecture with Socket.IO
- Cookie-based Session Handling in Mobile Apps
- Prisma Modeling for Friend Graph + Messages
- Read Receipts and Unread Counter Design
- Expo Notification Categories and Actions
- React Query Cache Strategy for Realtime UX
ZynChat: Real-Time Mobile Chat App
Overview
ZynChat is a full-stack mobile chat app focused on reliable real-time messaging between authenticated friends. It combines secure session-based authentication, friend discovery/request flows, Socket.IO-powered chat, typing and presence indicators, and Expo push notifications for offline delivery.
Built as a monorepo: Expo React Native frontend + Bun/Express backend with Prisma and PostgreSQL.
Impact
- Enabled instant one-to-one messaging for accepted friends
- Built complete friend workflow: discover, send request, accept/reject/cancel, chat
- Improved engagement with live presence + typing signals
- Reduced missed messages using push notifications when users are offline
- Maintained smoother UX with unread count sync + read receipt updates across screens
Key Features
- Authentication: Better Auth email/password with protected app routes
- Friend Graph: Relationship-aware discover screen (
NONE,FRIEND,REQUEST_SENT,REQUEST_RECEIVED) - Real-Time Messaging: Socket rooms for private conversations with server-side friend checks
- Presence + Typing: Online/offline status and live typing events
- Unread Management: Conversation-level unread badges + mark-as-read flow
- Push Notifications: New message/friend request pushes, plus action buttons (accept/reject/reply)
Technical Highlights
- Deterministic conversation room IDs from sorted user IDs
- Socket authentication via session cookie in handshake headers
- Business-rule enforcement on backend (no self-message, no non-friend message)
- Optimistic UI updates with React Query + server reconciliation
- Offline-aware push strategy (send push only when receiver is not online)
Future Plans
- Media/file sharing in chat
- Group conversations
- Message reactions and reply threads
- Search and pinned chats
- End-to-end encryption exploration