How ngthanhvu/du-an-mau-summer2024 works
Main Components
a) Client Layer:
• Frontend Views (app/views/home)
• Admin Views (app/views/admin)
• Static Assets (CSS, JS)
b) Application Layer:
• Controllers (AdminController, ViewController)
• Models (Product, User, Cart, Order, etc.)
• Authentication System (including Google OAuth)
c) Data Layer:
• MySQL Database (indicated by duanmau.sql)
• File Storage (uploads directory)
d) External Services:
• Payment Gateway (VNPAY integration)
• Google Authentication
• Email Service (indicated by Mail.php model)
[Client Tier]
• ↕
[Application Tier]
• ↕
[Data Tier]
Detailed Component Breakdown
a) Client Tier (Top):
• Subcomponents for each major view (Home, Products, Cart, Checkout, etc.)
• Static asset management
b) Application Tier (Middle):
• Controllers section (showing AdminController and ViewController)
• Models section (showing all model classes)
• Router/Request Handler (.htaccess and index.php)
• Authentication Manager component
• Payment Processing component
• Email Service component
c) Data Tier (Bottom):
• Database component (MySQL)
• File Storage component
• Cache/Session Storage
Connection and Flow Representation
• Double lines (⇒) for data flow
Additional Elements
• Configuration Management (config directory)
• Third-party Integrations (Google, VNPAY)
• Error Handling (404.html)
Notes for Implementation
• The MVC architecture pattern
• Security flow for both public and admin areas
• Integration points with external services
• Data flow between components