How shootpointer/shootpointer_be works
Project Type & Purpose
• Monolithic Spring Boot REST API backend
• Domains: Community, Highlight, Member (with Kakao OAuth)
• Cross-cutting concerns: security (JWT), logging (AOP), error handling, API docs (Swagger)
• Persistence via JPA repositories and an external relational database (spun up via Docker Compose)
Main Components
A. Clients / External Consumers
– Web/Mobile frontend
– Third-party OAuth (Kakao)
B. API Gateway & Security Layer
– JwtAuthenticationFilter (Spring Security filter)
– SecurityConfig
C. Presentation Layer (Controllers)
– /community, /highlight, /member controllers
– KakaoController for OAuth login
D. Service Layer
– Domain services (e.g., CommunityService, HighlightService, MemberService, KakaoService, RefreshTokenService)
– Business logic, DTO mapping
E. Repository Layer
– Spring Data JPA repositories under each domain
– CRUD operations on entities
F. Domain Model
– Entities for Community, Highlight, Member, MsgEntity, BaseEntity, BaseTimeEntity
G. Global Infrastructure
– Exception handling: GlobalExceptionHandler, CustomException
– AOP logging: CustomLogAspect, CustomLog annotation
– Utility classes: JwtUtil, EncryptConverter
– Configuration: SwaggerConfig, application settings
H. Database & External Services
– Relational database (MySQL/Postgres) defined in docker-compose.yml
– Redis or other caches if present (not shown in file tree)
– Kakao OAuth API
Component Relationships & Data Flow
1. Client → HTTP Request → Security Filter (JWT authentication)
2. If authenticated, → Controller
3. Controller → calls Service → applies business rules
4. Service → Repository → SQL → Database
5. Repository → returns Entities → Service → maps to DTO → Controller → Response
6. Errors bubble → GlobalExceptionHandler → standard ApiResponse with error codes
7. Swagger UI exposes endpoints via SwaggerConfig
8. AOP Logging wraps controllers/services annotated with @CustomLog
Architectural Patterns & Design Principles
• Layered (Presentation, Service, Repository)
• Domain-Driven package structure (each domain in its own package with controller/dto/entity/repository/service subpackages)
• Cross-cutting via AOP and centralized exception handling
• Security as a separate concern implemented via filters and config
• Configuration-driven (YAML, Docker Compose)
• Testing structure mirrors production code by domain and function
Detailed Steps
6. On top or side, illustrate cross-cutting modules: AOP Logging, Exception Handler, Swagger.