How tn-varunram/athledger works
Purpose and deployment shape
Athledger is a containerized sports-slot platform: users authenticate, administrators manage sports/slots, users book slots, and notification delivery is event-driven. The operational entry point is docker-compose.yml; Kubernetes manifests exist but the README identifies Docker as the working deployment path. Shared MySQL initialization is in init.sql; Kafka and MySQL are infrastructure dependencies.
Frontend client and edge serving
The React single-page client is rooted at Frontend/Athledger-UI/src/index.js and composed from Frontend/Athledger-UI/src/App.js. Its main UI paths cover authentication and booking through Frontend/Athledger-UI/src/Components/header/LoginModal.jsx and Frontend/Athledger-UI/src/Components/body/SlotBookingModal.jsx. API calls are centralized at Frontend/Athledger-UI/src/api/request.js. The frontend has a Docker/Nginx delivery boundary in Frontend/Athledger-UI/Dockerfile and Frontend/Athledger-UI/nginx.conf.
Authorization service
A standalone Spring Boot service starts at Backend/authorization/src/main/java/com/athledger/authorization/AuthorizationApplication.java. HTTP authentication flows enter through Backend/authorization/src/main/java/com/athledger/authorization/controller/AuthController.java and Backend/authorization/src/main/java/com/athledger/authorization/controller/LoginController.java, then persist users/roles through Backend/authorization/src/main/java/com/athledger/authorization/repository/UserRepository.java. JWT issuance and request filtering establish the security boundary in Backend/authorization/src/main/java/com/athledger/authorization/utils/JwtUtil.java and Backend/authorization/src/main/java/com/athledger/authorization/config/JwtAuthFilter.java.
Slot management service
Slot management is a separate Spring Boot bounded context, entered at Backend/slotmgmt/src/main/java/com/athledger/slotmgmt/SlotmgmtApplication.java. SlotController.java manages slot APIs while SportsController.java manages sport catalog APIs; domain persistence is split between SlotRepository.java and SportRepository.java. Its AuthorizationService.java plus AuthInterceptor.java indicate that access checks are performed across the service boundary rather than through a shared backend library.
Booking service
Booking starts at Backend/slotbooking/src/main/java/com/athledger/slotbooking/SlotbookingApplication.java; BookingController.java accepts booking operations and delegates to BookingService.java. It owns booking and slot persistence models/repositories, including BookingRepository.java and SlotRepository.java, making booking availability/state distinct from the management service’s slot catalog. AuthInterceptor.java and service security configuration form its protected API boundary.
Asynchronous notifications
The authorization service publishes user-related notification events using Backend/authorization/src/main/java/com/athledger/authorization/kafka/UserEventProducer.java, configured by KafkaProducerConfig.java. The notification Spring Boot process starts at Backend/notification/src/main/java/com/athledger/notificationservice/NotificationApplication.java, consumes user and booking events via UserEventListener.java and BookingEventConsumer.java, and delivers email through EmailService.java. Kafka decouples notification side effects from synchronous auth/booking requests.
Runtime and infrastructure boundaries
Each backend service has an independent Gradle build and Docker image, for example Backend/authorization/Dockerfile, Backend/slotmgmt/Dockerfile, and Backend/slotbooking/Dockerfile. Runtime configuration is service-local in corresponding src/main/resources/application.properties files. Kubernetes definitions provision frontend, MySQL, Kafka, and the three core business services under k8s/; notification lacks a visible Kubernetes deployment manifest. CORS is explicitly configured in service web/security configurations, and is a documented deployment risk behind the Kubernetes load balancer.
Main entry points: AuthorizationApplication.java Authorization service · docker-compose.yml Docker Compose · SlotbookingApplication.java Booking service · request.js API request client
Components 20
Frontend
- Nginx frontend image · Builds and serves the SPA.
Frontend/Athledger-UI/Dockerfile - React SPA
Frontend/Athledger-UI/src/App.js - API request client
Frontend/Athledger-UI/src/api/request.js
Spring services
- Authorization service
Backend/authorization/src/main/java/com/athledger/authorization/AuthorizationApplication.java - Auth controllers · Login and authentication flows.
Backend/authorization/src/main/java/com/athledger/authorization/controller/AuthController.java - JWT security boundary · Issues and validates protected requests.
Backend/authorization/src/main/java/com/athledger/authorization/config/JwtAuthFilter.java - Users and roles
Backend/authorization/src/main/java/com/athledger/authorization/repository/UserRepository.java - Slot management service
Backend/slotmgmt/src/main/java/com/athledger/slotmgmt/SlotmgmtApplication.java - Slots and sports API · Administration of slots and sport catalog.
- Booking service
Backend/slotbooking/src/main/java/com/athledger/slotbooking/SlotbookingApplication.java - Booking API
- Booking service layer · Owns booking availability and state.
- Booking data
Notifications
- Notification service
Backend/notification/src/main/java/com/athledger/notificationservice/NotificationApplication.java - Event consumers · Consumes user and booking events.
- Email delivery
Runtime infrastructure
- Docker Compose · Working local deployment path.
docker-compose.yml - Kafka
- MySQL · Initialized with shared schema data.
init.sql - Kubernetes manifests · Notification deployment is not visible.
Connections 30
- Docker Compose → Nginx frontend image: runs
- Docker Compose → Authorization service: runs
- Docker Compose → Slot management service: runs
- Docker Compose → Booking service: runs
- Docker Compose → Kafka: provisions
- Docker Compose → MySQL: provisions
- Nginx frontend image → React SPA: serves
- React SPA → API request client: uses
- API request client → Auth controllers: authentication requests
- API request client → Slots and sports API: slot and sport requests
- API request client → Booking API: booking requests
- Authorization service → Auth controllers: exposes
- Auth controllers → JWT security boundary: authenticates
- Auth controllers → Users and roles: persists
- Authorization service → Kafka: publishes user events
- Slot management service → Slots and sports API: exposes
- Slot management service → Authorization service: checks authorization
- Booking service → Booking API: exposes
- Booking API → Booking service layer: delegates
- Booking service layer → Booking data: persists
- Booking service → Authorization service: checks authorization
- Booking service → Kafka: publishes booking events
- Notification service → Event consumers: runs
- Kafka → Event consumers: delivers events
- Event consumers → Email delivery: triggers
- Authorization service → MySQL: stores users
- Slot management service → MySQL: stores catalog
- Booking service → MySQL: stores bookings
- Kubernetes manifests → Nginx frontend image: defines deployment
- Kubernetes manifests → Authorization service: defines deployment