How parkjto/ige works
Project type and purpose
• This is a full-stack web application (“IgE”) providing food allergy information, personalized menu recommendations, and restaurant location guides.
• The backend is a Spring Boot monolith exposing REST APIs; the frontend is a React SPA consuming those APIs and embedding map services.
File structure
• Top-level: build scripts (Gradle), README, .env
• src/main/java/com/SW/IgE: Spring Boot code organized in controller, service, repository, entity, converter, security, exception, util
• src/main/frontend: typical React structure (public, src/pages, components, CSS modules) plus setupProxy.js for API proxying
• src/main/resources: application.properties, data.sql
• External service clients configured via RestTemplateConfig and NaverSearchService
• Tests in src/test/java
Key architectural patterns and design principles
• Layered (Controller → Service → Repository → Database)
• MVC flavor on backend (controllers handle HTTP, services handle business logic, repositories handle persistence)
• Single-page application front-end communicating over REST
• Dependency injection (Spring) and modular React components
• Separation of concerns: allergy data retrieval vs. menu logic vs. user management vs. map integration
Main components and interactions
a. Frontend (React.js SPA)
• UI components & pages (Login, Join, Main, Search, MapComponent, RandomMenu, etc.)
• HTTP client (fetch/axios via setupProxy) to backend
• Widget invoking Kakao Map API in MapComponent; custom hooks call navigator.geolocation
b. Backend (Spring Boot)
• REST controllers (UserController, MenuController, InformController, MServerController) expose endpoints under /api/*
• Services implement business rules (UserService, MenuService, InformService, NaverSearchService)
• Repositories (JPA) persist entities (User, Menu, Inform)
• Security layer (SecurityConfig, CustomUserDetails, UserDetailsServiceImpl) for authentication & authorization
• RestTemplateConfig for external API calls (Naver Local Search)
c. Database
• Relational database (MySQL/H2) storing users, menu items, allergy info (initialized via data.sql)
d. External Services
• Kakao Map API for map rendering
• Naver Local Search API for restaurant lookup
e. (Optional) Caching or async tasks—none found here