How mocco329/phorest works
Main Components
• Backend (dev/BE): This is a Spring Boot application managing core business logic, REST APIs, security (JWT, authentication, and OAuth possibly via Kakao), and database interactions via JPA with MySQL. It includes dedicated packages for controllers, services, repositories, domain models, DTOs, and various configurations (e.g., SecurityConfig, SwaggerConfig, S3 uploader integration, etc.).
• Frontend (dev/FE): A React application using Redux for state management. It is organized into pages, components, APIs (to interact with the backend), assets, and store modules. This part handles the client-side user interface for users to view and interact with the photo community service.
• IoT Modules (dev/IoT): These contain several subprojects:
• AR_JS: Uses external AR libraries (NFT marker creator) to generate or interact with AR content.
• PyQT: Multiple versions are present for developing photo booth or kiosk functionality using Qt and OpenCV. These likely handle image capture, UI for photo booths, and even some processing (face tracking and more).
• Infrastructure & External Services:
• AWS: The system is or was deployed on AWS (EC2, S3 for storage) with Nginx for routing.
• Jenkins and GitLab: Automated build and deployment pipelines are set up to trigger on pushes/merges.
• Database: MySQL (as inferred from the README and BE config).
• External APIs: There is integration with Kakao (for messaging, etc.) and possibly other external AR services.
Relationships & Interactions
• Clients (end-users) interact with the Frontend (React) which makes API calls to the Backend.
• The Backend provides REST endpoints for user authentication, photo management, frame creation, messaging, etc.
• The Backend communicates with the database (MySQL) for persistent storage and with AWS S3 to store images and other assets.
• The IoT modules (photo booth devices / AR applications) interact with the Backend either by submitting captured images (via QR code triggered URLs) or by fetching configuration data.
• Build and deployment are managed via Jenkins (monitoring the dev branch in GitLab), which then updates the services on AWS EC2.
• Security is ensured using JWT-based authentication and Spring Security configuration layers.
Architectural Patterns & Design Principles
• Layered Architecture in the Backend: Separate layers for controllers, services, and repositories, adhering to principles like separation of concerns.
• RESTful API Design: Clearly defined endpoints for various photo and user actions.
• Frontend as Single-Page Application (SPA): Organized with React components, Redux state management and clear separation of presentation and API handling.
• IoT Modules as Independent but Integrated Systems: Although built in different languages (JavaScript and Python/PyQT), they represent distinct deployment units that integrate with the main system via network calls.
• Build and Deployment Automation: Using Jenkins for CI/CD, ensuring that integration across FE/BE/IoT is continuously tested and deployed.