HTTP API for extracting editorials/tutorials for Codeforces problems using AI (GPT-4o).
cp .env.example .env # Add your OPENAI_API_KEY
docker-compose up -dAPI available at http://localhost:8000
POST /editorial
{ "url": "https://codeforces.com/problemset/problem/1/A" }https://codeforces.com/problemset/problem/{contest_id}/{problem_id}
just build/just up/just down- Docker managementjust test- Run pytestjust format/just lint- Ruff checksjust typecheck- Type validation
┌─────────────────────────────────────────┐
│ Presentation Layer (HTTP API) │ ← LiteStar routes, schemas
├─────────────────────────────────────────┤
│ Application Layer (Use Cases) │ ← Orchestrator, cache logic
├─────────────────────────────────────────┤
│ Domain Layer (Business Logic) │ ← Parsers, extractors, models
├─────────────────────────────────────────┤
│ Infrastructure Layer (External APIs) │ ← HTTP, OpenAI, Redis clients
└─────────────────────────────────────────┘
src/
├── presentation/ # HTTP API (Routes, Schemas, Apps)
├── application/ # Orchestration & Use cases
├── domain/ # Business logic (Parsers, Extractors, Fetchers)
├── infrastructure/# External clients (HTTP, OpenAI, Redis)
└── config.py # Pydantic settings
deyna256 | MIT License