
UI 已經不再是最難的一段
Vibe coding 改變了軟件開發的第一個小時。
創辦人可以打開 v0、Cursor、Claude 或 ChatGPT,描述一個預約頁、一個客戶 dashboard,或者一個小型 commerce flow。幾分鐘後,就有一個看起來很完整的介面:cards、filters、forms、empty states,甚至有一個 mock API。
這是真正的進步。但它也暴露了一個更硬的事實:
一個漂亮 UI,不等於一個可營運的 backend。
當 prototype 開始需要真實 users、customer records、permissions、bookings、invoices、payments、reminders 或 reporting,難度就會回來。
- Database schema 應該點設計?
- 邊個可以讀或改某個 record?
- 如何避免 customer data 洩漏?
- Booking cancel 時要改邊幾個狀態?
- Invoices、payments、refunds、subscriptions 點保持一致?
- WhatsApp、SMS、email 要不要 approval?
- AI agent 點知道哪些 action 安全,哪些危險?
這就是 AI Agent 可操作的 Headless CRM 後端 要補上的缺口。
為何 generated backend 容易變脆弱
大部分 AI-generated backend 都由三種方式開始。
第一種是 local JSON file。Demo 很快,但 production 幾乎不能用。它沒有 concurrency model、沒有 audit trail、沒有 authorization boundary,也沒有回答「兩個 user 同時更新會點」。
第二種是 generic CRUD。Agent 建 tables、API routes、forms。它可以儲存 rows,但通常不理解 domain rules。一個 booking 不只是一行資料。它涉及 service duration、staff availability、capacity、cancellation policy、reminders 和 payment state。
第三種是讓 AI workflow 直接 access database。這感覺很強,但當 customer data、payment records 和 destructive operations 出現,風險就很高。Agent 不應該靠猜 table name 或任意 SQL 去操作 production customer data。
核心問題不是 AI 不會寫 backend code。它會。問題是 backend 其實大多是 policy、state 和 trust。
Vibe coder 真正會遇到的 backend 問題
當 prototype 變成產品,通常會缺七類 backend 能力。
1. Data modeling。 Customers、services、bookings、orders、loyalty points、invoices、subscriptions、campaigns、content 是互相關聯的。每個 screen 一張 table 很快會爆。
2. Authentication and permissions。 「已登入」不夠。真正系統需要 workspace scope、owner/admin/member roles、API tokens、revocation 和 least privilege。
3. Data security。 Customer profiles、phone numbers、payment status、message history、invoices 都是敏感資料。它們需要穩定 access rules,而不是臨時 route。
4. Business workflows。 Book class、charge invoice、issue loyalty points、send reminder、chase overdue payment 都是多步操作,需要 domain rules。
5. External side effects。 WhatsApp、SMS、email、Stripe、webhooks 不是普通 CRUD。它們需要 idempotency、retry、queue 和 approval gate。
6. Reporting。 Operator 最後一定會問 weekly revenue、no-shows、overdue invoices、inactive VIPs、campaign performance。如果 data model 亂,report 都會亂。
7. Agent safety。 一旦 AI agent 可以 act,每個 tool 都要講清楚:read-only?會改資料?destructive?可不可以 retry?
這些不是 UI 問題,而是 backend ownership 問題。
AI Agent 可操作的 Headless CRM 後端是甚麼?
Headless backend 是一個 hosted backend,你可以不用它的預設 frontend,而是用自己的 app、site、agent 或 workflow。
AI Agent 可操作的 Headless CRM 後端再進一步:它把 business capabilities 變成 typed tools,讓 AI agent 可以安全地 call。
它應該提供:
- domain-specific durable data models
- 給 app 用的 authenticated API / SDK
- 給 AI clients 用的 typed agent tools
- read/write/destructive action annotations
- customer-facing sends 的 approval flow
- common workflows 的 playbooks
- 同一套 data 上的 operational reporting
Agent 不是即場發明 backend。Agent 是操作一個已經存在、可控的 backend。
FavCRM 如何解決這個問題
FavCRM 就是為 service businesses 做這件事:beauty、fitness、tutoring、clinics、retail、hospitality、professional services 等,需要 customers book、buy、subscribe 和回訪的團隊。
不用叫 vibe coder 從零開始做整套 customer backend,FavCRM 把 backend 開放成:
- 190+ typed MCP tools:customers、bookings、loyalty、invoices、payments、products、subscriptions、content、messaging
- 37 named playbooks:例如 book customer、chase overdue invoices、train AI agent、weekly reporting
- REST API and JavaScript SDK:給正常 app development 用
- Public SKILL.md packages:讓 agents 學會 FavCRM workflows,包括 registration、bookings、customer lifecycle、marketing comms、billing、content publishing、sales ops、knowledge training、reporting
- Agentic registration:新 user 可以在 MCP client 入面用
register_organisation_request和register_organisation_verify完成 signup
這樣 agent 操作的是一個有 schema、有 scope、有 workflow 的 backend,而不是一個可能被改壞的 database。
例子:booking app 的陷阱
假設你叫 AI coding tool 做一個 fitness studio booking app。
UI 很快就有:
- service cards
- calendar picker
- customer form
- admin list
- Book now button
然後 production 會問:
- Customer 是新客還是舊客?
- 這個 class 滿了嗎?
- 同一個 customer 可以 double-book 嗎?
- Booking 完要不要加 loyalty points?
- Customer 有沒有 active subscription?
- 要不要 send WhatsApp confirmation?
- Late cancellation 怎樣處理?
- Owner 可以看全部 bookings,但 staff 只可以看 assigned bookings 嗎?
- 下星期一如何 report no-shows?
用 generic backend,agent 現在要設計一整套 booking system。
用 AI Agent 可操作的 Headless CRM 後端,agent 可以 call 現成 tools:list services、check availability、create booking、confirm booking、attach customer record、issue loyalty points、create invoice,並且在發 customer message 前 request approval。
App 仍然是 custom。Backend 由第一日開始就是真實可用。
Tool annotations 為何重要
安全的 AI Agent system 不是把一堆 functions 暴露出去,然後希望 model 自己乖。
它需要 contracts。
Agent 應該知道 list_members 是 read-only。它應該知道 cancel_booking 會改 state。它亦應該知道 refund、delete、void 或 send customer message 都要 explicit confirmation。
這就是 MCP 重要的原因。Tool catalog 可以帶 input schemas、output schemas,以及 read-only、destructive、idempotent、open-world 等 annotations。
對 AI-generated product 來說,這很重要,因為 agent 不只是 generate source code。它可能正在操作 live customer data。
Security 不是之後才做的 task
Backend security 通常在出事前都看不見。
AI Agent backend 至少應該有:
- scoped API keys 或 OAuth tokens
- per-workspace data boundary
- revocation path
- sensitive flows 的 rate limits
- messages 和 destructive actions 的 approval gates
- read-only 和 write tools 的清楚分離
- 不讓 agent 直接任意 access database
FavCRM MCP surface 就是沿著這個方向設計。新 users 可以用 OTP-gated flow registration。Existing merchants 可以 mint fav_mcp_* keys。OAuth/PKCE paths 支援 connector-style clients。Customer-facing comms 可以經 approval workflows。
這不代表不需要 engineering judgment。它代表你不用每次 prototype 都重建敏感 backend primitives。
最實際的分工
Vibe coding 的未來,不是「AI 從零寫完整 stack」。
更實際的分工是:
| Layer | Vibe coding 擅長 | Headless backend 應該提供 |
|---|---|---|
| UI | Layout、flows、forms、dashboards | Stable APIs 和 real data |
| Domain logic | Orchestration 和 glue | Tested business rules |
| Data | Display 和 filtering | Schema、permissions、consistency |
| Agents | Tool sequencing | Typed、safe、annotated tools |
| Ops | Summaries 和 workflows | Reports、auditability、side-effect control |
這樣 small teams 可以快,但不需要假裝每個 prototype 都可以安全地變成 database product。
最後
Vibe coding 令軟件變輕,這是好事。
但真正產品仍然需要一個處理 trust、state 和 operations 的 backend。答案不是放慢、全部由人手重寫。答案是把 AI-built frontend 連接到一個原本就為 agents 設計的 backend。
這就是 AI Agent 可操作的 Headless CRM 後端的角色。
你可以瀏覽 FavCRM MCP catalog 或 developer docs,看看一個 real customer、booking、billing、content 和 messaging backend,如何變成 agent 可以安全使用的 typed tools。
啱啱接觸呢個類別?由 咩係 agentic CRM 開始。

