Theme / v3.0.1

Archify

把想法變成可互動的圖

實戰範例

實戰範例 001:Web 請求快取圖

官方起手式:Browser→API→Redis→PostgreSQL fallback,一句話到序列圖

背景

官方 README 的標準起手式就是這個序列情境:瀏覽器打 API,API 查 Redis,miss 才查 PostgreSQL 並回填。1

完整流程

步驟 1:安裝

npx skills add tt-a1i/archify -g

步驟 2:送出這段話

Use Archify to diagram a web request: Browser calls the API,
the API checks Redis, and a cache miss queries PostgreSQL and fills the cache.

步驟 3:細化

Highlight the cache-miss path
Add authentication
Switch to the light theme

對應官方產物

  • 範例 JSON:archify/examples/cache-miss-request.sequence.json
  • 選型指令:node archify/bin/archify.mjs guide "Show an API request with Redis cache miss"
  • 互動觀念:聚焦節點後按 R 探測 web~db 路徑,再用 Export 做 Route Share Card

Footnotes

  1. tt-a1i/archify README Install, then describe your idea ↩