Zync is a modern, high-performance, real-time team collaboration and messaging application designed for seamless communication, low latency, and scale. Built with a Next.js 16 (App Router) frontend and a Node.js/Express TypeScript backend powered by Socket.io, Redis Pub/Sub, and MongoDB, Zync provides focused, distraction-free team workspace chat with rich media, presence tracking, message threading, reactions, and background job queues.
Modern dark-themed landing page with product features, live UI preview, and instant navigation.

Feature-rich real-time messaging interface with organized channels, direct messages, online presence indicators, code snippet formatting, emoji reactions, message threading, and member panels.

Secure authentication flow supporting email/password credentials and Google OAuth 2.0 single sign-on with HTTP-only cookies.
- π¬ Real-Time Instant Messaging: Low-latency bidirectional socket communication powered by Socket.io and scaled horizontally with Redis Adapter.
- π’ Public & Private Channels: Create topic-specific channels or private team rooms with role-based access controls and invite link generation.
- π€ Direct Messaging (DMs): One-on-one encrypted-style private conversations with online/away/offline status indicators.
- π’ Live Presence & Typing Indicators: Real-time user status sync (
online,idle,away,offline) and dynamic typing indicators in active chats. - π Rich Media & File Attachments: Upload images, documents, and assets powered by Cloudinary with instant image preview modals.
- π Message Pinning & Starred Messages: Pin important announcements or star messages for quick access in a dedicated side sheet panel.
- π Emoji Reactions & Threaded Replies: Express reactions with emoji pickers and keep conversations organized with message threads.
- π Dual Authentication: Secure login using JWT stored in
httpOnlysecure cookies, alongside native Google OAuth 2.0 integration. - π Asynchronous Notification Queue: Background job execution powered by BullMQ & Redis for offline user alerts and system notification dispatches.
- π State-of-the-Art Dark Theme UI: Built with custom design tokens, smooth micro-animations, glassmorphism elements, and responsive layout.
Zync utilizes a decoupled client-server architecture designed for high availability and low latency.
graph TD
User([User Browser / Client])
subgraph Frontend [Next.js 16 Frontend App]
Page[App Router Pages]
SocketClient[Socket.io Client]
AxiosClient[Axios HTTP Client]
end
subgraph Backend [Node.js / Express 5 Backend]
AuthRouter[Auth Controller / Google OAuth]
RoomRouter[Room & Message Controller]
NotifRouter[Notification Controller]
SocketServer[Socket.io Server]
AuthMiddleware[JWT / Cookie Middleware]
end
subgraph Infrastructure [Data & Services]
MongoDB[(MongoDB Database)]
Redis[(Redis Pub/Sub)]
BullMQ[BullMQ Job Queue & Workers]
Cloudinary[Cloudinary CDN Storage]
end
User -->|HTTP / HTTPS| Page
User -->|WebSockets| SocketServer
Page --> AxiosClient
Page --> SocketClient
AxiosClient -->|REST APIs| AuthRouter
AxiosClient -->|REST APIs| RoomRouter
AxiosClient -->|REST APIs| NotifRouter
SocketServer <-->|Pub / Sub Scale| Redis
SocketServer --> SocketClient
AuthRouter --> MongoDB
RoomRouter --> MongoDB
RoomRouter --> Cloudinary
NotifRouter --> BullMQ
BullMQ --> Redis
BullMQWorker[Notification Worker] --> BullMQ
Zync/
βββ backend/ # Node.js + Express + TypeScript Backend
β βββ src/
β β βββ config/ # Database & environment configurations (MongoDB)
β β βββ helpers/ # Shared helper utilities & formatters
β β βββ jobs/ # BullMQ queue definitions
β β βββ lib/ # Redis client connection & Cloudinary setup
β β βββ middleware/ # Authentication & request validation middleware
β β βββ models/ # Mongoose schemas (User, Room, Message, Notification)
β β βββ routes/ # REST API routes (Auth, Room, Notification)
β β βββ socket/ # Real-time socket handlers (Presence, Message, Room)
β β βββ types/ # TypeScript interface definitions
β β βββ workers/ # BullMQ background notification workers
β β βββ server.ts # Server entry point & CORS configuration
β βββ package.json
β βββ tsconfig.json
β
βββ frontend/ # Next.js 16 + React 19 Frontend App
β βββ app/
β β βββ auth/ # Login, Signup, and OAuth Callback routes
β β βββ chat/ # Real-time chat workspace interface & components
β β βββ invite/ # Shareable invite link acceptance page
β β βββ globals.css # Global design tokens & dark theme styles
β β βββ layout.tsx # Root layout with context providers
β β βββ page.tsx # Landing page with hero & features
β βββ public/ # Static assets, UI mockups, and README screenshots
β β βββ screenshots/ # High-res README screenshot assets
β βββ src/
β β βββ components/ # Shared UI components (Avatar, Modal, StatusDot, etc.)
β β βββ lib/ # API Client & Socket hook utilities
β β βββ types/ # Frontend type definitions
β βββ package.json
β βββ next.config.ts
Ensure you have the following installed on your local development machine:
- Node.js:
v18.xor higher - npm or pnpm / yarn
- MongoDB: Local MongoDB instance or a free MongoDB Atlas cluster.
- Redis: Local Redis server or a free Redis Cloud instance.
Create a .env file in the backend/ directory:
# Server Config
PORT=8000
NODE_ENV=development
CLIENT_URL=http://localhost:3000
# Database
MONGO_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/zync?retryWrites=true&w=majority
# Authentication
JWT_SECRET=your_super_secret_jwt_key_here
# Google OAuth 2.0
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_CALLBACK_URL=http://localhost:8000/auth/google/callback
# Redis & PubSub Queue
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
# Cloudinary Storage
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secretCreate a .env file in the frontend/ directory:
NEXT_PUBLIC_API_URL=http://localhost:8000
NEXT_PUBLIC_GOOGLE_CLIENT_ID=your_google_client_idgit clone https://github.com/your-username/zync.git
cd zync# Navigate to backend directory
cd backend
# Install dependencies
npm install
# Start backend in development mode (with hot reloading via tsx)
npm run devThe backend server will launch on http://localhost:8000.
In a new terminal window:
# Navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Start Next.js development server
npm run devOpen http://localhost:3000 in your browser.
| Method | Endpoint | Description | Access |
|---|---|---|---|
POST |
/auth/signup |
Register a new user account | Public |
POST |
/auth/login |
Log in user & receive HTTP-only JWT cookie | Public |
GET |
/auth/me |
Fetch authenticated user profile | Private |
POST |
/auth/logout |
Clear session cookie & log out | Private |
GET |
/auth/google |
Trigger Google OAuth 2.0 login | Public |
GET |
/auth/google/callback |
Google OAuth callback handler | Public |
| Method | Endpoint | Description | Access |
|---|---|---|---|
POST |
/room/create |
Create a channel or DM room | Private |
GET |
/room/user-rooms |
List all channels user belongs to | Private |
GET |
/room/public |
Discover available public channels | Private |
POST |
/room/:roomId/join |
Join a public room | Private |
POST |
/room/:roomId/leave |
Leave a channel | Private |
POST |
/room/:roomId/invite |
Generate room invite link | Private (Admin) |
GET |
/room/:roomId/messages |
Fetch paginated chat history | Private |
GET |
/room/:roomId/pinned |
Fetch pinned messages in a room | Private |
POST |
/room/:roomId/messages/:messageId/pin |
Pin/unpin a message | Private |
POST |
/room/:roomId/messages/:messageId/star |
Star/unstar a message | Private |
POST |
/room/upload |
Upload image/file attachment to Cloudinary | Private |
join_room: Connects client socket to a specific channel room ID.leave_room: Disconnects socket from channel room.send_message: Dispatches a chat message (text, code snippets, parent reply ID, media URLs).edit_message: Updates content of a previously sent message.delete_message: Removes message from channel for all online members.add_reaction: Toggles an emoji reaction on a message ID.typing_start: Broadcasts typing status in a room.typing_stop: Clears typing status indicator.user_status_change: Updates user presence state (online,idle,away,offline).
new_message: Pushes incoming message object to room subscribers.message_updated: Pushes message edit payload.message_deleted: Notifies clients of message deletion.reaction_updated: Streams updated reaction counts and user lists.typing_indicator: Pushes active typing user information.user_presence: Emits presence changes to workspace members.notification: Pushes real-time notifications dispatched by BullMQ worker.
cd frontend
npm run build
npm run startcd backend
npm run build
npm run startZync is architected for seamless multi-service cloud deployment:
- Frontend App: Deployed on Vercel with automatic Next.js edge builds and static site optimization.
- Backend API & WebSockets: Deployed on Render running Node.js / Express with persistent WebSocket connection support.
- Managed Data Services:
- MongoDB Atlas: Fully managed cloud database for user accounts, channels, and message persistence.
- Redis Cloud: Managed high-availability Redis instance supporting Socket.io Pub/Sub adapter scaling and BullMQ background queues.
- Continuous Integration: Automated GitHub Actions workflow (
.github/workflows/ci.yml) running on every push to validate linting and production builds for both services.
This project is open source and available under the ISC License.
Contributions, issues, and feature requests are welcome! Feel free to check out the repository, submit issues, or open pull requests.