This repository is a Melos-managed Flutter monorepo for a scalable design system and component library.
packages/ds_tokens: semantic design tokens implemented asThemeExtensions.packages/ds_foundation: reusable UI primitives built on top of tokens.packages/ds_components: product-ready components built on top of foundation and tokens.apps/catalog: a Storybook-style catalog package for documenting and validating components.- Root app shell: the existing Flutter host in the repository root runs
apps/catalogimmediately on supported Flutter targets.
The component layer currently includes:
- Actions: buttons
- Inputs: text fields
- Feedback: badges and banners
- Surfaces: cards and chips
- Navigation/content rows: list tiles
- Overlays: dialogs
The catalog app includes dedicated pages for buttons, inputs, surfaces, feedback, dialogs, list items, and typography so the library shows a broader set of realistic app primitives.
ds_tokensmust not depend on any local package.ds_foundationmay depend only onds_tokens.ds_componentsmay depend only onds_foundationandds_tokens.- Apps may depend on any package, but packages must never depend on apps.
- Keep public APIs small. Prefer defaults, variant enums, and theme-driven styling over deeply nested configuration.
dart pub global activate melos
flutter pub get
melos bootstrap
melos run run:catalog
melos run test
melos run test:goldensIf you use FVM, prefer:
fvm flutter pub get
melos bootstrap
melos run run:catalogflutter pub get
melos run analyze
melos run format
melos run test
melos run test:goldens
melos run run:catalogImportant: this workspace root is a Flutter package, so use flutter pub ... at the repo root, not dart pub ....
- Create the component in
packages/ds_components/lib/src/<component>/. - Check whether new semantic tokens are needed. If so, add them in
ds_tokensfirst. - Keep the public API variant-based and theme-driven with sensible defaults.
- Ensure the component works with the shared theme and reads as part of the same visual system.
- Add semantics, keyboard focus behavior, and text-scale resilience as part of the initial implementation.
- Add or extend golden tests in
packages/ds_components/test/goldens/. - Add a catalog page or expand an existing page in
apps/catalog/lib/pages/. - Run
melos run analyze,melos run test, andmelos run test:goldensbefore publishing changes.