A comprehensive real-time coding contest platform built with modern technologies, following Extreme Programming (XP) practices and microservices architecture.
- Docker & Docker Compose
- Node.js 18+
- Java 17+
- Maven 3.8+
# Clone the repository
git clone <repository-url>
cd shodh-code-challenge
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f- π Frontend: http://localhost:3000
- π§ Backend API: http://localhost:8080/api/v1
- π Swagger UI: http://localhost:8080/swagger-ui.html
- π Grafana: http://localhost:3001 (admin/admin)
- π Prometheus: http://localhost:9090
- π° RabbitMQ: http://localhost:15672 (guest/guest)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend (Next.js) β
β βββββββββββββββββββ βββββββββββββββββββ β
β β React UI β β Monaco Editor β β
β βββββββββββββββββββ βββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Backend (Spring Boot) β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββ β
β β REST API β β WebSocket β β Security β β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Infrastructure Layer β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββ β
β β PostgreSQL β β RabbitMQ β β Redis β β
β βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Next.js 14 with App Router and TypeScript
- Tailwind CSS for responsive design
- Zustand for state management
- Monaco Editor for code editing
- React Hook Form with Zod validation
- Spring Boot 3.2.0 with Java 17
- Hexagonal Architecture (Ports & Adapters)
- PostgreSQL 15 for data persistence
- RabbitMQ for message queuing
- Redis for caching
- Docker for code execution
- Docker & Docker Compose for containerization
- Nginx as reverse proxy
- Prometheus + Grafana for monitoring
- GitHub Actions for CI/CD
- Real-time Contest Management: Create and manage coding contests
- Live Code Judging: Secure code execution using Docker containers
- Live Leaderboard: Real-time rankings and statistics
- Multi-language Support: Java, Python, JavaScript, C++
- Responsive Design: Works on desktop, tablet, and mobile
- Asynchronous Processing: Queue-based submission handling
- Real-time Updates: WebSocket connections for live data
- Comprehensive Testing: Unit, integration, and E2E tests
- Monitoring & Observability: Prometheus metrics and Grafana dashboards
- Security: Input validation, code isolation, and rate limiting
shodh-code-challenge/
βββ backend/ # Spring Boot Backend
β βββ src/main/java/com/shodh/contest/
β β βββ domain/ # Domain models and ports
β β βββ application/ # Use cases and services
β β βββ infrastructure/ # Adapters and repositories
β β βββ interfaces/ # REST controllers and DTOs
β βββ src/test/ # Comprehensive test suite
β βββ Dockerfile
βββ frontend/ # Next.js Frontend
β βββ src/
β β βββ app/ # Next.js App Router pages
β β βββ components/ # React components
β β βββ hooks/ # Custom React hooks
β β βββ store/ # Zustand stores
β β βββ services/ # API services
β βββ Dockerfile
βββ docker/ # Docker configurations
βββ monitoring/ # Monitoring setup
βββ nginx/ # Reverse proxy config
βββ .github/workflows/ # CI/CD pipelines
βββ docs/ # API documentation
cd backend
./mvnw test # Unit tests
./mvnw test -Dtest="*IntegrationTest" # Integration tests
./mvnw test -Dtest="*ArchTest" # Architecture tests
./mvnw jacoco:report # Coverage reportcd frontend
npm test # Unit tests
npm run test:coverage # Coverage report
npm run test:e2e # E2E testscd backend
./mvnw spring-boot:runcd frontend
npm run dev- Application Metrics: Request count, response time, error rate
- Business Metrics: Contest participation, submission success rate
- Infrastructure Metrics: CPU, memory, database connections
- Application Dashboard: Real-time application health
- Contest Dashboard: Contest participation and performance
- Infrastructure Dashboard: System resource utilization
- Input Validation: All inputs are validated and sanitized
- Code Execution Isolation: Docker containers with resource limits
- SQL Injection Prevention: JPA/Hibernate with parameterized queries
- XSS Protection: React's built-in XSS protection
- Rate Limiting: API throttling to prevent abuse
- Response Time: < 200ms for API calls
- Throughput: 1000+ requests/second
- Code Execution: < 5 seconds per submission
- Frontend Load Time: < 2 seconds first contentful paint
- Fork the repository
- Create a feature branch
- Make your changes
- Write tests
- Submit a pull request
- Backend: Google Java Style Guide
- Frontend: ESLint + Prettier configuration
- Commits: Conventional commit messages
- Testing: 80%+ code coverage requirement
- Complete Documentation: PROJECT_COMPLETE_DOC.md
- API Documentation: http://localhost:8080/swagger-ui.html
- Backend README: backend/README.md
- Frontend README: frontend/README.md
- Real-time collaboration
- Advanced analytics
- Mobile application
- AI-powered code analysis
- Multi-tenancy support
- Microservices architecture
- Event sourcing
- GraphQL API
- Kubernetes deployment
- Service mesh implementation
- Email: dev@shodh.ai
- Issues: GitHub Issues
- Discussions: GitHub Discussions
This project is licensed under the MIT License - see the LICENSE file for details.
- Spring Boot team for the excellent framework
- Next.js team for the amazing React framework
- Docker team for containerization
- Prometheus and Grafana teams for monitoring tools
Built with β€οΈ by the Shodh AI Team
This platform represents a complete, production-ready implementation of a real-time coding contest platform, following industry best practices and modern development methodologies.