|
| 1 | +# Restart plan — progress |
| 2 | + |
| 3 | +Living checklist for the greenfield stack in this folder. **Authoritative plan:** [docs/RESTART_PLAN.md](../docs/RESTART_PLAN.md) (parent repo). |
| 4 | + |
| 5 | +**Last reviewed:** 2026-04-26 |
| 6 | + |
| 7 | +Update this file when phases advance: tick items, add dates or short notes in *Notes*, and adjust *Blocked / decisions* when something is waiting on a call or env. |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | +## Phases (see [RESTART_PLAN.md §6](../docs/RESTART_PLAN.md)) |
| 12 | + |
| 13 | +### Phase 0 — inventory → OpenAPI + Drizzle |
| 14 | + |
| 15 | +| Item | Status | Notes | |
| 16 | +|------|--------|--------| |
| 17 | +| Map legacy tRPC + WS handlers → proposed REST / WS names | ☐ | Source: `apps/app-server/src/trpc/**`, `src/websocket/**` | |
| 18 | +| Skeleton OpenAPI (routes may `501`) | partial | `/api/v1/health` + generated `openapi/openapi.json`; expand paths | |
| 19 | +| Transcribe `postgres-init.sql` → Drizzle + ordered migrations | partial | Bootstrap `app_meta` + `0000_init`; full schema pending | |
| 20 | +| Document cookie names, JWT claims, CORS origins | ☐ | Add to `template.env` / small `docs/` snippet when defined | |
| 21 | +| List legacy `@deepnotes/*` forks the new client can drop | ☐ | | |
| 22 | + |
| 23 | +**Exit (plan):** OpenAPI v0 + Drizzle schema in repo + feature checklist from old tRPC tree — **not done**. |
| 24 | + |
| 25 | +--- |
| 26 | + |
| 27 | +### Phase 1 — legacy repo hygiene (optional) |
| 28 | + |
| 29 | +| Item | Status | Notes | |
| 30 | +|------|--------|--------| |
| 31 | +| (Only if still editing old monorepo) inspect-brk, tests, Node/pnpm | ☐ | Optional parallel track | |
| 32 | + |
| 33 | +--- |
| 34 | + |
| 35 | +### Phase 2 — repository bootstrap |
| 36 | + |
| 37 | +| Item | Status | Notes | |
| 38 | +|------|--------|--------| |
| 39 | +| pnpm + Turborepo 2, Node 22+ | done | Root `package.json`, `turbo.json` | |
| 40 | +| Docker Compose: Postgres + Redis, `REDIS_URL`-style env | done | `docker-compose.yml`, `template.env` | |
| 41 | +| Cloudflare: Wrangler, Hyperdrive placeholder, Pages story | partial | `apps/worker/wrangler.toml`; Hyperdrive + Pages + env matrix TBD | |
| 42 | +| CI: lint, typecheck, `drizzle-kit check`, unit smoke | partial | `.github/workflows/new-deepnotes-ci.yml`; optional deploy job TBD | |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +### Phase 3 — backend (REST + Drizzle) |
| 47 | + |
| 48 | +| Item | Status | Notes | |
| 49 | +|------|--------|--------| |
| 50 | +| Auth + sessions (cookies + JWT) | ☐ | | |
| 51 | +| Pages / groups REST + Drizzle | ☐ | | |
| 52 | +| Realtime + collab (no key rotation, no tRPC) | ☐ | Protocol + DO vs service decision | |
| 53 | +| Load tests (after protocols frozen) | ☐ | | |
| 54 | +| Stripe webhooks (no RevenueCat) | ☐ | | |
| 55 | + |
| 56 | +--- |
| 57 | + |
| 58 | +### Phase 4 — new client MVP |
| 59 | + |
| 60 | +| Item | Status | Notes | |
| 61 | +|------|--------|--------| |
| 62 | +| Vite + Vue SPA, feature folders, fetch + OpenAPI client | ☐ | | |
| 63 | +| Slice: auth → list → page → Yjs collab → groups | ☐ | | |
| 64 | +| Port/reuse crypto libs where stable | ☐ | | |
| 65 | +| Capacitor / Tauri after web | ☐ | | |
| 66 | + |
| 67 | +--- |
| 68 | + |
| 69 | +### Phase 5 — cutover |
| 70 | + |
| 71 | +| Item | Status | Notes | |
| 72 | +|------|--------|--------| |
| 73 | +| Staged rollout + retire `/trpc` for supported clients | ☐ | | |
| 74 | +| Data + Stripe + E2E + decrypt spot-checks green | ☐ | | |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +## Success criteria (see [RESTART_PLAN.md §8](../docs/RESTART_PLAN.md)) |
| 79 | + |
| 80 | +- [ ] OpenAPI is source of truth for public HTTP; client uses generated types or shared Zod. |
| 81 | +- [ ] Drizzle migrations apply from empty DB to target schema deterministically; production upgrade documented. |
| 82 | +- [ ] Cold `pnpm dev` API start under ~2 s on a typical laptop (no `inspect-brk` by default). |
| 83 | +- [ ] Collab + realtime each have at least one integration test (Redis + docker or in-memory). |
| 84 | +- [ ] No tRPC / `superjson` / RevenueCat in new default stack; no key-rotation paths; Stripe/IAP handling agreed. |
| 85 | +- [ ] New client: zero undocumented framework forks, or a short owned exception list. |
| 86 | +- [ ] Cloudflare: API + static/SSG deploy documented; Hyperdrive + Postgres + Redis proven in staging; collab/realtime topology chosen and load-tested. |
| 87 | + |
| 88 | +--- |
| 89 | + |
| 90 | +## Blocked / decisions |
| 91 | + |
| 92 | +| Topic | Decision / next step | |
| 93 | +|-------|----------------------| |
| 94 | +| Collab / realtime topology | Durable Objects vs separate services — decide and record here | |
| 95 | +| OpenAPI vs Zod single source | Pick codegen or zod-to-openapi-only and stick to it (plan §4.0) | |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +## Changelog |
| 100 | + |
| 101 | +| Date | Change | |
| 102 | +|------|--------| |
| 103 | +| 2026-04-26 | Initial tracker; Phase 2 largely started, Phase 0 partially. | |
0 commit comments