A LeetCode-style competitive programming platform with problems, contests, a discussion forum, and real-time code execution.
Submissions flow through a Redis queue to a worker pool that executes code via the Piston API. Results are pushed back to the browser over WebSockets via a Redis pub/sub channel.
Prerequisites: Docker and Docker Compose
git clone https://github.com/ShauryaSood2003/CodeCrack
cd CodeCrack
# Set your secrets (only these two are required)
cp .env.example .env
# Edit .env and set JWT_SECRET and ADMIN_CODE
docker compose up --buildThat's it. Docker Compose starts Postgres, both Redis instances, the backend (with automatic DB migration), the worker, the WebSocket server, and the frontend.
If you prefer to run services directly for faster iteration:
Infrastructure:
docker run -e POSTGRES_PASSWORD="password" -d -p 5432:5432 postgres
docker run --name redis-queue -d -p 6379:6379 redis
docker run --name redis-pubsub -d -p 6381:6379 redisBackend — create backend/.env from backend/.env.example, then:
cd backend && npm install && npx prisma migrate deploy && npm run devWorkers, WebSocket — each in its own terminal:
cd workers && npm install && npm run dev
cd websocket && npm install && npm run devFrontend:
cd frontEnd && npm install && npm run devTo create a new migration after changing backend/prisma/schema.prisma:
cd backend && npx prisma migrate dev --name <migration_name>We welcome contributions of all kinds — bug reports, feature requests, code, and docs.
- Fork the repo and create a branch:
git checkout -b my-feature - Make your changes
- Open a pull request describing what you changed and why
