Expert on GigLedger's architecture, app structure, feature modules, and state management. Use when implementing features, creating new modules, or understanding the architectural patterns. References docs/07_app_architecture.md.
This skill provides deep expertise on GigLedger's application architecture:
Primary Reference: docs/07_app_architecture.md
This document is the authoritative source for all architectural decisions.
Every feature in GigLedger follows this structure:
lib/features/{feature_name}/
├── presentation/
│ ├── pages/ # Screen components
│ ├── widgets/ # Reusable UI components
│ └── providers/ # State management
│
├── application/
│ ├── use_cases/ # Business logic operations
│ └── services/ # Coordinating services
│
├── domain/
│ ├── models/ # Core business entities
│ └── repositories/ # Repository interfaces (contracts)
│
└── data/
├── dto/ # Data Transfer Objects
├── data_sources/ # Database/API implementations
└── repository_impl/ # Repository interface implementations
What it does:
What it CANNOT do:
Dependencies: Application layer only (use cases)
What it does:
What it CANNOT do:
Dependencies: Domain layer only (models, repository interfaces)
What it does:
What it CANNOT do:
Dependencies: None (pure code)
What it does:
What it CANNOT do:
Dependencies: Domain layer (implements interfaces, uses models)
The complete data flow through all layers:
User Action (UI)
↓
Presentation Layer (Component/Provider)
↓
Application Layer (Use Case)
↓
Domain Layer (Repository Interface)
↓
Data Layer (Repository Implementation)
↓
Database / Backend
↓
Data Layer (DTO → Domain Model)
↓
Application Layer (Business Logic)
↓
Presentation Layer (Display)
Reference your framework's state management patterns here.
When creating a new feature (e.g., profile):
mkdir -p lib/features/profile/{presentation,application,domain,data}
mkdir -p lib/features/profile/presentation/{pages,widgets,providers}
mkdir -p lib/features/profile/application/{use_cases,services}
mkdir -p lib/features/profile/domain/{models,repositories}
mkdir -p lib/features/profile/data/{dto,data_sources,repository_impl}
Reference: docs/07_app_architecture.md testing section
What to test:
What to test:
What to test:
Shared utilities live in lib/core/:
lib/core/
├── config/ # Configuration
├── constants/ # App-wide constants
├── domain/models/ # Shared domain models
├── error/ # Error types and handlers
├── logging/ # Logging utilities
├── network/ # Network utilities
├── services/ # Shared services
├── theme/ # Theming
├── utils/ # Helper functions
└── widgets/ # Shared widgets
Wrong: Presentation → Data Correct: Presentation → Application → Domain → Data
Wrong: Pass DTOs to use cases or presentation Correct: Transform DTOs to domain models in data layer
Wrong: Business logic in widgets or repositories Correct: Business logic in application layer use cases
Wrong: Local component state for shared data Correct: Proper state management providers
Use this skill when:
When implementing a feature:
GigLedger's architecture ensures:
Remember: Always reference docs/07_app_architecture.md as the ultimate source of truth for architectural decisions.