Lewati ke isi

Sentra Series — Diagram Conventions

Semua diagram di repo Sentra ditulis dengan Mermaid (bukan PlantUML / ASCII). Alasan: GitHub web render Mermaid native sejak 2022, tidak butuh server eksternal, syntax tunggal.

Tipe Diagram per Konteks

Tipe Mermaid Syntax Lokasi di repo
System architecture (C4 context/container) graph TB 01-architecture.md
ERD erDiagram 02-database.md
Sequence flow (POS, sync, KDS) sequenceDiagram file di 04-modules/
State machine (work order, rental booking) stateDiagram-v2 file di 04-modules/
Deployment topology graph TB + subgraph 07-ops.md

ASCII wireframes UI tetap dipertahankan di 05-ui-wireframes.md (tidak migrasi ke Figma) — alasan: cepat edit di markdown, version-controllable.

Penamaan Node Standar

Untuk konsistensi cross-system:

Konsep Label Standar
Aplikasi kasir di cabang POS Terminal (Edge) — bukan "Kasir" / "Cashier"
Database lokal POS SQLite + SQLCipher
Database cloud PostgreSQL — bukan "DB" / "Database"
Cache & lock Redis (Cache & Lock)
API service business logic K8s Pod: API Service (NestJS)
Sync service high-concurrency K8s Pod: Sync Service (Go)
Payment gateway Payment Gateway (Midtrans/Xendit)
Object storage S3 / GCS
WhatsApp gateway WhatsApp Gateway (Fonnte/Twilio)
Load balancer Load Balancer (ALB)
CDN/WAF Cloudflare CDN & WAF

Style Tips

  • Pakai subgraph untuk mengelompokkan komponen by deployment tier (Edge, Cloud, External Services)
  • Beri label edge yang deskriptif: -->|Encrypted HTTPS| lebih baik dari -->
  • Untuk ERD, sertakan kardinalitas: CUSTOMER ||--o{ ORDER : places