A full-stack RealWorld/Conduit-style blogging platform.
- Frontend: React 19, TypeScript, Vite, React Router 7, Zustand
- Backend: Express, TypeScript, Prisma, SQLite, JWT, Zod, Multer
frontend/: web appbackend/: API server and Prisma schemabackend/prisma/: SQLite schema, migrations, local database files
- Node.js 22+
- npm
Create local environment files from the examples:
copy backend\.env.example backend\.env
copy frontend\.env.example frontend\.envRequired backend variables:
JWT_SECRET: required, no fallback is usedDATABASE_URL: SQLite connection string, e.g.file:./dev.dbPORT: optional, defaults to3000, must be an integer between1and65535NODE_ENV: optional, defaults todevelopment, must be one ofdevelopment,test, orproductionLOG_LEVEL: optional, one ofdebug,info,warn,errorRATE_LIMIT_WINDOW_MS: optional, request limit window in millisecondsRATE_LIMIT_MAX_REQUESTS: optional, max requests per window for protected endpointsCORS_ORIGIN: optional,*or a comma-separated list of allowed frontend originsTRUST_PROXY: optional, set to1ortruewhen running behind Render, Railway, Caddy, or another reverse proxyPUBLIC_APP_URL: optional, forces uploaded asset URLs to use a specific public backend originUPLOADS_DIR: optional, defaults tobackend/public/uploadsfor local development
Frontend variables:
VITE_API_BASE_URL: API base URL, usuallyhttp://localhost:3000/api
Dependencies are already present in this workspace, but on a clean checkout run:
npm install
cd backend && npm install
cd ..\frontend && npm installStart the backend:
npm run dev:backendStart the frontend in a second terminal:
npm run dev:frontendGET /healthz: process healthGET /readyz: database readiness check- Request logging is structured JSON and includes
requestId - Auth and upload endpoints have lightweight in-memory rate limiting
- GitHub Actions CI is defined in .github/workflows/ci.yml
- Dockerfiles are provided for backend/Dockerfile and frontend/Dockerfile
- A local container deployment is provided in docker-compose.yml
- A Render blueprint for the backend is provided in render.yaml
- A Vercel + Render deployment guide is provided in DEPLOY_VERCEL_RENDER.md
Run backend integration tests:
npm testThe test suite uses a separate SQLite file under backend/test/test.db and resets data between tests.
The current test suite covers the main user flows:
- register and login
- current user fetch and update
- article create, update, list, favorite, unfavorite, delete
- comment create, list, delete
- follow, unfollow, personalized feed
- Uploaded avatars are served from
backend/public/uploads/by default and can be moved withUPLOADS_DIR - SQLite runtime files and uploads are ignored via
.gitignore - The frontend fallback to the public RealWorld API should not be relied on for local development