How zhzkal2/piyak-hackathon works
High-Level Components
a) Client Layer (Frontend)
• React-based SPA
• Component structure for forms and user interface
• State management with Zustand
b) Server Layer (Backend)
• Spring Boot application
• REST API endpoints
• Authentication services
• Email services
c) External Services
• OpenAI GPT API
• SMTP Email Service
• Google OAuth
Detailed Component Breakdown
Frontend Components:
• Profile Management (Form1Picker through Form4Picker)
• Email Composition Interface
• Authentication Components (SocialLogin)
• Navigation (GNB, Header)
• State Management Store (useProfileStore, useUserInfo)
Backend Components:
• User Management Module
• OAuth Controller
• User Service
• Social Login Integration
• Email Module
• Email Controller
• Email Service
• ChatGPT Service
• Gmail Service
• Templates Module
• Templates Controller
• Templates Service
• Configuration Module
• REST Template Config
• Web Config
Flow Representation
Key flows:
User Authentication Flow
• Social Login → OAuth Controller → User Service
Email Generation Flow
• Frontend → Email Controller → ChatGPT Service → OpenAI API
Email Sending Flow
• Email Service → SMTP → External Email Server
Additional Elements
Supporting components:
• Database connections
• API Gateway/Entry points
• Security layers
• Caching mechanisms (if any)
Specific Implementation Details
Architectural patterns:
• MVC pattern in backend
• Component-based architecture in frontend
• Service-oriented architecture for email and AI integration