Architecture
Understanding E-Core's layered architecture
Architecture
E-Core follows a clean, layered architecture that promotes separation of concerns and testability.
Layer Overview
┌─────────────────────────────────────────┐
│ Presentation Layer │
│ (UI, Widgets, Screens) │
├─────────────────────────────────────────┤
│ Application Layer │
│ (State, Providers, Notifiers) │
├─────────────────────────────────────────┤
│ Domain Layer │
│ (Entities, Use Cases) │
├─────────────────────────────────────────┤
│ Data Layer │
│ (Repositories, Data Sources, DTOs) │
└─────────────────────────────────────────┘Package Responsibilities
Foundation
Core entities, value objects, and utilities shared across all layers.
State
Riverpod providers and notifiers for reactive state management.
Data
Repository implementations, data sources, and network/cache handling.
UI
Pre-built widgets and components following the design system.
Data Flow
- User interaction triggers a UI event
- Provider/Notifier handles the event and calls repositories
- Repository coordinates data sources and returns domain entities
- State updates propagate through Riverpod to rebuild UI