CoolFace
Apppublic

rahul5g3d/fair-wheel

sourceHugging Faceupdated 4mo agoView on Hugging Face
0likes
App README

Fair Task Assignment & Scoring Wheel System

Run

bash
docker compose up -d
npm install
npm run seed
npm run dev

MongoDB Atlas

To use Atlas instead of local MongoDB, set backend/.env:

text
MONGO_URI=mongodb+srv://<username>:<password>@<cluster-url>/fair-wheel?retryWrites=true&w=majority

Then run:

bash
npm run seed
npm run dev

Frontend: http://localhost:5173

Backend: http://localhost:5001

Deploy

Backend service:

bash
npm install
npm run build --workspace backend
npm run seed
npm run start --workspace backend

Backend environment:

text
NODE_ENV=production
PORT=5001
MONGO_URI=mongodb+srv://<username>:<password>@<cluster-url>/fair-wheel?retryWrites=true&w=majority
CLIENT_ORIGIN=https://your-frontend-domain.com
JWT_ACCESS_SECRET=<long-random-secret>
JWT_REFRESH_SECRET=<another-long-random-secret>
ACCESS_TOKEN_TTL=15m
REFRESH_TOKEN_TTL=7d
ADMIN_USERNAME=admin
ADMIN_PASSWORD=<strong-admin-password>

Frontend service:

bash
npm install
npm run build --workspace frontend

Frontend environment:

text
VITE_API_URL=https://your-backend-domain.com

Default admin:

text
username: admin
password: set by `ADMIN_PASSWORD` in `backend/.env`