Service that recommends a minimal sufficient set of episodes per season so a user can start from any season and still understand the context.
git clone https://github.com/ArtyemTs/tes.git
cd tes
docker compose up --buildOpen:
- API: http://localhost:8080
- Swagger UI: http://localhost:8080/swagger-ui/index.html
- Web UI: http://localhost:5173
The API contract is maintained in api/src/main/resources/openapi/tes-openapi.yaml.
Update flow:
- Modify the YAML (bump
info.version). - Align DTOs/validation to match the spec.
- Run contract tests:
cd api && ./mvnw test
- Commit with message:
feat(api): contract vX.Y.Z.
Limits:
- Request body ≤ 16KB
- API→ML timeout: 3s
- Errors follow RFC7807 Problem+JSON.
- Every error has a
code(TES-xxx) andcorrelationId. - Localized messages (
en,ru). - Example:
{
"type": "https://tes.dev/errors/invalid-request",
"title": "Invalid request",
"status": 400,
"code": "TES-001",
"correlationId": "123e4567-e89b-12d3-a456-426614174000"
}- API→ML calls wrapped in Resilience4j (timeouts, circuit breaker, bulkhead).
- If ML is down: API returns
503 Service Unavailable+Retry-After: 10. - Smoke test:
k6 run infra/perf/smoke-10rps-1m.js
- Configurable per-IP rate limit (default: 60 req/hour).
- On exceeding:
429 Too Many Requests+ headers:X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Reset
- Java 21 (Spring Boot API).
- Python 3.11 (ML microservice).
- Node.js 20 (Web UI).
- Dockerized,
docker-compose.ymlties components together.
- API: JUnit5 + MockMvc contract & error tests.
- ML: pytest.
- Smoke: k6 scripts under
infra/perf.
- No hardcoded secrets.
- Use
.envfor overrides. - Dependencies checked via
mvn dependency:analyze/pip-audit.