project-architecture-mermaid
Skill: project-architecture-mermaid
Purpose
Help the planner generate clean, valid, and readable Mermaid diagrams for:
- system overall architecture
- functional module structure
- E-R diagrams
This skill is used during the planning stage only.
Required Diagram Types
Every project/module planning output should include these three Mermaid diagrams:
- System overall architecture diagram
- Functional module structure diagram
- E-R diagram
1. System Overall Architecture Diagram
Goal
Show the high-level technical architecture of the system.
Should include
- actors/users
- frontend
- backend
- database
- optional external services if clearly relevant
Preferred syntax
Use:
flowchart TD
or
flowchart LR
Example pattern
flowchart LR
User[User]
Admin[Admin]
Frontend[Vue Frontend]
Backend[Spring Boot Backend]
DB[(MySQL)]
User --> Frontend
Admin --> Frontend
Frontend --> Backend
Backend --> DB
Rules
- keep it high-level
- do not overload with internal class details
- use consistent naming with project/module text
2. Functional Module Structure Diagram
Goal
Show the business module breakdown of the project.
Should include
- the full module map of the project
- the current module
- important relationships between modules if relevant
Preferred syntax
Use:
flowchart TD
or
flowchart LR
Example pattern
flowchart TD
System[Project System]
Auth[Auth Module]
User[User Module]
Product[Product Module]
Order[Order Module]
System --> Auth
System --> User
System --> Product
System --> Order
Rules
- keep it business-oriented
- do not turn this into a technical deployment diagram
- keep names aligned with planner modules
3. E-R Diagram
Goal
Show core entities and their relationships.
Required syntax
Use Mermaid erDiagram.
Example pattern
erDiagram
USER ||--o{ ORDER : places
ORDER ||--|{ ORDER_ITEM : contains
PRODUCT ||--o{ ORDER_ITEM : referenced_by
Rules
- show only the main entities relevant to the project/module
- use singular entity names consistently if possible
- relationships must match the planner text
- do not invent excessive low-level columns unless already implied
Diagram Consistency Rules
All diagrams must align with:
- project name
- project description
- module list
- entity list
- business rules
Do not let diagrams contradict the written plan.
Mermaid Syntax Rules
Allowed
flowchart TDflowchart LRerDiagram
Avoid
- overly complex nested subgraphs unless truly needed
- unsupported syntax
- decorative clutter
- mixing technical and business abstractions in the same diagram without purpose
Readability Rules
- keep diagrams concise
- prefer clarity over completeness
- avoid too many nodes
- avoid crossing concerns
- use the same naming everywhere
Final Goal
The diagrams should be:
- valid Mermaid
- easy to read
- aligned with the module plan
- reusable in documentation
