Monorepo bootstrap for the CS Term Fighter stack:
frontend/: React + TypeScript (Vite)backend/: Go API service + PostgreSQL + Redisworld-server/: Go WebSocket world serviceshared/: shared cross-service types/interfacesk8s/: future k3s manifests
API docs:
- Login/Auth API:
backend/LOGIN_API.md
Run everything in containers (frontend + backend + world-server + postgres + redis):
docker compose up -d --buildFrontend: http://localhost:5173
Backend health: http://localhost:3001/health
World server health: http://localhost:8080/health
Stop everything:
docker compose downIf your team wants a host-based fallback setup:
./scripts/setup.shUseful flags:
./scripts/setup.sh --with-dockerinstalls deps and starts only postgres/redis../scripts/setup.sh --docker-allinstalls deps and also builds/starts full docker stack.
- Start local infrastructure:
docker compose up -d- Configure local env files:
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env
cp world-server/.env.example world-server/.env- Run frontend:
cd frontend
npm install
npm run dev- Run backend:
cd backend
go run .- Run world server:
cd world-server
go run .cd frontend && npm run build
cd backend && go build ./...
cd world-server && go build ./...Run the full automated test suite for the whole repo with either of these commands from the repo root:
make testor
./scripts/test-all.shProduction endpoints:
- Frontend:
https://cs-term-fighter.vercel.app - Backend:
https://cs-term-fighter-backend.onrender.com - World server:
https://cs-term-fighter-world-server.onrender.com
VITE_API_BASE_URL=https://cs-term-fighter-backend.onrender.comVITE_WORLD_WS_URL=wss://cs-term-fighter-world-server.onrender.com/wsVITE_WORLD_API_BASE_URL=https://cs-term-fighter-world-server.onrender.com
FRONTEND_ORIGIN=https://cs-term-fighter.vercel.appCOOKIE_SECURE=trueCOOKIE_SAMESITE=noneGOOGLE_REDIRECT_URL=https://cs-term-fighter-backend.onrender.com/auth/google/callback- Set your existing hidden values for:
DATABASE_URLREDIS_URLGOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRETJWT_SECRET
BATTLE_API_BASE_URL=https://cs-term-fighter-backend.onrender.com- Set your Redis env:
- Preferred:
REDIS_URL=rediss://...(supported by this branch) - Local-style fallback:
REDIS_ADDR=host:port
- Preferred: