architecture-beta
group app(cloud)[Pele Editor]
service browser(internet)[Browser] in app
service editor(server)[Editor UI] in app
service renderer(server)[Mermaid Renderer] in app
service file(disk)[PNG File]
browser:R --> L:editor
editor:R --> L:renderer
renderer:B --> T:file
ที่จุดสิ้นสุดของความสัมพันธ์ || หมายถึงหนึ่งพอดี o{ หมายถึงศูนย์หรือมากกว่า และ |{ หมายถึงหนึ่งหรือมากกว่า PK, FK และ UK ระบุคีย์หลัก คีย์ภายนอก และไม่ซ้ำกัน
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE_ITEM : contains
CUSTOMER {
int id PK
string email UK
}
ORDER {
int id PK
int customer_id FK
}
LINE_ITEM {
int id PK
int order_id FK
}
graph TD
A[User opens Pele Editor] --> B[Write Mermaid code]
B --> C{Preview looks right?}
C -- Yes --> D[Export PNG]
C -- No --> E[Edit diagram]
E --> B
flowchart LR
%% Stable IDs connect nodes; quoted labels hold display text
A["Request (new)"] --> B{Valid?}
B -->|Yes| C([Accepted])
B -.->|No| D["Try again"]
C --> E[(Database)]
กำหนด ID งานและใช้ after ตามด้วย ID เพื่อแสดงการขึ้นต่อกัน เหตุการณ์สำคัญมีระยะเวลาเป็นศูนย์ done, active และ crit ทำเครื่องหมายสถานะงาน วันที่ที่นี่เป็นเพียงตัวอย่างเท่านั้น
gantt
title Release plan
dateFormat YYYY-MM-DD
section Prepare
Design :done, design, 2026-10-19, 2d
Build :active, build, after design, 3d
section Release
Test :crit, test, after build, 2d
Launch :milestone, launch, after test, 0d
journey
title Pele Editor User Journey
section Create
Open editor: 5: User
Paste Mermaid code: 4: User
section Review
Check live preview: 5: User
Fix syntax: 3: User
section Share
Export PNG: 5: User
Add to docs: 5: User
quadrantChart
title Diagram Content Priority
x-axis Low effort --> High effort
y-axis Low SEO value --> High SEO value
quadrant-1 Plan
quadrant-2 Invest
quadrant-3 Skip
quadrant-4 Automate
Alt text: [0.2, 0.9]
PNG preview: [0.4, 0.8]
Code sample: [0.3, 0.95]
Long intro: [0.8, 0.5]
ใช้ alt / else / end สำหรับทางเลือกอื่น และใช้ loop / end สำหรับการทำซ้ำ ประกาศผู้เข้าร่วมด้วยนามแฝง จากนั้นใช้ ID ของพวกเขาในข้อความ
sequenceDiagram
participant U as User
participant A as API
U->>A: Submit request
alt Valid session
loop Each item
A->>A: Validate item
end
A-->>U: Success
else Expired session
A-->>U: Sign in again
end