Full-stack event platform scaffold for:
- Round 1 coding duel elimination
- Round 2 quiz engine
- Round 3 auction finale with Bits scoring
- Client: React + Vite + TypeScript + Tailwind + Zustand
- Server: Express + TypeScript + Socket.io
- DB: PostgreSQL + Prisma
- Code execution: Piston API
- Start Docker Desktop (required for PostgreSQL).
- From project root:
npm run db:up - In
server:cp .env.example .env(already provided)npm run prisma:generatenpx prisma migrate dev --name initnpm run prisma:seed
- Run apps:
- Backend:
npm run dev:server - Frontend:
npm run dev:client
- Backend:
From the project root:
-
Start the Docker container:
docker compose up -d
-
Verify the container is running:
docker compose ps docker compose logs -f piston
-
Test the Piston API:
curl http://localhost:2000/api/v2/runtimes
-
Stop the container when finished:
docker compose down
- Auth:
/api/auth/register,/api/auth/login - Admin:
/api/admin/pending-users,/api/admin/users/:userId,/api/admin/start-round - Team:
/api/team/me,/api/team/create,/api/team/join - Problem:
/api/problem - Submission:
/api/submission/run,/api/submission/submit - Quiz:
/api/quiz/questions,/api/quiz/answer - Auction:
/api/auction/board,/api/auction/problem,/api/auction/bid - Round:
/api/round/event-state,/api/round/:roundNumber/matchups,/api/round/leaderboard/global
- Provision a VPS/EC2 instance with Ubuntu.
- Install Docker and clone the repository.
- In the
serverdirectory, install dependencies with Bun and runbun run dev. Use PM2 to maintain service availability. - Configure Piston Docker containers for 24/7 operation.
- Set up Nginx as a reverse proxy to expose the application.
- Configure the Vercel frontend environment variables with the exposed server IP and port.