How yebinnnnn/mulcammatmap-be works
Project Type and Purpose
• Project type: A backend RESTful microservice (Spring Boot) providing restaurant-review functionality, JWT-secured endpoints, Slack integration, and geocoding via Naver’s API.
• Purpose: Expose endpoints for member auth, restaurant CRUD, reviews/comments, and handle Slack events; persist data to a relational database; enrich data with external geocoding.
High-Level Components
A. Clients
– Web/Mobile front end (consumers of the REST API)
– Slack (incoming slash commands or event subscriptions)
B. API Gateway / HTTP Layer
– Spring Security Filter Chain (CorsConfig, JwtAuthenticationFilter)
C. Application Core (Spring Boot)
1. Controllers (AuthController, RestaurantController, CommentController, ReviewController, SlackController, SlackEventController)
2. Services (MemberService, RestaurantService, CommentService, ReviewService, SlackService, GeocodingService)
3. Data Access Layer
– Repositories (Spring Data JPA): MemberRepository, RestaurantRepository, CommentRepository, ReviewRepository, etc.
– Entities (Member, Restaurant, Review, Comment, Category, CategoryRestaurant)
4. Configuration
– JWTTokenProvider, SecurityConfig, RestTemplateConfig, SwaggerConfig, AdminConfig, DataLoader
D. External Systems
– Naver Geocoding API (via RestTemplate)
– Slack API (incoming webhooks & event responses)
E. Database
– Relational DB (e.g. PostgreSQL/MySQL) accessed via JPA/Hibernate
F. Infrastructure / Deployment
– Docker/Kubernetes (not in repo, but include if used)
– Profiles: application-dev.yml vs application-prod.yml
Relationships and Data Flows
• From Controllers → Services (business logic).
• From Services → Repositories → Database (CRUD).
• From GeocodingService → Naver Geocoding API (external HTTP call).
• From SlackController/EventController → SlackService → Slack API (outgoing).
• Within the HTTP layer, show SecurityConfig enforcing JWT via JwtAuthenticationFilter.
Architectural Patterns & Design Principles
• Layered (Presentation → Business → Persistence).
• Dependency Injection (Spring beans).
• Single Responsibility per layer: Controllers orchestrate, Services implement business rules, Repositories handle ORM.
• External APIs encapsulated in their own services (GeocodingService, SlackService).
• Configs centralized under src/main/java/.../config.
Technologies & Frameworks
• Java 17+ with Spring Boot
• Spring MVC (REST controllers)
• Spring Security (JWT auth)
• Spring Data JPA / Hibernate
• Swagger (SwaggerConfig)
• RestTemplate (RestTemplateConfig)
• Gradle build system
• YAML profiles for dev/prod