Real-time team collaboration platform (auth, workspaces/projects, tasks, chat, presence, notifications) — built to learn/practice Socket.IO, Redis, and MongoDB on a Next.js + Express stack. See PLANNING.md for scope and phased build steps, DECISIONS.md for the why behind architecture/security choices, and PROGRESS.md for current status.
- Frontend — Next.js (App Router) + React + TypeScript + Tailwind CSS + Redux Toolkit + Socket.IO client
- Backend — Node.js + Express + TypeScript + Socket.IO + JWT
- Database — MongoDB + Mongoose
- Real-time / cache — Redis
Flat single-package repo — the Next.js app is the repo root. backend/ is the one subfolder (Express API, no config file of its own — see DECISIONS.md).
flowSync/
├── package.json, package-lock.json # single manifest, both apps
├── .env.example # single env file, both apps
├── tsconfig.json # the only tsconfig.json in the repo (Next's)
├── next.config.ts, postcss.config.mjs, eslint.config.mjs
├── AGENTS.md, CLAUDE.md # Next.js's own agent notes, managed by `next dev`
├── DECISIONS.md, PROGRESS.md, PLANNING.md, README.md
├── src/, public/ # the Next.js app
├── backend/ # Express + Socket.IO API — src/, tests/, no config file (see above)
└── docs/ # architecture, security, per-feature API docs
- Node.js 24 (pinned in
package.jsonengines, the same version Vercel and the Dockerfile run), npm ≥ 10 - A MongoDB database for
MONGO_URI. Dev uses a MongoDB Atlas cluster; a localmongod(mongodb://127.0.0.1:27017/flowsync) works too - Redis on
localhost:6379:- Linux:
sudo apt install redis-server(runs as theredis-serversystemd service; check withsystemctl is-active redis-server) - Windows: Memurai, a Redis-compatible service (
winget install Memurai.MemuraiDeveloper, from an elevated shell)
- Linux:
- For
npm testonly: a local MongoDB on127.0.0.1:27017as well. The backend tests refuse to run against anything but a local*_testdatabase, so they never touchMONGO_URI
npm install
cp .env.example .env # fill in real values (JWT secrets, DB URIs)| Command | Runs |
|---|---|
npm run dev:frontend |
Next.js dev server |
npm run dev:backend |
Express + Socket.IO dev server (backend/) — added in Step 2 |
npm run build:frontend |
Production Next.js build |
npm run build:backend |
Compiles every backend/src/**/*.ts to backend/dist (no tsconfig.json — flags on the tsc CLI) |
npm run lint:frontend |
ESLint on src/ |
npm run typecheck:backend |
Same file-discovery + flags, with --noEmit |
npm test |
All tests (Vitest). Backend tests need local MongoDB + Redis and use their own flowsync_test DB / Redis DB 15 — never .env's database. test:backend, test:frontend, test:watch also exist |
Live: https://flowsync-eight.vercel.app. One Vercel project with two services (Next.js + Express/Socket.IO), configured in vercel.json.
| What | Command |
|---|---|
| Ship to production | git push origin master:release. Only the release branch auto-deploys; pushes to master never do |
| Roll back to the previous production deploy (instant, no rebuild) | npx vercel@65.12.1 rollback |
| Check the live site | curl https://flowsync-eight.vercel.app/api/health |
| Read production logs | npx vercel@65.12.1 logs --environment production |
| Manual deploy (fallback) | npx vercel@65.12.1 deploy --prod |
Always work on master; never check out release and edit there, because every auto-committed save would deploy. Use npx vercel@65.12.1: older global CLIs don't support this two-service setup.
Under active step-by-step build — see PROGRESS.md for what's done and what's next.