# Tasks INDEX — haixun-backend（v3 · UI MUST）

> Plan：`../plan.md`  
> Spec：`../spec.md` §9  
> 對照：`../fe-spec-alignment.md`（**UI MUST + 真上傳 + Remove**）  
> 後端根：**`apps/backend`**  
> Status：**approved**（2026-07-10 使用者「ok同意」）· phase=`ready-to-implement`

## 範圍硬規則

| 規則 | 內容 |
|------|------|
| UI MUST | 只做現 UI 主路徑有呼叫／live 必需的能力 |
| 真上傳 | `media` attach = 真 multipart→持久 URL（T158） |
| Remove | 舊靈感、generateFromFormula、ScoutTopic、simulate/createMock 當 live 完成、Insights 真管線 |
| 路徑 | 全部後端碼在 **`apps/backend`** |
| 測試 | 每 M 有 integration 閘；T222 矩陣對齊 §9 |

## INDEX

| ID | Title | M | Kind | Status | Est |
|----|-------|---|------|--------|-----|
| T100 | migrate stand alone to apps backend | M0 | feat | done | ~180 |
| T101 | prune ecommerce modules | M0 | feat | done | ~160 |
| T102 | single etc config | M0 | feat | done | ~100 |
| T103 | envelope success 102000 | M0 | feat | done | ~120 |
| T104 | cmd init mongo indexes | M0 | feat | done | ~150 |
| T105 | cmd seeder separate | M0 | feat | done | ~140 |
| T106 | worker binary stub | M0 | feat | done | ~120 |
| T107 | testkit harness | M0 | test | done | ~180 |
| T108 | ci test policy | M0 | test | done | ~100 |
| T110 | member model numeric uid | M1 | feat | done | ~180 |
| T111 | auth login logout refresh me | M1 | feat | done | ~200 |
| T112 | auth profile password verify | M1 | feat | done | ~180 |
| T113 | auth register api | M1 | feat | done | ~160 |
| T114 | auth third party api | M1 | feat | done | ~180 |
| T115 | permission middleware | M1 | feat | done | ~140 |
| T116 | admin members crud | M1 | feat | done | ~200 |
| T117 | settings ai placement api | M1 | feat | done | ~160 |
| T118 | seeder admin member | M1 | feat | done | ~100 |
| T119 | test m1 auth admin integration | M1 | test | done | ~200 |
| T130 | threads oauth start callback | M2 | feat | done | ~200 |
| T131 | threads account list refresh disconnect | M2 | feat | done | ~150 |
| T132 | job model and api | M2 | feat | done | ~180 |
| T133 | worker job runner | M2 | feat | done | ~180 |
| T134 | notifications api | M2 | feat | done | ~140 |
| T135 | fe live auth accounts jobs | M2 | feat | done | ~200 |
| T136 | test m2 threads job integration | M2 | test | done | ~200 |
| T150 | usage events summary byok schema | M3 | feat | done | ~180 |
| T151 | usage meter platform vs byok | M3 | feat | done | ~180 |
| T152 | ai proxy list models call | M3 | feat | done | ~180 |
| T153 | exa search proxy | M3 | feat | done | ~140 |
| T154 | usage plan purchase admin | M3 | feat | done | ~160 |
| T155 | fe live settings usage byok | M3 | feat | done | ~160 |
| T156 | test m3 usage byok integration | M3 | test | done | ~200 |
| T157 | extension zip download | M3 | feat | done | ~100 |
| T158 | media real upload | M3 | feat | done | ~180 |
| T165 | personas crud analyze | M4 | feat | done | ~180 |
| T166 | plays crud list submit | M4 | feat | done | ~200 |
| T167 | compose mimic viral publish | M4 | feat | done | ~180 |
| T168 | outbox api | M4 | feat | done | ~150 |
| T169 | worker outbox publish threads | M4 | feat | done | ~200 |
| T170 | ownposts and mentions | M4 | feat | done | ~200 |
| T171 | fe live studio outbox | M4 | feat | done | ~180 |
| T172 | test m4 studio outbox integration | M4 | test | done | ~200 |
| T190 | inspire current ui only | M5 | feat | done | ~200 |
| T191 | research and generate image | M5 | feat | done | ~140 |
| T192 | scout brands products import | M5 | feat | done | ~180 |
| T193 | scout brief and scan api path | M5 | feat | done | ~180 |
| T194 | scout scan crawler path | M5 | feat | done | ~200 |
| T195 | scout outreach homework | M5 | feat | done | ~160 |
| T196 | test m5 inspire scout integration | M5 | test | done | ~200 |
| T197 | fe live scout inspire | M5 | feat | done | ~150 |
| T215 | invite member network apply | M6 | feat | done | ~160 |
| T216 | invite admin tree move | M6 | feat | done | ~180 |
| T217 | fe live invite | M6 | feat | done | ~120 |
| T218 | smoke p0 p1 | M6 | test | done | ~150 |
| T219 | test m6 invite integration | M6 | test | done | ~160 |
| T220 | test fe be live integration | M6 | test | done | ~200 |
| T221 | test contract security x | M6 | test | done | ~150 |
| T222 | acceptance matrix ci gate | M6 | test | done | ~180 |

## Counts

- **Total: 59**（feat 47 · test 12）
- **done: 59**（M0–M6）
- **todo: 0**

## Milestone map

| M | Feat | Test 閘 | 狀態 |
|---|------|---------|------|
| M0 骨架 | T100–T106 | T107–T108 | **done** |
| M1 會員 Admin 設定 | T110–T118 | T119 | **done** |
| M2 OAuth Job 通知 FE 地基 | T130–T135 | T136 | **done** |
| M3 用量 BYOK AI 真上傳 擴充 | T150–T155 T157 T158 | T156 | **done** |
| M4 創作 Outbox 真發 | T165–T171 | T172 | **done** |
| M5 靈感(現UI) 海巡 | T190–T195 T197 | T196 | **done** |
| M6 邀請 整合 矩陣 | T215–T217 | T218–T222 | **done** |

## 建議開工序

1. ~~T100 → T108（M0）~~ **done**  
2. ~~T110 → T119（M1）~~ **done**  
3. ~~T130 → T136（M2）~~ **done**  
4. ~~T150 → T158（M3）~~ **done**  
5. ~~T165 → T172（M4）~~ **done**  
6. ~~T190 → T197（M5）~~ **done**  
7. ~~T215 → T222（M6）~~ **done**（邀請 live + IV 測試 + smoke）  


## Remove 提醒（禁止當 task 交付）

```text
inspiration: list, saveIdea, generate, bookmark, listViral, spark*, searchTrends
ownPosts: generateFromFormula
scout: listTopics, saveTopic, removeTopic
live: simulateSuccess/RootFail 當完成；createMock 當 OAuth 完成
P2: Insights 真管線
```
