DevForce is a modern, distributed competitive programming and code evaluation platform. Designed for scale and low-latency feedback, it provides a comprehensive environment for hosting coding challenges, evaluating submissions in secure sandboxes, and maintaining real-time leaderboards.
The platform is designed as a distributed monorepo utilizing a microservices architecture to ensure high availability and horizontal scalability.
- API Gateway & Core Logic: Handles user authentication, contest management, and submission routing.
- Code Evaluator: A secure, isolated execution environment for compiling and testing user code against predefined test cases.
- Worker Nodes: Background processors that handle asynchronous tasks seamlessly.
- Realtime Service: A WebSocket-based streaming service ensuring live updates for submissions and contest status.
- Leaderboard Engine: A high-throughput service dedicated to rank aggregations and scoring calculations.
- Cron Worker: Manages scheduled events, contest lifecycles, and periodic cleanup tasks.
The repository is structured as a Turborepo monorepo, optimized for fast, reliable builds and shared internal packages.
- Runtime & Tooling: Bun, Turborepo, TypeScript
- Frontend: Next.js (React), Tailwind CSS, Shadcn UI
- Backend: Bun, Express
- Database & ORM: PostgreSQL, Prisma
- Caching & Message Broker: Redis, Redis Streams
- Containerization: Docker, Docker Compose
- CI/CD & Deployment: GitHub Actions, AWS ECS
Ensure you have the following installed on your local machine:
-
Clone the repository:
git clone https://github.com/Arav-Menon/DEVFORCES.git cd DEVFORCES -
Install dependencies:
bun install
-
Configure environment variables: Copy the example environment files and update them with your local configurations.
cp .env.example .env
-
Start the infrastructure services: Start the local PostgreSQL and Redis instances utilizing Docker Compose.
docker compose up -d postgres redis
-
Initialize the database: Generate the Prisma client and run migrations.
bun run --filter @repo/db prisma:generate bun run --filter @repo/db prisma:migrate
-
Start the development servers: Run all applications concurrently.
bun dev
.
├── apps/
│ ├── api/ # Core backend API
│ ├── admin-backend/ # Administrative management API
│ ├── web2/ # Primary user-facing Next.js application
│ ├── realtime/ # WebSocket server for live updates
│ ├── evaluator/ # Secure code execution engine
│ ├── worker/ # Background job processor
│ ├── leaderboard-worker/ # Ranking and scoring service
│ └── cron-worker/ # Scheduled task processor
├── packages/
│ ├── db/ # Prisma schema, migrations, and database client
│ ├── redis-stream/ # Shared Redis utility and connection logic
│ ├── common/ # Shared types, constants, and observability tools
│ ├── ui/ # Shared React components (Shadcn UI)
│ ├── eslint-config/ # Shared linting rules
│ └── typescript-config/ # Shared tsconfig definitions
└── Dockerfiles/ # Production multi-stage Dockerfiles for all services
DevForce is containerized and production-ready for deployment on AWS ECS (Elastic Container Service) or any compatible orchestrator.
Each service has a dedicated, multi-stage Dockerfile located in the /Dockerfiles directory. The build process is optimized for minimal final image size by leveraging cached dependency layers and executing Prisma generation during the build stage.
Example build command for the API service:
docker build -t devforce-api:latest -f ./Dockerfiles/Dockerfile.api .The repository uses GitHub Actions for CI/CD across all microservices. The pipeline automatically authenticates with Docker Hub, builds the affected services using Turborepo's dependency graph, and pushes the tagged images to the container registry.
Copyright © 2026 DevForce. All rights reserved.
