layered-architecture

Featured

Best practices for VGV layered monorepo architecture in Flutter, covering the four layers Data, Repository, Business Logic, and Presentation, their unidirectional dependency rules, model transformation across layer boundaries, and app bootstrap wiring. Use when structuring a multi-package Flutter app, creating data or repository packages, defining layer boundaries, or wiring dependencies between packages through path dependencies in pubspec.yaml, barrel exports, and RepositoryProvider.

Data & Documents 165 stars 23 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
74
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Layered Architecture Layered monorepo architecture for Flutter apps — four layers organized as independent Dart packages with strict unidirectional dependencies. --- ## Core Standards Apply these standards to ALL layered architecture work: - **Four layers** — Data, Repository, Business Logic, Presentation — every feature spans exactly these four layers - **Unidirectional dependencies** — Presentation → Business Logic → Repository → Data — never skip or invert a layer - **Data and Repository layers live in `packages/`** — each is an independent Dart package with its own `pubspec.yaml` - **Business Logic and Presentation live in `lib/`** — organized by feature within the app - **Data layer packages contain zero domain/business logic** — they must be reusable in unrelated projects - **No inter-repository dependencies** — repositories never import other repositories - **No Flutter SDK in data or repository packages** — scaffold with the `very_good_cli` MCP server `create dart_package` tool - **One repository per domain** — `user_repository`, `weather_repository`, `auth_repository` - **Path dependencies for local packages** — never `git:` or pub version references for packages in the same repo - **Barrel exports at every package boundary** — `src/` is never imported directly by consumers - **Repositories accept data layer dependencies via constructor injection** — never instantiate clients internally - **App bootstrap wires all layers** — `main_<flavor>.dart` creates client...

Details

Author
VeryGoodOpenSource
Repository
VeryGoodOpenSource/vgv-ai-flutter-plugin
Created
7 months ago
Last Updated
4 days ago
Language
Shell
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

Data & Documents Listed

flutter-architecture

Current (2026) Flutter app architecture from the Flutter team's official guide, Very Good Ventures and LeanCode - UI layer (View + ViewModel/Cubit/Notifier) and data layer (Repository + Service), feature folders, dependency injection, Result/Command patterns, networking and JSON models, go_router, monorepos with pub workspaces, day-one project setup, scaling teams, legacy refactoring. Use this whenever creating a new Flutter project or feature, deciding folder structure, adding a repository/API/service layer, choosing packages, reviewing Flutter code for maintainability, or scaling a Flutter team - even if the user only asks "where should this file go".

0 Updated yesterday
abugeek
AI & Automation Listed

flutter-architecture

Enforces a right-sized feature-first layered MVVM Flutter architecture — features are folders and cross-cutting foundations become packages only when a compile wall earns it, a strict downward-only dependency DAG, dumb Views over one Notifier/AsyncNotifier ViewModel per feature, repositories as the single source of truth and single write path returning immutable domain values, abstractions only where something genuinely can't run in a test, and Riverpod 3.x as the one context-free DI+state mechanism (no get_it/injectable/package:provider container). Use when creating a Flutter feature or file, deciding folder-vs-package or where a class belongs, naming a Screen/Notifier/Repository/Service, wiring providers or a composition-root/bootstrap.dart, adding a use-case/domain layer, resisting over-engineering on a small app, or reviewing whether a change respects the layer boundaries.

0 Updated 1 months ago
zakariaf
AI & Automation Listed

flutter-apply-architecture-best-practices

Architects a Flutter application using the recommended layered approach (UI, Logic, Data). Use when structuring a new project or refactoring for scalability.

5 Updated today
SamuelAlev