How ash-project/ash works
Main Components
a. Core Framework Components:
• Resource Layer
• Attributes
• Relationships
• Actions (Create/Read/Update/Destroy)
• Calculations
• Validations
• Changes
• Domain Layer
• Data Layer
• Authorization Layer
• Notifier System
• Reactor System
b. Extension Points:
• Data Layer Implementations (ETS, Mnesia)
• Authentication Systems
• API Interfaces
• Notifiers
┌─────────────────────────────────────────────┐
• Client Applications │
• ┘
• ↓
┌─────────────────────────────────────────────┐
• Extension Layer │
• JSON:API - GraphQL - Phoenix - Auth │
• ┘
• ↓
┌─────────────────────────────────────────────┐
• Core Engine │
• ┌─────────────┐ ┌──────────┐ ┌──────────┐ │
• Resource │ │ Domain │ │ Reactor │ │
• ┘ └──────────┘ └──────────┘ │
• ┌─────────────┐ ┌──────────┐ ┌──────────┐ │
• Policy │ │ Notifier │ │ Action │ │
• ┘ └──────────┘ └──────────┘ │
• ┘
• ↓
┌─────────────────────────────────────────────┐
• Data Layer │
• ETS - Mnesia - Postgres - SQLite │
• ┘
Key Relationships
• Resource to Data Layer connections
• Authorization flow through policies
• Action processing pipeline
• Extension point interfaces
• Notifier system event flow
• Reactor system workflow
Important Details
a. Resource Layer Details:
• Attribute management
• Relationship handling
• Action processing
• Validation pipeline
b. Security Components:
• Policy enforcement
• Authorization checks
• Actor system
c. Data Layer Interface:
• Data storage abstractions
• Query handling
• Transaction management
Implementation Notes
• Version information and compatibility notes