Backend — Spring Boot API

The backend is a Spring Boot 4 application (Java 21) that serves as the central hub of the platform. It handles authentication, exposes the REST API, orchestrates external data synchronization, manages the alert lifecycle, and feeds the observability pipeline.

Sections

PageWhat it covers
project-structurePackage-by-feature layout: auth, bot, core, external, follow, notification, sport, user
authenticationJWT + OAuth2 (Discord, Google), email verification, refresh tokens, security filter chain
data-modelFull PostgreSQL schema walkthrough — 13 table groups with annotated ER diagram
sync-pipelinePlugin-based external API sync: ExternalApiDailySyncJob interface, scheduler, page budgets
sync-formula1OpenF1 integration: sessions, circuits, drivers
sync-basketballBalldontlie integration: NBA/WNBA games and teams
sync-pandascorePandaScore esports integration: current state, code review findings
alerts-systemThe full alert lifecycle: generation → dispatch → Redis Streams → callbacks → retry
redis-streams-contractProducer-consumer contract between Spring and the Ktor workers
exception-handlingRFC 7807 ProblemDetail strategy, GlobalExceptionHandler, domain exceptions
observabilityLogback → Loki, Actuator → Prometheus, structured logging
api-referenceREST surface overview, Swagger, Postman collections