How k1mb1/edu works
Main Components
a) Client Layer:
• External clients (Web/Mobile)
• Swagger UI for API documentation
b) Security Layer:
• Keycloak Authentication Server
• JWT Authentication/Authorization flow
• Security Config components
c) API Layer:
• REST Controllers (CourseController)
• Request/Response DTOs
• Error Handling
• OpenAPI Configuration
d) Service Layer:
• Business Logic Services (CourseService, LessonService, UserService)
• DTO-Entity Mappers
• Exception Handling
e) Persistence Layer:
• Repositories
• Entity Models
• PostgreSQL Database
**[External Clients] → [Load Balancer/Gateway*]**
• ↓
[Keycloak Auth Server] ←→ [Spring Boot Application]
• ↓
• [PostgreSQL Database]
API Layer:
[Controllers] → [Request/Response DTOs] → [Request/Response Mappers]
• ↓
Security Layer:
[JWT Converter] → [Security Config] → [Authorization Utils]
• ↓
Service Layer:
[Service Interfaces] → [Service Implementations] → [DTO/Entity Mappers]
• ↓
Repository Layer:
[JPA Repositories] → [Entity Models] → [PostgreSQL]
Important Relationships to Highlight
• Authentication flow between client → Keycloak → Application
• JWT token validation path
• Data flow from controllers through services to repositories
• Mapping relationships between DTOs and Entities
• Error handling flow
Technical Details
• Spring Boot 3.x as the foundation
• OAuth2/JWT security implementation
• JPA/Hibernate for database access
• MapStruct for object mapping
• Swagger/OpenAPI for documentation
Additional Elements
• Version information
• Async operations if any
• Test coverage scope
• Infrastructure components from docker-compose
Notes for Implementation
• Maintain consistent styling
• Clear labels
• Brief descriptions for complex flows
• Creating separate detailed views for:
• Authentication flow
• CRUD operations
• Error handling