Architecture overview
stackchain supports four architecture values in stackchain.yaml:
| Value | Layout style |
|---|---|
feature_first |
Layered vertical slices (data / domain / presentation) |
clean |
Same directories as feature_first; stricter conventions |
mvvm |
data / models / viewmodels / views / widgets |
mvc |
models / controllers / views / widgets |
Configure with:
stackchain: architecture: feature_firstShared project skeleton
Section titled “Shared project skeleton”Regardless of architecture, init creates:
lib/ app/ # app.dart, theme/, config/, router/ core/ # network, storage, di, errors, utils, services, widgets, session features/<name>/ main.dart bootstrap.dart main_dev.dart # when flavors: true main_staging.dart main_prod.dart.stackchain/lock.yamlChoosing an architecture
Section titled “Choosing an architecture”| Choose | When |
|---|---|
| Feature First | Default for most product apps; clear vertical ownership |
| Clean | Same structure with stricter layer discipline expectations |
| MVVM | ViewModels map cleanly to your UI toolkit / designers |
| MVC | Especially with GetX (getx_mvc preset) |