Cricket tournament registration platform — "आपका मंच, आपकी पहचान!"
Auction Base Tournament (Rubber Ball) · 16 Teams · August 2026 · Sagar, Madhya Pradesh
- Frontend: React + Vite + Tailwind CSS (
/frontend) - Backend: Node.js + Express (
/backend) - Database: MongoDB Atlas via Mongoose
- File storage: Cloudinary (profile photo, Aadhaar photo, payment screenshot)
- Auth: JWT-based admin login, single hardcoded admin account
cric/
backend/ Express API, MongoDB models, Cloudinary integration
frontend/ React + Vite + Tailwind client
cd backend
npm install
cp .env.example .env # fill in MongoDB Atlas URI, Cloudinary keys, admin credentials, JWT secret
npm run dev # nodemon, http://localhost:5000Required env vars (see backend/.env.example):
MONGO_URI— MongoDB Atlas connection stringJWT_SECRET,JWT_EXPIRES_INADMIN_USERNAME,ADMIN_PASSWORD— hardcoded single admin loginCLOUDINARY_CLOUD_NAME,CLOUDINARY_API_KEY,CLOUDINARY_API_SECRET
CORS is open to all origins (no credentials/cookies are used — auth is a bearer JWT — so this is
safe), which means no CLIENT_URL env var is needed.
cd frontend
npm install
cp .env.example .env # set VITE_API_URL to the backend URL
npm run dev # http://localhost:5173Payment bank details are placeholders in frontend/src/data/tournament.js (PAYMENT_DETAILS) —
replace [YOUR BANK NAME], [YOUR ACCOUNT NUMBER], [YOUR IFSC CODE], [YOUR UPI ID] with real values.
The QR code shown on the payment step is frontend/public/payment-qr.png. To use a different QR
image, replace that file (or add a new one and update PAYMENT_DETAILS.qrImage in
tournament.js).
| Method | Route | Description |
|---|---|---|
| POST | /api/register |
Submit a registration (multipart form: fields + images) |
| POST | /api/auth/login |
Admin login, returns JWT |
| GET | /api/admin/stats |
Overview stats (auth required) |
| GET | /api/admin/registrations |
List registrations, supports search/type/status/city query params (auth required) |
| GET | /api/admin/registrations/:id |
Single registration detail (auth required) |
| PATCH | /api/admin/registrations/:id/approve |
Approve a registration; generates a shareable player/team ticket image (auth required) |
| PATCH | /api/admin/registrations/:id/reject |
Reject + delete its Cloudinary files (auth required) |
| DELETE | /api/admin/registrations/:id |
Permanently delete a rejected registration (auth required) |
| GET | /api/admin/export/csv?status=all|approved|pending |
CSV export (auth required) |
| GET | /api/admin/export/json |
JSON export, approved only (auth required) |
| GET | /api/admin/activity-log |
Approve/reject/delete audit trail (auth required) |
- Backend → Render or Railway: root directory
backend, build commandnpm install, start commandnpm start, add all env vars frombackend/.env.example. - Frontend → Vercel or Netlify: root/base directory
frontend, build commandnpm run build, publish/output directoryfrontend/dist, and setVITE_API_URLto the deployed backend URL.- On Netlify specifically, the SPA fallback rule lives in
frontend/public/_redirects(/* /index.html 200) — it's already in the repo and gets copied intodist/on build, so client-side routes like/registerand/admindon't 404 on refresh.
- On Netlify specifically, the SPA fallback rule lives in