# Frontend Redesign — Requirements > 來源:Claude Design bundle `JAdpACs3cSyw_vN6Ketj1Q`(已歸檔於 `design-source/`)。 > 此 SDD 擴展 `../landing-page.md` 的範圍:landing 從「單頁 + OAuth + Dashboard」升級為「5 screen app shell」。 --- ## 1. 背景 `arcrun/landing/` 目前只提供: - `/` — Landing hero + code demo - `/login` — Google / GitHub OAuth - `/dashboard` — API Key 管理 - `/api-docs` — Swagger UI(外部) - `/integrations` — 20 個 recipe 靜態清單 Claude Design 交付一套完整 5 screen 設計(Landing / Auth / API Keys / Dashboard / Workflow Viewer),與現有前端相比多了: - **Dashboard 的 Apps Grid 與 Workflows Table**(現在沒有應用/workflow 清單 UI) - **API Keys 獨立頁**(現在和 dashboard 混在一起) - **Workflow Viewer**:node-based canvas,對應 YAML workflow 的視覺化(目前 acr push YAML 後只有 CLI 輸出) --- ## 2. User Stories ### US-1:新訪客認識 arcrun - 作為沒用過 arcrun 的工程師,我要在 landing 看到兩條路(For Developers / For Everyone),5 秒內判斷這是否符合我要的用法。 - 驗收:hero + 雙 path card + feature strip 在首屏呈現;CTA「Start free」可點擊到 `/auth`。 ### US-2:取得 / 登入會員 - 作為訪客,我要用 GitHub / Google / Email 登入建立帳號。 - 驗收:`/auth` 支援 Sign in / Sign up tabs、GitHub + Google OAuth、Email + Password 表單。OAuth 成功後導向 `/dashboard`。 ### US-3:看見應用全貌 - 作為已登入用戶,我要在 Dashboard 看到我已部署的 App(packaged workflow)和 Workflow 清單。 - 驗收: - Apps Grid:每個 app 卡片顯示名稱、描述、「Open app」「Edit in Claude」。 - Workflows Table:顯示 workflow 名稱、節點數、最後修改、執行次數、狀態。 - 若 app / workflow 為空,顯示新建 CTA(非硬編 mock)。 ### US-4:管理 API Keys - 作為已登入用戶,我要建立、檢視、停用、刪除 API Key。 - 驗收: - 剛產生的 Key 顯示在頂部高亮卡片(含警示文字「不會再顯示」)。 - 全部 Keys 在下方表格顯示(名稱、遮蔽後 key、建立時間、最後使用、狀態、toggle、trash)。 - Rotate / Revoke 立即生效(呼叫 cypher-executor)。 ### US-5:檢視 Workflow graph - 作為已登入用戶,我要點 workflow 進到 viewer,看到節點 DAG 與每個節點的 I/O schema 與參數。 - 驗收: - Canvas 顯示節點(含 icon / type badge),節點以 bezier 曲線相連。 - 選中節點後右側面板顯示 input / output schema、configuration(針對 ai.completion 等節點顯示 triplet 編輯器)。 - 工具列含 Share / Export YAML / Edit in Claude。 - Minimap + zoom 控制顯示可用。 - 「Export YAML」呼叫 cypher-executor 取得該 workflow 的原始 YAML。 ### US-6:Dogfooding - 作為 arcrun 核心維護者,我要前端所有與服務打交道的動作都透過 arcrun 自家 API(cypher-executor)完成,不依賴第三方 OAuth / workflow / backend 服務。 - 驗收(見 §6)。 --- ## 3. 非功能需求 | 項目 | 規範 | |---|---| | 技術棧 | Next.js 15 App Router、React 19、Tailwind v4、TypeScript(沿用 `landing/` 現有堆疊) | | 部署 | Cloudflare Pages(`@cloudflare/next-on-pages`),沿用 `landing/wrangler.toml` | | 字型 | Inter、JetBrains Mono — 用 `next/font/google`,不拉 unpkg / fonts.googleapis.com `` | | 依賴 | 僅 Next / React / Tailwind;禁止 tRPC、React Query、SWR、Auth.js/Clerk、ReactFlow/XYFlow、Radix、shadcn CLI install、animation library(framer-motion)等第三方 | | 狀態管理 | React 內建(useState / useReducer / Context);持久化用 `localStorage` 或 server session cookie | | 國際化 | 延後;本次一律英文(與設計稿一致)。現有 `?lang=zh` 不擴展 | | 無障礙 | 按鈕 `aria-label`、Form 控件有 `