feat: add prompts for generating Mermaid diagrams for Flutter application architecture and use cases
This commit is contained in:
21
docs/prompts/create-mermaid-overview-flutter.md
Normal file
21
docs/prompts/create-mermaid-overview-flutter.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
## What the prompt does
|
||||||
|
This prompt generates a Mermaid diagram that provides an overview of the given Flutter application's architecture. It includes the main components of the app, such as the widget tree, state management, and navigation.
|
||||||
|
|
||||||
|
## Assumptions
|
||||||
|
- Flutter project is given.
|
||||||
|
|
||||||
|
## Prompt
|
||||||
|
In the given Flutter project. Carefully analyze all files to understand the app’s navigation, logic flow, state management, and how each screen connects to the next.
|
||||||
|
|
||||||
|
Using that analysis, generate a **Mermaid flowchart** that shows:
|
||||||
|
|
||||||
|
* The app’s entry point (main.dart → root widget).
|
||||||
|
* The initial flow (e.g., splash → login/signup → authenticated home).
|
||||||
|
* All pages/screens and how navigation occurs between them.
|
||||||
|
* Conditional routing logic (authentication checks, API responses, state changes, etc.).
|
||||||
|
* Any loops, flows, or background logic that impact navigation.
|
||||||
|
* The diagram must accurately reflect the project structure and not make assumptions beyond what is found in the code.
|
||||||
|
|
||||||
|
Use **Mermaid `flowchart TD` or `flowchart LR`** format, with clear labels for each screen and logic decision.
|
||||||
|
|
||||||
|
If needed, ask me for missing files so you can produce a complete diagram.
|
||||||
29
docs/prompts/create-mermaid-usecase-flutter.md
Normal file
29
docs/prompts/create-mermaid-usecase-flutter.md
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
## What the prompt does
|
||||||
|
This prompt generates a Mermaid diagram that visualizes the use case of a Flutter application. The diagram includes the actors, use cases, and relationships between them.
|
||||||
|
|
||||||
|
## Assumption
|
||||||
|
- Flutter project is given
|
||||||
|
- Overview mermaid diagram is given
|
||||||
|
|
||||||
|
## How to use the prompt
|
||||||
|
Using the given Flutter project code — along with the previously generated Mermaid diagram that outlines the app’s navigation and logic flow — analyze the entire system to identify **all main use cases and their sub-use cases**.
|
||||||
|
|
||||||
|
From this analysis, create a **Mermaid flowchart** that shows:
|
||||||
|
|
||||||
|
* All high-level use cases the app supports (e.g., Authentication, Profile Management, Dashboard Interaction, Data Fetching, Settings, etc.).
|
||||||
|
* How each use case breaks down into sub-use cases (e.g., Authentication → Login, Signup, Logout, Token Refresh).
|
||||||
|
* How these use cases depend on each other or trigger one another.
|
||||||
|
* Connections between use cases as they appear in the actual code (UI actions, state changes, service calls, repository interactions, etc.).
|
||||||
|
* Any decision points or conditions that influence which sub-use case occurs next.
|
||||||
|
|
||||||
|
Format the output as a **clear Mermaid diagram** using `flowchart TD` or `flowchart LR`.
|
||||||
|
Ensure the flow represents the **real behavior of the code**, not assumptions.
|
||||||
|
|
||||||
|
Ask for any missing files if needed to build a complete and accurate use-case hierarchy.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
If you want, I can also generate a version tailored for:
|
||||||
|
✔ UML use-case diagrams
|
||||||
|
✔ Sequence diagrams
|
||||||
|
✔ System interaction diagrams
|
||||||
Reference in New Issue
Block a user