How spawnrider/directus works
High-Level Architecture Components
a) Frontend Layer:
• Vue.js Admin App (under /app directory)
• Modules system
• Interface components
• Layout components
• Components
b) API Layer:
• REST API endpoints
• GraphQL API
• Authentication/Authorization system
• File storage system
• Cache system
• Event emitter system
c) Database Layer:
• SQL database support (PostgreSQL, MySQL, SQLite, OracleDB, MariaDB, MS-SQL)
• Migration system
• Query builder
Key Relationships
• API routes to controllers
• Controller to service layer communication
• Service layer to database interactions
• Authentication flow
• File storage operations
• Cache interactions
Specific Implementation Details
Specialized subsystems:
• Extensions system (displays, interfaces, layouts, modules)
• Authentication providers
• File storage providers (local, S3, GCS, Azure)
• Activity tracking
• Webhook system
• Email system
[Client Layer]
• ↓ ↑
[API Gateway Layer]
• ↓ ↑
[Service Layer]
• ↓ ↑
[Data Access Layer]
• ↓ ↑
[Database Layer]
Important Subsystems to Detail
a) API Structure:
• Routing system (/api/src/controllers)
• Middleware chain
• Authentication flow
• Permission system
b) Extension System:
• Extension points
• Interface hooks
• Layout integration
• Module system
c) Storage Abstraction:
• Local file system
• Cloud storage providers
• File transformations
Key Flows to Illustrate
• Authentication flow
• CRUD operations path
• File upload/download process
• Cache interaction
• Extension loading
• Webhook execution
Additional Elements
Include:
• Version information
• Database support matrix
• External service integration points
Implementation Notes
• Use standardized UML notation where applicable
• Clear labels for all components
• Both synchronous and asynchronous communication paths
• Scalability points
• Security boundaries
Optimization Points
Highlight:
• Cache layers
• Database connection pooling
• File storage optimization
• API rate limiting
• Query optimization
Remember to include notes about:
• Supported databases
• Authentication methods
• File storage options
• Extension capabilities
• API endpoints (REST/GraphQL)