About Coding Challenges
A full-stack distributed coding challenge platform built with modern technologies, featuring microservices architecture, secure authentication, and sandboxed code execution.
Project Overview
This platform allows users to solve coding challenges, submit solutions, and receive instant feedback through automated test execution. It's designed as a distributed system with multiple microservices communicating via a central gateway.
The project demonstrates modern software engineering practices including containerization with Docker, orchestration with Docker Swarm, secure authentication with Keycloak, message queuing with RabbitMQ, and comprehensive testing.
Architecture
Frontend
Next.js 16 with React, TypeScript, Tailwind CSS
Gateway
FastAPI gateway routing requests to microservices
Challenges Service
FastAPI service managing coding challenges
Users Service
FastAPI service for user management
Sandbox Runner
Isolated Python code execution worker
Keycloak
Identity and access management (OAuth2/OIDC)
PostgreSQL
Persistent data storage for services
RabbitMQ
Message broker for async code execution
Features
Testing
The project includes comprehensive test suites for both frontend and backend services:
Frontend Tests (Jest)
- • Component unit tests for UI elements
- • Page integration tests
- • Run with:
npm test
Backend Tests (Pytest)
- • API endpoint tests for Gateway, Challenges, Users services
- • Sandbox runner logic tests
- • Model and schema validation tests
- • Run all:
./run-tests.sh
Local Deployment
Follow these steps to run the project locally using Docker Swarm:
1. Prerequisites
- • Docker & Docker Compose installed
- • Docker Swarm initialized (
docker swarm init) - • Node.js 18+ (for frontend development)
2. Clone the repository
git clone https://github.com/aighita/coding-challenges.git cd coding-challenges
3. Deploy with Docker Swarm
# Deploy the stack ./deploy.sh # Or manually: docker stack deploy -c docker-swarm-stack.yml coding-challenges
4. Access the services
- • Frontend:
http://localhost:3000 - • Gateway API:
http://localhost:8080 - • Keycloak:
http://localhost:8081 - • RabbitMQ Management:
http://localhost:15672
5. Seed sample data (optional)
cd fixtures ./run_fixtures.sh
6. Cleanup
./cleanup.sh
Demo Mode
When backend services are offline (like on this Vercel deployment), the app automatically switches to demo mode with mock data. You can log in with these demo accounts:
| Username | Password | Role | Access |
|---|---|---|---|
student | demo | Student | Challenges only |
editor | demo | Editor | Challenges + Editor page |
admin | demo | Admin | Full access |