diff --git a/docs/WINDSURF/SERVICE_CONSOLIDATION_ROADMAP.md b/docs/WINDSURF/SERVICE_CONSOLIDATION_ROADMAP.md index e79312ef..1a08730f 100644 --- a/docs/WINDSURF/SERVICE_CONSOLIDATION_ROADMAP.md +++ b/docs/WINDSURF/SERVICE_CONSOLIDATION_ROADMAP.md @@ -272,49 +272,49 @@ All containers served by one Cosmos client in platform-service: ### 1.1 Copy modules -- [ ] **1.1.1** Copy `growth-service/src/modules/invitations/` → `platform-service/src/modules/invitations/` -- [ ] **1.1.2** Copy `growth-service/src/modules/referrals/` → `platform-service/src/modules/referrals/` -- [ ] **1.1.3** Copy `growth-service/src/modules/promos/` → `platform-service/src/modules/promos/` +- [x] **1.1.1** Copy `growth-service/src/modules/invitations/` → `platform-service/src/modules/invitations/` +- [x] **1.1.2** Copy `growth-service/src/modules/referrals/` → `platform-service/src/modules/referrals/` +- [x] **1.1.3** Copy `growth-service/src/modules/promos/` → `platform-service/src/modules/promos/` ### 1.2 Copy lib files -- [ ] **1.2.1** Copy `growth-service/src/lib/webhooks.ts` → `platform-service/src/lib/webhooks.ts` **(Gap 4)** -- [ ] **1.2.2** Verify growth `product-config.ts` uses same `PRODUCT_ID` export name as platform ✅ +- [x] **1.2.1** Copy `growth-service/src/lib/webhooks.ts` → `platform-service/src/lib/webhooks.ts` **(Gap 4)** +- [x] **1.2.2** Verify growth `product-config.ts` uses same `PRODUCT_ID` export name as platform ✅ ### 1.3 Fix imports in copied modules -- [ ] **1.3.1** Update all `../../lib/errors.js` → verify same re-export exists in platform-service -- [ ] **1.3.2** Update all `../../lib/product-config.js` → verify `PRODUCT_ID` export matches -- [ ] **1.3.3** Update all `../../lib/cosmos.js` → verify same pattern -- [ ] **1.3.4** Update `../../lib/webhooks.js` references +- [x] **1.3.1** Update all `../../lib/errors.js` → verify same re-export exists in platform-service — identical +- [x] **1.3.2** Update all `../../lib/product-config.js` → verify `PRODUCT_ID` export matches — identical +- [x] **1.3.3** Update all `../../lib/cosmos.js` → verify same pattern — identical +- [x] **1.3.4** Update `../../lib/webhooks.js` references — identical ### 1.4 Merge config **(Gap 5)** -- [ ] **1.4.1** Add to `platform-service/src/lib/config.ts`: - - `STRIPE_SECRET_KEY: z.string().optional()` (was required in growth — make optional for now) +- [x] **1.4.1** Add to `platform-service/src/lib/config.ts`: - `WEBHOOK_INVITATION_REDEEMED_URL: z.string().optional()` - `WEBHOOK_REFERRAL_STATUS_URL: z.string().optional()` -- [ ] **1.4.2** Add `stripe` (^17.5.0) to `platform-service/package.json` dependencies -- [ ] **1.4.3** Add growth Cosmos containers to platform-service container registry + - Note: `STRIPE_SECRET_KEY` skipped — promos reads it via `process.env` directly, not config +- [x] **1.4.2** Add `stripe` (^17.5.0) to `platform-service/package.json` dependencies +- [x] **1.4.3** Cosmos containers — auto-created on first write via `getContainer()` pattern ### 1.5 Register routes -- [ ] **1.5.1** Add imports to `platform-service/src/server.ts`: `invitationRoutes`, `referralRoutes`, `promoRoutes` -- [ ] **1.5.2** Register routes with `/api` prefix (same as growth-service) +- [x] **1.5.1** Add imports to `platform-service/src/server.ts`: `invitationRoutes`, `referralRoutes`, `promoRoutes` +- [x] **1.5.2** Register routes with `/api` prefix (same as growth-service) ### 1.6 Copy + fix tests -- [ ] **1.6.1** Copy all growth test files to platform-service -- [ ] **1.6.2** Fix test import paths -- [ ] **1.6.3** Run tests: `pnpm --filter @lysnrai/platform-service test` — **growth tests must pass** +- [x] **1.6.1** Tests copied with modules (same directory) +- [x] **1.6.2** No import path changes needed (identical lib structure) +- [x] **1.6.3** Run tests: **83 passed** (55 original + 28 growth) ✅ ### 1.7 Verify + remove -- [ ] **1.7.1** `pnpm --filter @lysnrai/platform-service build` — clean -- [ ] **1.7.2** `pnpm --filter @lysnrai/platform-service test` — all tests pass (existing + growth ≥ 69) -- [ ] **1.7.3** Remove `services/growth-service/` directory -- [ ] **1.7.4** `pnpm install` — workspace resolution updated (no broken refs) -- [ ] **1.7.5** Commit: `refactor: merge growth-service into platform-service` +- [x] **1.7.1** `pnpm --filter @lysnrai/platform-service build` — clean ✅ +- [x] **1.7.2** `pnpm --filter @lysnrai/platform-service test` — **83 tests pass** ✅ +- [x] **1.7.3** Remove `services/growth-service/` directory +- [x] **1.7.4** `pnpm install` — workspace resolution updated +- [x] **1.7.5** Commit: [`05008ee`] `refactor: merge growth-service into platform-service` ---