How 2602hoang/admin-nextjs works
High-Level Architecture Overview
a) Client Layer (Frontend):
• Admin Layout (for authenticated admin routes)
• Auth Layout (for login/signup)
• Shared Components
• Context Providers
• Query Client (React Query)
b) Server Layer (Backend):
• API Routes
• Authentication/Authorization Middleware
c) Data Layer:
• MySQL Database (hosted on Aiven)
• External Services (Google Apps Script API)
Detailed Component Breakdown
Frontend Components (organize in connected blocks):
• Admin Dashboard Layout
• Navigation Components
• Header Components
• Content Area with sub-sections:
> Home/Analytics
> Products
> Orders
> Sales Reports
> Messages
> User Management
> Settings
• Authentication Layout
• Login
• Signup
Data Flow Visualization
• Client-Server Communication:
• API Requests (Axios)
• Authentication Flow
• Data Fetching (React Query)
• State Management Flow:
• Context Providers
• Component-level State
• API State Management
Technical Stack Visualization
• UI Layer:
• Ant Design
• Tailwind CSS
• SASS
• Application Layer:
• TypeScript
• Next.js
• React Query
• Backend Layer:
• Node.js
• Express
• Database Layer:
• MySQL
Integration Points
External integrations:
• Vercel Deployment
• Aiven Database
• Google Apps Script API
• Authentication Services