dify_admin/docs/architecture/overview.md

49 lines
1.0 KiB
Markdown

# Dify Admin System Architecture
## Overall Architecture
```mermaid
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
1. User actions trigger API calls
2. Backend processes requests with business logic
3. Data persisted to database
4. Responses returned to frontend
5. 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)