依 autoflow-agent workspace v2 設計把 PRD / 設計 / 架構 / 交付類 共享文件從個人層 .autoflow/(ignored)搬到 docs/autoflow/(進 git), 讓團隊可共享產品與架構文件,個人層只留 progress / review / testing 等 per-branch 筆記。 - 02-prd/ 21 個檔(PRD、features、market-analysis 等) - 03-design/ 18 個檔(design-spec、wireframes、flows 等) - 04-architecture/ 31 個檔(TDD、design-doc、ADR×14、API 規格等) - 07-delivery/ 3 個檔(project-summary、phase-0.6-handover、stage-deployment-setup) 合計 73 檔。原檔已從 .autoflow/ 移除(migration 工具執行 git mv, 但因 .autoflow/ 在 .gitignore 中、git 將此操作視為新增、無 rename history)。
78 lines
1.8 KiB
Markdown
78 lines
1.8 KiB
Markdown
# Feature:Billing(P2;Phase 0 不做)
|
||
|
||
> 父文件:[PRD.md](../PRD.md) | 對應 User Stories:US-27
|
||
>
|
||
> **⚠️ Phase 0 完全不做**。本文件只留介面定義與未來規劃。
|
||
|
||
---
|
||
|
||
## 範圍
|
||
|
||
Phase 0 / Phase 1 全部跳過。Phase 2 再規劃。
|
||
|
||
---
|
||
|
||
## 為什麼 Phase 0 不做
|
||
|
||
- Phase 0 是雛形,只給內部測試
|
||
- 商業模式尚未定案(訂閱 / usage-based / freemium 都有可能)
|
||
- 接金流(Stripe 等)會拖慢雛形進度
|
||
|
||
---
|
||
|
||
## 可能的商業模式(Phase 2 待討論)
|
||
|
||
### 模式 A:訂閱制
|
||
|
||
| 方案 | 月費 | 裝置數上限 | 模型儲存 | 叢集 |
|
||
|------|------|----------|---------|------|
|
||
| Free | $0 | 1 | 100MB | ❌ |
|
||
| Pro | $19 | 5 | 10GB | ✅ |
|
||
| Team | $99 | 無限 | 100GB | ✅ |
|
||
| Enterprise | 客製 | — | — | + SSO, SLA |
|
||
|
||
### 模式 B:按推論次數
|
||
|
||
- $X / 1M inferences
|
||
- 前 100K 免費
|
||
|
||
### 模式 C:Freemium + 轉檔計費
|
||
|
||
- 本體免費使用
|
||
- 轉檔服務按次計費($Y / 轉檔)
|
||
|
||
---
|
||
|
||
## BillingProvider 介面(Phase 2)
|
||
|
||
```go
|
||
// internal/billing/provider.go
|
||
type BillingProvider interface {
|
||
CreateCustomer(ctx context.Context, user *User) (*Customer, error)
|
||
CreateSubscription(ctx context.Context, customerID, planID string) (*Subscription, error)
|
||
CancelSubscription(ctx context.Context, subscriptionID string) error
|
||
ReportUsage(ctx context.Context, customerID, meterID string, quantity int64) error
|
||
GetInvoices(ctx context.Context, customerID string) ([]Invoice, error)
|
||
}
|
||
```
|
||
|
||
Phase 2 實作候選:
|
||
- Stripe(最成熟,SaaS 標配)
|
||
- Paddle(全球稅務處理較好)
|
||
- Lemon Squeezy(小團隊友善)
|
||
|
||
---
|
||
|
||
## 其他未定案
|
||
|
||
- 企業合約 / PO 流程
|
||
- 退款政策
|
||
- 多幣別
|
||
- 發票系統(特別是台灣統一發票)
|
||
|
||
---
|
||
|
||
## 連結
|
||
|
||
- 回:[PRD <20><>引](../PRD.md)
|