How tancrb/ptn_shop_fe works
High-Level Architecture Components
a) Client Layer (Frontend)
• Core App Components
• Layout Components
• Pages/Routes
• Shared Components
• Context Providers
Component Structure
a) Layouts (Blue section)
• AuthLayout
• MainLayout
• MainLayoutAdmin
• ProductLayout
b) Pages (Green section)
• Public Pages (Home, Products, Blog, Contact, etc.)
• Admin Pages (Dashboard, Account Manager, Order Manager, etc.)
• Authentication Pages (Login, Register)
c) Components (Yellow section)
• UI Components (Button, Input, Dialog, Star, etc.)
• Navigation Components (Headers, Navigation, Breadcrumbs)
• Notification Components (Toastify variants)
d) Containers (Purple section)
• Home Content Containers
• Product Content Containers
• Contact Content Containers
State Management & Data Flow
a) Context Layer (Orange section)
• CartContext
• How it connects to relevant components
Feature Modules
Related features:
a) Admin Module
• Account Management
• Order Management
• Product Management
• Dashboard
b) Shopping Module
• Product Listing
• Product Details
• Shopping Cart
• Wishlist
Technical Details
Technical annotations:
• TailwindCSS for styling
• React Router for navigation
• Public assets structure
• Double lines: Two-way communication
Additional Notes
• Admin-only routes
• Protected routes
• Authentication flow
• Where forms and dialogs are used
The modular nature of the UI components
Remember to maintain a balance between detail and clarity, focusing on the architectural decisions that impact development and maintenance while avoiding overwhelming detail at the component level.