ChessPlay is a production-focused chess platform with a React/Vite frontend and Node.js/Express backend. It supports local chess, Play vs AI, real-time multiplayer, authenticated user flows, profiles, game history, leaderboard, premium/referral pages, and production deployment configuration.
This repository is the private production source repository. Do not copy private backend, payment, auth, database, admin, or secret-related logic into any public showcase repository.
- Frontend: React, Vite, JavaScript, Tailwind CSS
- Backend: Node.js, Express, Socket.IO
- Database: MongoDB/Mongoose retained, with Prisma client generation support where configured
- Realtime: Socket.IO
- Chess/AI: chess.js and Stockfish integration
- Deployment: Vercel frontend, Render backend
- CI: GitHub Actions with pnpm workspace checks
.
├── backend/ # Private backend, auth, API, Socket.IO, database logic
├── frontend/ # React frontend application
├── .github/workflows/ # CI workflow
├── pnpm-workspace.yaml # Workspace config
├── TESTING.md # Production testing guide
├── RELEASE_CHECKLIST.md # Release checklist
├── CHANGELOG.md # Version history
└── SECURITY.md # Security policypnpm install
pnpm --filter ./backend exec prisma generate
pnpm -C backend build
pnpm -C frontend lint
pnpm -C frontend build
pnpm buildRun frontend only:
pnpm -C frontend devRun backend only:
pnpm -C backend devRun both locally:
pnpm dev:multiUse .env.example, backend/.env.example, and frontend/.env.example as templates. Never commit real .env files.
Required production variables usually include:
DATABASE_URL
MONGO_URI or MONGODB_URI
JWT_ACCESS_SECRET
JWT_REFRESH_SECRET
FRONTEND_ORIGINS
VITE_API_URL
VITE_SOCKET_URLOptional integrations may include Redis, SMTP, Telegram, Cloudinary, and payment provider secrets. Store production values only in hosting provider environment variables or GitHub Secrets.
Root Directory: backend
Build Command: corepack enable && corepack prepare [email protected] --activate && pnpm install --frozen-lockfile && pnpm build
Start Command: pnpm start
Node: 20.xRoot Directory: frontend
Install Command: corepack enable && corepack prepare [email protected] --activate && pnpm install --frozen-lockfile
Build Command: pnpm build
Output Directory: distCurrent release:
v1.3.0Before sharing the public link, complete TESTING.md and RELEASE_CHECKLIST.md.
The public showcase repository should contain only safe screenshots, feature summaries, tech stack, demo link, and frontend showcase pages. Do not publish backend source, auth internals, payment logic, admin logic, database logic, API secrets, or environment values.