Keyboard Shortcuts

j / kScroll down / up
ggScroll to top
GScroll to bottom
K / /Open search
?Show this help
EscClose search / help
n / NNext / previous section
hGo to landing
dGo to docs
:Command mode — type section name

Press ? or Esc to close

Getting Started

Architecture Overview

A feature-first Flutter architecture. Everything lives under features/; shared, stateless services live under config/. The goal is predictability: any developer can open any feature and know exactly where things are.

The big picture

UI reads state from a Cubit. The Cubit calls a Store. The Store orchestrates a DataSource (network) and optionally a Local (cache). All errors are caught centrally and surfaced through overlays — never thrown to the UI.

UI (StatelessWidget)
BlocBuilder / context.read
Cubit
Store (BaseStore)
DataSource ApiClient (Dio)
Local (sqflite) opt-in cache
ApiResponse<T> back up the chain

Layers

LayerOwnsKnows about
PresentationWidgets onlyCubit state, design tokens
Logic (Cubit)UI stateStore
StoreData orchestrationDataSource, Local
DataSource / LocalRaw I/ONothing above them
Config / CoreGlobal servicesOther config only

Tech stack

ConcernLibrary
Routinggo_router
Stateflutter_bloc (Cubit only)
DIget_it
Networkdio
Local cachesqflite (opt-in)
Persistenceshared_preferences, flutter_secure_storage
Connectivityconnectivity_plus
Firebaseanalytics · crashlytics · messaging · remote_config
Logginglogger
Three rules that never bend:
Feature-first — one folder per feature, nothing leaks out.
Cubit is the only state primitive — no Bloc.
Tokens only — UI never hardcodes colors, sizes, or strings.
sam's arch — A Pragmatic Flutter Architecture