How baiwumm/vue3-admin works
Main Components Overview
The system should be represented as a three-tier architecture with the following main components:
Frontend (Web Layer):
• Vue3.5 Application
• Ant Design Vue Components
• UnoCSS Styling
• Pinia State Management
• Client-side Routing
Backend (Server Layer):
• Nest.js Application
• Authentication/Authorization
• API Controllers
• Business Services
• SSE (Server-Sent Events) for real-time notifications
Database Layer:
• PostgreSQL Database
• Prisma ORM
Key Architectural Elements
A. Frontend Architecture:
Web Application
• Core Modules
• Authentication
• Routing System
• State Management (Pinia)
• Internationalization
• Layout Components
• Admin Layout
• Global Header
• Menu System
• Theme Management
• Feature Modules
• User Management
• Role Management
• Menu Management
• System Settings
• Shared Services
• API Services
• Authentication
• Utils
B. Backend Architecture:
Server Application
• Core Modules
• Authentication
• Authorization
• Logging
• Feature Modules
• User Module
• Role Module
• Menu Module
• System Module
• Shared Services
• Prisma Service
• SSE Service
• Infrastructure
• Middleware
• Guards
• Filters
Data Flow Representation
Following key interactions:
• Authentication flow
• API request/response cycle
• Real-time SSE notifications
• Database operations through Prisma
• Dynamic route generation based on user roles
Key Integration Points
Critical integration points:
• Frontend-Backend API communication
• Authentication token handling
• SSE connection for real-time messages
• Database access through Prisma
• Dynamic menu generation based on user roles
Security Layer
Security components:
• JWT authentication
• Role-based access control
• API guards and interceptors
• Request validation
• Error handling