1.0 KiB
1.0 KiB
Dify Admin System Architecture
Overall Architecture
graph TD
A[Frontend] -->|API Calls| B[Backend]
B --> C[Database]
B --> D[External Services]
C --> E[(PostgreSQL)]
C --> F[(SQLite)]
Core Components
Frontend
- Framework: Vue 3 + TypeScript
- State Management: Pinia
- UI Library: Element Plus
- Routing: Vue Router
Backend
- API Services:
- Account Management
- Tenant Management
- Model Management
- Provider Management
- Core Modules:
- Database Access
- Encryption
- Operation Logging
Data Flow
- User actions trigger API calls
- Backend processes requests with business logic
- Data persisted to database
- Responses returned to frontend
- Frontend updates state and UI
Security Architecture
- JWT Authentication
- RSA Encryption for sensitive data
- Role-based Access Control
- Audit logging
Deployment
- Frontend: Static hosting (Vite)
- Backend: Containerized microservices
- Database: PostgreSQL (primary), SQLite (logging)