flutter_architecture_overview

flutter_architecture_overview is a cursor rule for Cursor from MoritzMessner/flutter-cursor-rules. It costs 29 tokens per session (1,030 once invoked), scanned A, original, MIT.

A guide to the architecture and file organization of a Flutter application. Flutter is a framework for building apps, and this guide separates the project into interface, business-logic, and data-access layers.

In plain words
What is it for?
Understanding a Flutter project’s directories, naming conventions, layer responsibilities, dependencies, and design checklists.
Why use it?
It helps developers decide where code belongs and keeps user-interface code separate from application rules and external data services.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Understanding a Flutter project’s directories, naming conventions, layer responsibilities, dependencies, and design checklists.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/moritzmessner/flutter-cursor-rules/flutter_architecture_overview
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/MoritzMessner/flutter-cursor-rules

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for flutter_architecture_overview

README.md
[![agentmods](https://agentmods.dev/badge/rules/moritzmessner/flutter-cursor-rules/flutter_architecture_overview/github.svg)](https://agentmods.dev/rules/moritzmessner/flutter-cursor-rules/flutter_architecture_overview)
Your own site
<a href="https://agentmods.dev/rules/moritzmessner/flutter-cursor-rules/flutter_architecture_overview"><img src="https://agentmods.dev/badge/rules/moritzmessner/flutter-cursor-rules/flutter_architecture_overview/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for flutter_architecture_overview

Your own site · 80×15
<a href="https://agentmods.dev/rules/moritzmessner/flutter-cursor-rules/flutter_architecture_overview"><img src="https://agentmods.dev/badge/rules/moritzmessner/flutter-cursor-rules/flutter_architecture_overview.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,030 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.01030
Opus 5.5 $0.00012 $0.00412
Sonnet 5.5 $0.00006 $0.00206
Haiku 4.5 $0.00003 $0.00103

Measured 2mo ago against content hash d468f73ab9ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

flutter_architecture_overview scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/flutter_architecture_overview.mdc · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

🏗️ Architecture Overview

Three-Layer Architecture

┌─────────────────────────────────────────┐
│          UI LAYER (Presentation)        │
│  Views (Widgets) + ViewModels           │
│  - User interface                       │
│  - User interaction handling            │
│  - UI state management                  │
└─────────────────────────────────────────┘
                    ↓↑
┌─────────────────────────────────────────┐
│        DOMAIN LAYER (Business Logic)    │
│  Models + Use Cases                     │
│  - Business logic                       │
│  - Domain models                        │
│  - Application rules                    │
└─────────────────────────────────────────┘
                    ↓↑
┌─────────────────────────────────────────┐
│         DATA LAYER (Data Access)        │
│  Repositories + Services                │
│  - Data fetching                        │
│  - Data caching                         │
│  - External APIs                        │
└─────────────────────────────────────────┘

Key Principles

  1. Separation of Concerns: Each layer has a distinct responsibility
  2. Dependency Rule: Dependencies point inward (UI → Domain → Data)
  3. Testability: Each layer can be tested independently
  4. Scalability: Easy to add features without breaking existing code
  5. Maintainability: Clear structure makes code easy to navigate and modify

📁 Project Structure

Required Directory Layout

lib/
├── ui/                                    # UI LAYER
│   ├── core/
│   │   ├── ui/                           # Shared widgets & components
│   │   ├── themes/                       # Theme definitions & styling
│   │   └── view_model/                   # Base/core view models
│   └── <feature>/                        # Feature-specific UI modules
│       ├── view_model/                   # Feature ViewModels
│       │   └── <feature>_view_model.dart
│       └── widgets/                      # Feature screens & widgets
│           └── <feature>_screen.dart
│
├── domain/                               # DOMAIN LAYER
│   └── models/                           # Pure business models
│       └── <model_name>.dart
│
├── data/                                 # DATA LAYER
│   ├── models/                           # API/Data models
│   │   ├── <model_name>_dto.dart        # Data transfer objects
│   │   └── responses/                    # API response wrappers
│   ├── repositories/                     # Data repositories
│   │   └── <feature>_repository.dart
│   └── services/                         # Application services
│       └── <service_name>_service.dart
│
├── utils/                                # Shared utilities
│   ├── command/                          # Command pattern classes
│   └── result/                           # Result pattern classes
│
├── routing/                              # Navigation & routing
└── main.dart                             # App entry point

Read the full file on GitHub · 115 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 115 lines · 29 tokens per session scan A d468f73ab9ba

Subscribe to this mod's changes

flutter_architecture_overview is a cursor rule published in the GitHub repository MoritzMessner/flutter-cursor-rules (4 stars, last pushed 21d ago), licensed MIT. It adds 29 tokens to every session and 1,030 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.