How kaiman30/hakaton-ldt-backend works
This repository contains three distinct services: an API gateway, an authentication service, and a reusable ML-service core. Their likely user-facing flow begins with an API client calling a service endpoint, but the README is empty and the sampled files do not establish how the gateway routes requests or how the services connect. The ML core provides runtime coordination and connector interfaces for broker, database, LLM, HTTP, and storage operations. Its sampled pipeline and connector code supports a few internal relationships; links beyond that are omitted rather than inferred.
Main entry points: base_interface.py Base Interface · protocols.py Connector Protocols · queue.py Broker Port · db.py Database Port
Components 28
API Gateway
- Gateway API
API-Gateway/internal/api/router.go - Auth Middleware
API-Gateway/internal/api/middleware/auth.go - Health Handler
API-Gateway/internal/api/handler/health.go
Authentication
- Auth API
AuthService/internal/api/handler/auth.go - Auth Middleware
AuthService/internal/api/middleware/auth.go - JWT Service
AuthService/internal/auth/jwt.go - Auth Repository
AuthService/internal/auth/repository.go - Postgres Pool
AuthService/internal/platform/postgres/pool.go - Health Handler
AuthService/internal/api/handler/health.go
ML Runtime
- Runtime Pipeline
ML-Service-Core/core/runtime/pipeline.py - Application State
ML-Service-Core/core/runtime/app_state.py - Event Bus
ML-Service-Core/core/runtime/event_bus.py - Service Container
ML-Service-Core/core/di/service_container.py - Connector Registry
ML-Service-Core/core/registry/registry.py - Base Interface
ML-Service-Core/core/base_class/base_interface.py - Runtime Logging
ML-Service-Core/infrastructure/internal/logging.py
Connector Ports
- Broker Port
ML-Service-Core/ports/inbound/broker/queue.py - Broker DTOs
ML-Service-Core/ports/inbound/broker/dto.py - Database Port
ML-Service-Core/ports/outbound/db/db.py - Database DTOs
ML-Service-Core/ports/outbound/db/dto.py - LLM Port
ML-Service-Core/ports/outbound/ml/llm/llm.py - LLM DTOs
ML-Service-Core/ports/outbound/ml/llm/dto.py - HTTP Port
ML-Service-Core/ports/outbound/network/http.py - HTTP DTOs
ML-Service-Core/ports/outbound/network/dto.py - Storage Port
ML-Service-Core/ports/outbound/storage/storage.py - Storage DTOs
ML-Service-Core/ports/outbound/storage/dto.py - Connector Protocols
ML-Service-Core/ports/protocols.py
Other components
- API Client
Connections 21
- API Client → Gateway API: calls API
- API Client → Auth API: requests auth
- Runtime Pipeline → Application State: starts runtimes
ML-Service-Core/core/runtime/pipeline.py - Runtime Pipeline → Event Bus: accepts bus
ML-Service-Core/core/runtime/pipeline.py - Base Interface → Event Bus: publishes events
ML-Service-Core/core/base_class/base_interface.py - Base Interface → Connector Protocols: implements base
ML-Service-Core/core/base_class/base_interface.py - Storage Port → Base Interface: extends interface
ML-Service-Core/ports/outbound/storage/storage.py - Storage Port → Storage DTOs: uses DTOs
ML-Service-Core/ports/outbound/storage/storage.py - LLM Port → Base Interface: extends interface
ML-Service-Core/ports/outbound/ml/llm/llm.py - LLM Port → LLM DTOs: uses DTOs
ML-Service-Core/ports/outbound/ml/llm/llm.py - Broker Port → Broker DTOs: uses DTOs
ML-Service-Core/ports/inbound/broker/queue.py - Broker Port → Base Interface: extends interface
ML-Service-Core/ports/inbound/broker/queue.py - Database Port → Database DTOs: uses DTOs
ML-Service-Core/ports/outbound/db/db.py - Database Port → Base Interface: extends interface
ML-Service-Core/ports/outbound/db/db.py - HTTP Port → HTTP DTOs: uses DTOs
ML-Service-Core/ports/outbound/network/http.py - HTTP Port → Base Interface: extends interface
ML-Service-Core/ports/outbound/network/http.py - Storage Port → Connector Protocols: implements protocol
ML-Service-Core/ports/outbound/storage/storage.py - LLM Port → Connector Protocols: implements protocol
ML-Service-Core/ports/outbound/ml/llm/llm.py - Broker Port → Connector Protocols: implements protocol
ML-Service-Core/ports/inbound/broker/queue.py - Database Port → Connector Protocols: implements protocol
ML-Service-Core/ports/outbound/db/db.py - HTTP Port → Connector Protocols: implements protocol
ML-Service-Core/ports/outbound/network/http.py