Architecture
DartWay is a highly opinionated framework.
It means — we don't give you much freedom in how to do things.
Our goal is to provide a good enough solution for any common problem so you can build whatever you want fast and without mess.
Less options → more consistency → faster development.
CRUD as the foundation
The key concept of DartWay is the model and respective CRUD operations.
We provide:
- Generic data layer for Flutter apps.
- Generic CRUD endpoints on the server side.
All user interactions and API communication are expressed through CRUD.
This makes features predictable, data access unified, and assistants able to scaffold new features without confusion.
👉 For details, see Domain & CRUD Principles.
Feature Architecture
Every feature in DartWay is an end-to-end flow that spans both server and Flutter sides.
This ensures that data, logic, and UI stay consistent and predictable.
Server side
-
Models
Define entities and relations for your domain.
Example:UserProfile,BalanceEvent. -
CRUD Configuration
Customize behavior of default CRUD operations with access rules, validations, pre/post-processing or event handling.
Example:SaveConfig,DeleteConfig,GetModelConfig.
Flutter side
Each feature lives in a compact folder that fully encapsulates its UI and logic.
-
Entry Point
Main widget or context extension that exposes the feature to the outside world.
→ This is the only file that can be imported externally. -
Widgets
UI elements of the feature — layout, transitions, interactions, and data bindings. -
Logic
Local state orchestration and helpers required only for this feature.
May include enums, providers, notifiers, extensions, etc.
Additionally, a feature may use project-level layers:
-
Core
Global utilities like router, app-wide providers or configs. -
Domain
Extensions on models and enums containing business logic that must stay consistent across features. -
UI Kit
Lean UI widgets and styling helpers, fully isolated from logic or state.
👉 For detailed step-by-step rules, see Feature Architecture.
Why It Matters
- Consistency → features are always structured the same way.
- Maintainability → upgrades and refactors are predictable and safe.
- AI-friendly → automated code generation follows fixed patterns.
- Scalability → new features add value without adding chaos.