# layered-architecture

> Claude/Codex skill by [@verygoodopensource](https://omgskills.com/library/verygoodopensource/index.md) · 173 stars · Updated 2026-10-20

VGV layered monorepo architecture in Flutter: four layers Data, Repository, Business Logic, and Presentation, unidirectional dependency rules, and model transformation across layers. Use when structuring a multi-package Flutter app, creating data or repository packages, defining layer boundaries, or wiring packages in app bootstrap via path dependencies, barrel exports, and RepositoryProvider. Use too when asked to put a domain model or shared class in an api\_client or data package, or to add a cross-package dependency the layers forbid. Also use for a new app described in one line ("I'm starting a weather app that reads from a REST API") plus a request for the package, project, folder, or directory layout, or for where a file or feature should live and which package code belongs in. Applies even when the user never says monorepo, layer, or architecture.

Tags: a11y, ai, best-practices, bloc, claude-code, dart, flutter, i18n, l10n, plugin, skills, state-management, testing, very-good-analysis, very-good-cli

## Install

```sh
git clone https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin /tmp/vgv-ai-flutter-plugin && ln -s /tmp/vgv-ai-flutter-plugin/skills/layered-architecture ~/.claude/skills/layered-architecture
```

## From README

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 — a feature spans all four whenever its repository reads an external source 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 verygoodcli MCP server create dartpackage tool One repository per domain...

## Links

- HTML page: https://omgskills.com/library/verygoodopensource/vgv-ai-flutter-plugin/skills/layered-architecture/
- GitHub: https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin
- Author: [@verygoodopensource](https://omgskills.com/library/verygoodopensource/index.md)

## More from this repo

- [accessibility](https://omgskills.com/library/verygoodopensource/vgv-ai-flutter-plugin/skills/accessibility/index.md) — Audits or remediates Flutter widgets against WCAG 2.2 conformance levels A, AA, or AAA across iOS, Android, Web, macOS,...
   - [@verygoodopensource](https://omgskills.com/library/verygoodopensource/index.md) · 173 stars
- [animations](https://omgskills.com/library/verygoodopensource/vgv-ai-flutter-plugin/skills/animations/index.md) — Best practices for Flutter animations using the built-in animation framework, covering implicit animations, explicit...
   - [@verygoodopensource](https://omgskills.com/library/verygoodopensource/index.md) · 173 stars
- [bloc](https://omgskills.com/library/verygoodopensource/vgv-ai-flutter-plugin/skills/bloc/index.md) — Best practices for Bloc state management in Flutter/Dart, covering Cubit versus Bloc, event and state naming, sealed...
   - [@verygoodopensource](https://omgskills.com/library/verygoodopensource/index.md) · 173 stars
