CCRAFTANCE / SYSTEM ATLAS
Read-only snapshot · 24 Oct 2026 · Branch wip/oct5-safe-pause

睇清 Craftance
由首頁到收款嘅整部機器

唔係一張塞滿箭咀嘅圖。先睇 6 層系統,再睇 39 個 technical components、23 條業務流程、6 張真實互動時序圖,最後睇「做咗乜/仲欠乜」。

6Architecture layers
39Technical components
23 + 3Canonical + cross-cutting flows
46SQL migration files
35Tracked engineering tasks
01 / C4 Container Map

全局:邊個做乜、資料去邊度?

由左至右:三種人 → Astro 頁面 → Cloudflare API/業務邏輯 → Supabase 資料 → Stripe/Resend/CMS 等服務。底部係 GitHub、部署同監控。可以按圖中方框,跳去對應元件解釋。

Architecture overview
本機有實作部分實作Pilot待接通/規劃尚未實作 Source/local boundary Future/unverified join
craftance cluster_people 1 · PEOPLE cluster_site 2 · ASTRO WEBSITE / FRONTEND cluster_server 3 · SERVER / BUSINESS AUTHORITY cluster_data 4 · SUPABASE / PERSISTENCE cluster_services 5 · EXTERNAL SERVICES / TOOLS cluster_release 6 · DELIVERY & QUALITY client Client Post / invite / manage public Public site Hero · categories · jobs · articles client->public private Account portals Auth · jobs · profiles · invites client->private freelancer Freelancer Profile / browse / unlock freelancer->public freelancer->private operator Operator Review / restore / support admin Operator pages Jobs + Profiles review operator->admin worker Cloudflare Worker Astro SSR + API handlers public->worker private->worker member Membership & reveal Billing UI + gated contact member->worker admin->worker rules Business services Owner checks · review · eligibility worker->rules revealapi Reveal transaction Atomic entitlement+job+contact worker->revealapi stripe Stripe sandbox Checkout not wired worker->stripe authdb Supabase Auth Email link · session rules->authdb pubdb Public read projections Published, contact-free rules->pubdb privdb Private PostgreSQL Contacts · owners · billing · audit rules->privdb queue Outbox records Notifications + publication intents rules->queue revealapi->privdb cron Cron Worker 5-minute sweep; disabled queue->cron resend Resend Email/send/bounce pending cron->resend cms Astro MDX + CMS pilot Sveltia/Apostrophe candidates cms->public storage Media storage R2 / Supabase TBD storage->public git GitHub / Actions Source + CI deploy Cloudflare deploy Hosted release NOT proven git->deploy deploy->public obs Monitoring / restore Sentry / backups not proven obs->cron
線代表架構依賴,唔係所有功能已真實連線。Public/private controls 必須經 server + DB 校驗。完整內容可打開其他分頁。
展開完整 39 個 Technical Components 樹狀 Mind Map

按每個組件會跳到詳細原碼/進度卡片。呢張圖係 taxonomy(分類關係),唔係執行流程。

stack root CRAFTANCE Full Technical Stack hub0 Frontend root->hub0 hub1 Design & Motion root->hub1 hub2 Content & SEO root->hub2 hub3 Application / API root->hub3 hub4 Identity & Access root->hub4 hub5 Payments & Entitlements root->hub5 hub6 Data & Trust root->hub6 hub7 Background & Messaging root->hub7 hub8 Security & Privacy root->hub8 hub9 Infrastructure & Storage root->hub9 hub10 Tooling & Verification root->hub10 hub11 Business & Operations root->hub11 c0_0 Astro 7.3.3 + SSR hub0->c0_0 c0_1 Vite(經 Astro) hub0->c0_1 c0_2 Astro Components + native forms hub0->c0_2 c0_3 Public routes / discovery hub0->c0_3 c0_4 EN / zh-Hant-HK routing hub0->c0_4 c1_0 Design tokens / reusable UI hub1->c1_0 c1_1 Fontsource 本機字體 hub1->c1_1 c1_2 Hero art & responsive layout hub1->c1_2 c1_3 Category motion / ambient animation hub1->c1_3 c2_0 SEO / GEO & metadata hub2->c2_0 c2_1 Astro MDX content collections hub2->c2_1 c2_2 Sveltia CMS 0.248.0 hub2->c2_2 c2_3 ApostropheCMS 4.34.0 hub2->c2_3 c3_0 Astro server/API routes hub3->c3_0 c3_1 Zod 4.6.5 hub3->c3_1 c3_2 Client Jobs service hub3->c3_2 c3_3 Freelancer profile service hub3->c3_3 c3_4 Invitation / proposal service hub3->c3_4 c3_5 Single-operator Admin workspace hub3->c3_5 c4_0 Supabase Auth + @supabase/ssr hub4->c4_0 c4_1 Account roles / capabilities hub4->c4_1 c5_0 Stripe sandbox adapter hub5->c5_0 c5_1 Canonical billing / entitlement ledger hub5->c5_1 c5_2 Protected client contact reveal hub5->c5_2 c6_0 Supabase PostgreSQL hub6->c6_0 c6_1 Postgres RLS / SQL RPC / private views hub6->c6_1 c7_0 Transactional Outbox hub7->c7_0 c7_1 Cloudflare Cron Worker hub7->c7_1 c7_2 Resend + signed feedback hub7->c7_2 c7_3 Svix 2.5.0 hub7->c7_3 c8_0 Cloudflare Turnstile + rate limit hub8->c8_0 c8_1 Consent / data rights / audit hub8->c8_1 c9_0 Media / portfolio storage hub9->c9_0 c9_1 Cloudflare Workers / DNS / CDN hub9->c9_1 c10_0 GitHub + GitHub Actions hub10->c10_0 c10_1 Node Test / PGlite / Playwright / Axe hub10->c10_1 c10_2 Analytics / Sentry / alerts hub10->c10_2 c10_3 Backup / restore / incident runbooks hub10->c10_3 c11_0 WhatsApp Business + manual review hub11->c11_0
01 · Business

兩邊都要吸引

客戶免費刊登同搵人;freelancer 免費建立 profile、接受邀請,付費先可主動揭示客戶 contact。平衡供需與信任。

02 · Architecture

唔係 39 套軟件

Astro 處理頁面/部分 API,Cloudflare 運行,Supabase 管身分與資料,Stripe/Resend 負責外部交易/寄信。其餘多數係同一 repo 內的 modules。

03 · Reality

有 code ≠ 已上線

大部分最複雜流程仍然 default-off。本機測試可以幫你證明邏輯方向,但未證明真實 provider、hosted permissions、付款及正式 release。

由三條 Business Loop 理解整個平台

Client · Post a job

免費提交 Brief → Contact reachability → 人手審核 → 已公開 Jobs → Paid Freelancer 揭示 contact → 自行接洽。

Client · Find a freelancer

首頁分類 → Freelancer Profile → 免費邀請 → Freelancer 免費回 Proposal → Client 選人。

Freelancer · Opportunity

免費 Profile → 審核公開 → 瀏覽 Jobs → Saver/Serious Trial 或 Paid → 安全 Reveal → 自行 Pitch。

最核心嘅分界:CMS 只管文章;Account Portal 只管用戶自己嘅 records;Craftance Admin 只管業務審核;Stripe 只證明付款;最終有冇權揭示 contact,必須由server + database 原子判斷。