A modern, distributed online judge system designed to support programming education and competitive programming in Vietnam. Built with a microservices architecture for scalability, maintainability, and reliability.
For detailed documentation, please visit our Gitbook Additional project details can be found in docs/overview.md.
graph TD
Client[React Frontend]
Gateway[API Gateway]
subgraph Frontend
Client
end
subgraph Backend Services
Gateway
User[User Service]
Exercise[Exercise Service]
Learning[Learning Service]
Media[Media Service]
Stats[Statistics Service]
Common[Common Service]
end
subgraph Infrastructure
MQ[RabbitMQ]
DB[(MongoDB)]
Prometheus
Grafana
end
Client --> Gateway
Gateway --> User
Gateway --> Exercise
Gateway --> Learning
Gateway --> Media
Gateway --> Stats
User --> Common
Exercise --> Common
Learning --> Common
Media --> Common
Stats --> Common
User --> DB
Exercise --> DB
Learning --> DB
Media --> DB
Stats --> DB
User --> MQ
Exercise --> MQ
Learning --> MQ
Media --> MQ
Stats --> MQ
Prometheus --> User
Prometheus --> Exercise
Prometheus --> Learning
Prometheus --> Media
Prometheus --> Stats
Prometheus --> Grafana
- Modern React-based UI with Material-UI components
- Advanced code editor with syntax highlighting
- Real-time collaboration tools
- Video content streaming
- Interactive learning features
- Comprehensive testing suite (Cypress)
- Performance monitoring and optimization
- Authentication and authorization
- User profile management
- Role-based access control
- Session management
- Programming problem management
- Solution submission handling
- Automated testing
- Plagiarism detection
- Course management
- Content organization
- Progress tracking
- Achievement system
- File upload and management
- Video streaming
- Content delivery
- Storage optimization
- Performance analytics
- Usage statistics
- Progress tracking
- Reporting tools
- Shared utilities
- Business logic
- Common interfaces
- Reusable components
- React 18
- Vite
- Material UI
- CodeMirror
- React Router
- Axios
- React Query
- Testing:
- Vitest
- Cypress
- K6 for load testing
- Node.js
- Express.js
- gRPC
- MongoDB
- RabbitMQ
- Testing:
- Jest
- Supertest
- Docker
- Docker Compose
- Prometheus
- Grafana
- Firebase
- Node.js (Latest LTS)
- pnpm
- Docker and Docker Compose
- MongoDB
- RabbitMQ
- Clone the repository
git clone https://github.com/holedev/vnoi-microservice.git
cd vnoi-microservice
- Install dependencies
# Root dependencies
pnpm install
# Client dependencies
cd client
pnpm install
# Server dependencies
cd ../server
pnpm install
- Configure environment variables
# Client
cp client/.env.example client/.env
# Server services
cp server/user/.env.example server/user/.env
cp server/exercise/.env.example server/exercise/.env
cp server/learning/.env.example server/learning/.env
cp server/media/.env.example server/media/.env
cp server/statistics/.env.example server/statistics/.env
- Start development servers
# Start all services with Docker
docker-compose -f server/docker-compose.dev.yml up
# Start frontend
cd client
pnpm dev
- ESLint for linting
- Prettier for formatting
- Conventional commits
- Comprehensive documentation
-
Branch naming:
- feature/* - New features
- fix/* - Bug fixes
- docs/* - Documentation
- refactor/* - Code refactoring
-
Commit messages:
- feat: Add new feature
- fix: Bug fix
- docs: Documentation changes
- refactor: Code refactoring
- test: Adding tests
- chore: Maintenance tasks
- Unit tests for all business logic
- Integration tests for APIs
- E2E tests for critical paths
- Performance tests for optimization
# Start development environment
docker-compose -f server/docker-compose.dev.yml up
# Build and start production environment
docker-compose -f server/docker-compose.prod.yml up
- Prometheus metrics
- Grafana dashboards
- Custom logging solution
- Performance tracking
- API response times
- Error rates
- Resource usage
- User engagement
- System overview
- Service health
- User activity
- Performance metrics
- JWT-based authentication
- Role-based access control
- Service-to-service auth
- Secure session management
- Encryption at rest
- Secure communication
- Input validation
- XSS protection
- REST API endpoints
- gRPC service definitions
- Data models
- Authentication flows
- Service interactions
- Data flow diagrams
- Deployment architecture
- Security measures
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a pull request