Monorepo for a realtime messaging app: NestJS GraphQL API + React SPA.
| App | Folder | Deploy |
|---|---|---|
| Backend API | chat-backend/ |
Render (free Web Service) |
| Frontend | chat-front/ |
Vercel |
Full deploy steps: DEPLOY.md
Chatter lets users sign up, log in, and message in direct (1:1) and group chats over GraphQL with live updates (WebSocket subscriptions). Unread counts are tracked separately for Direct and Group, with badges in the header and per-chat indicators.
- Auth — signup, login, logout (JWT + HTTP-only cookies)
- Direct chats — start or open a 1:1 conversation with another user
- Group chats — create named groups with multiple members
- Realtime messaging — new messages appear live via GraphQL subscriptions (Redis pub/sub)
- Unread notifications — unread counts for Direct / Group / total; mark chat as read
- Header navigation — separate Direct and Group sections with unread badges
- Attachments — message file uploads to S3-compatible storage (MinIO / Synclyz / Gozunga / R2 / S3)
- Profile — user profile and avatar upload
- Infinite scroll — paginated chat list and message history
| Layer | Tech |
|---|---|
| Runtime | Node.js, TypeScript |
| Framework | NestJS |
| API | GraphQL (Apollo Server) + REST helpers for uploads |
| Auth | Passport, JWT, bcrypt, cookie-parser |
| Database | MongoDB + Mongoose |
| Realtime | graphql-ws, Redis (ioredis + graphql-redis-subscriptions) |
| Storage | AWS SDK S3 client (MinIO / Cloudflare R2 / AWS S3) |
| Validation | class-validator, Joi (config) |
| Layer | Tech |
|---|---|
| UI | React 19, TypeScript |
| Build | Vite |
| Data | Apollo Client, GraphQL Code Generator |
| Realtime | graphql-ws subscriptions |
| Routing | React Router |
| Components | Material UI (MUI) + Emotion |
| Tests | Vitest, Testing Library |
| Package manager | Yarn 4 |
- MongoDB Atlas — primary data store
- Redis (e.g. Upstash) — subscription fan-out
- Object storage — free no-card options: Synclyz / Gozunga (or MinIO locally)
- Render — backend Docker deploy (free tier)
- Vercel — frontend static/SPA deploy
chat-graphql/
├── chat-backend/ # NestJS GraphQL API
├── chat-front/ # Vite + React SPA
├── DEPLOY.md # Koyeb + Vercel step-by-step
└── README.md
- Node.js 20+
- MongoDB, Redis, and S3-compatible storage (or Docker equivalents)
- Yarn (for frontend)
cd chat-backend
cp .env.example .env # if present; otherwise create .env from DEPLOY.md
npm install
npm run start:devAPI defaults to something like http://localhost:3000 (or your PORT).
cd chat-front
cp .env.example .env
yarn install
yarn devSet the frontend env to point at your local API (see chat-front/.env.example).
See DEPLOY.md for:
- MongoDB Atlas, Redis, and free no-card object storage (Synclyz / Gozunga)
- Backend on Render (Docker, root
chat-backend, optionalrender.yaml) - Frontend on Vercel (root directory
chat-front) - CORS / cookie / env wiring between the two
Private / unlicensed unless you add a license file.