ContentFlow is a monorepo CMS with:
Client/: Next.js App Router frontend (CMS UI + website rendering)Server/: Express + MongoDB backend (auth, content, media, APIs, backup)
- Frontend: Next.js 16, React 19, TypeScript, Tailwind, Radix UI, Sonner
- Backend: Express, Mongoose, JWT, session/cookies, Redis rate-limiter
- Database: MongoDB
Content_Management_System/
|- Client/
|- Server/
|- CONTRIBUTING.md
|- STATUS.md
`- README.md
- Node.js 20+ recommended
- npm
- MongoDB instance
- Redis instance (required for external API rate limiting)
- Install dependencies:
npm install
npm --prefix Client install
npm --prefix Server install- Configure environment files:
- Local development:
Client/.env.local,Server/.env - Production profile templates:
Client/.env.local.frontend,Server/.env.server - See
docs/ENVIRONMENT_REFERENCE.md
- Start development:
npm run devDefault dev ports:
- Client:
http://localhost:3000 - Server:
http://localhost:5000
- Fork from
mainonly. - Do not fork from
deployand do not develop directly ondeploy. - Use short-lived feature branches from your fork's
main, then open PRs back tomain. - Promote to production by merging
main->deployvia PR (no direct pushes).
- Create local env files:
Client/.env.localandServer/.env, then followdocs/ENVIRONMENT_REFERENCE.md. - Replace local endpoints: change
http://localhost:5000/...entries inClient/.env.localto your API domain. - Rotate secrets: generate new JWT/session secrets and OAuth credentials for your own project.
- Configure deploy secrets/variables in your fork:
SSH_HOST,SSH_USER,SSH_PRIVATE_KEY,SSH_PORT,SSH_FINGERPRINT,SERVER_APP_PATH,HEALTHCHECK_URL,SERVER_ENV_FILE,CLIENT_ENV_FILE. - Configure optional deploy integrations only if used:
SLACK_WEBHOOK_URL,DISCORD_WEBHOOK_URL, and Docker settings (DEPLOY_METHOD=docker,DOCKER_IMAGE,GHCR_USERNAME,GHCR_TOKEN). - Configure URLs and callbacks: set server
CORS_ORIGIN,SERVER_BASE_URL, OAuth callback URLs, and frontend auth redirect for your domain. - Run pre-deploy checks locally before merging to
deploy:npm --prefix Client run lint,npm --prefix Client run typecheck,npm --prefix Client run build,npm --prefix Server run test.
From repo root:
# Run client + server together
npm run dev
# Run production start (both)
npm run start
# Frontend build
npm --prefix Client run build
# Frontend lint
npm --prefix Client run lint
# Backend tests
npm --prefix Server run testServer route mounts are centralized in Server/server.js.
Detailed map:
docs/API_ROUTE_MAP.md
docs/README.mddocs/ENVIRONMENT_REFERENCE.mddocs/API_ROUTE_MAP.mddocs/CODEBASE_MAP.mddocs/DEPLOYMENT_GUIDE.mddocs/RELEASE_PROCESS.mdCHANGELOG.mdCODE_OF_CONDUCT.mdSECURITY.mdSUPPORT.mdSTATUS.md
This repository uses a STATUS(code): message convention.
Examples:
STATUS(301): add backup restore endpointSTATUS(601): fix page update path resolution
See full mapping in STATUS.md.