How antkaynak/keyist-ecommerce works
High-Level Components
• Client Application (Angular Frontend)
• Authorization Server (OAuth2)
• Resource Server (Backend API)
• MySQL Database
Client Application (Angular) Layer
Following components:
• Store Module (using NgRx for state management)
• Auth Store
• Cart Store
• Order Store
• Product Store
• Core Modules:
• Account
• Auth
• Browse
• Cart
• Checkout
• Product
• Services Layer:
• Account Service
• Auth Guard
• Cart Service
• Order Service
• Product Service
• Token Service
Authorization Server
OAuth2 components:
• Auth Server Config
• Security Config
• User Repository
• Token Management
Resource Server
Components:
• REST Controllers Layer
• Service Layer:
• Product Service
• Cart Service
• Order Service
• User Service
• Cache Services
• Repository Layer
• Model Layer:
• Entities
• DTOs
• Request/Response objects
Database Layer
Main database tables:
• Users
• Products
• Orders
• Cart
• Categories
• Variants
Integration Points
• Client → Authorization Server (OAuth2 flow)
• Client → Resource Server (Protected API calls)
• Authorization Server → Database
• Resource Server → Database
• Resource Server → Authorization Server (Token validation)
Additional Elements
Include:
• Cache layer for products
• Email service integration
• CORS filter
• Security boundaries
Styling Guidelines:
• Blue: Frontend components
• Green: Authorization server
• Orange: Resource server
• Gray: Database
• Purple: External services
• Double lines: Data synchronization
• Security boundaries
• Cache mechanisms
Important Architectural Notes: