A FastAPI-based backend for the MyCodeJudge platform.
- FastAPI-based REST API
- MongoDB with Motor and Beanie ODM
- Docker-based code execution
- OAuth2 authentication
- Comprehensive test suite
- Async operations
- Install dependencies:
poetry install- Set up environment variables:
cp .env.example .env
# Edit .env with your configuration- Run the development server:
poetry run uvicorn app.main:app --reload- Run tests:
poetry run pytestOnce the server is running, visit:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
mycodejudge/
├── app/
│ ├── api/ # API endpoints
│ ├── core/ # Core configuration
│ ├── models/ # Database models
│ ├── schemas/ # Pydantic schemas
│ ├── services/ # Business logic
│ └── tests/ # Test suite
└── docker/ # Docker configurations
- Create a new branch
- Make your changes
- Run tests
- Submit a pull request
MIT
User Code -> Create Source File -> Check Language Type | Interpreted / \ Compiled | / \ | v / \ v Run Directly / \ Compile Code / \ | / \ | v v v Run Test Cases <- Success? | v Return Results