How kimjunpyo/buyte works
Main Components Identification
• Frontend Client: This includes the React application (pages, components, hooks, redux state management, routing, etc.). Emphasize that it handles multiple presentation layers (main, custom design, store list/detail pages, chat interface, map view, user input forms, etc.) and makes REST API calls.
• Backend Server: Built with Spring Boot. This layer includes multiple modules or packages such as:
• Member Management & Authentication: Covers user registration, JWT-based security, OAuth with Google, and related Spring Security configuration.
• Product & Customization Module: Manages standard products and custom product design including image uploads handled via S3 integration.
• Order & Payment Processing: Handles carts, orders, and integrates with iamport for payment simulation.
• Chat Service: Provides real-time chat capabilities using WebSocket (as indicated by the “chat/config” and related controller, DTO, and entity classes).
• Store & Ingredient Management: Supports listing stores, mapping to locations, managing ingredients, and logging.
• Database: Likely a MySQL instance that persists member, order, product, store, and chat data.
• External Services:
• AWS S3 for image storage (as seen by the S3Service and S3Config classes).
• Payment gateways (iamport/KakaoPay simulation).
• Kakao Map API for geolocation and mapping features.
Relationships and Data Flow
• The Frontend (React) communicates with the Backend (Spring Boot) through RESTful APIs for most operations like user authentication, product and order management.
• Real-time features (chat) are facilitated via WebSockets where a dedicated controller/service handles message broadcasting (e.g., using Redis-based pub/sub as indicated by RedisPublisher and RedisSubscriber).
• Authentication and authorization flow involves JWT, with several filters (JwtAuthenticationFilter, JwtVerificationFilter) and associated security configuration.
• Custom product design components on the frontend interact with backend endpoints to save or update designs, then store images using the S3 integration.
• And store components fetch geolocation and store detail data from the backend (possibly with additional external map API integration).
Architectural Patterns and Design Principles
• Separation of Concerns: Clear division between frontend and backend responsibilities.
• MVC Pattern on the server side: Controllers (for handling requests), Services (business logic), and Repositories/Entities (for database interaction).
• Use of WebSockets and Redis for chat functionality.
• API-driven design: All communications between frontend and backend occur over well-defined APIs.