- LoginSchema and RegisterSchema now require productId field
- Login/Register routes use productId from request body (not env var)
- PRODUCT_ID import removed from auth/routes.ts
- Test fixtures updated with productId: 'lysnrai'
- createAccessToken() and createRefreshToken() now require productId parameter
- Issuer changed from PRODUCT_ID env var to generic 'bytelyst-platform'
- verifyToken() validates against 'bytelyst-platform' issuer
- auth/routes.ts callers updated to pass productId (still from PRODUCT_ID env var for now)
- Refresh endpoint reads productId from user doc
- Best-effort JWT parsing on every request (non-blocking for unauthenticated routes)
- Attaches parsed payload to req.jwtPayload for downstream use by getRequestProductId()
- Invalid/expired tokens silently ignored — auth-required routes handle their own validation
- New lib/request-context.ts with product validation against cache
- Priority: JWT payload > X-Product-Id header > env var fallback
- Rejects unknown or disabled products with 400 Bad Request
- Augments FastifyRequest with jwtPayload type declaration
- getRequestProductConfig() for modules needing product-specific values
- New products container in Cosmos DB (partition key: /id)
- ProductDoc: displayName, licensePrefix, deviceLimits, trialDays, status
- In-memory cache loaded on startup via loadProductCache()
- CRUD routes: GET/POST /products, GET/PUT /products/:id
- Cache refreshed after admin writes (create/update)
- Registered before all other modules in server.ts
Added AZURE_RESOURCE_INVENTORY.md with complete Azure infrastructure documentation:
- Subscription details and resource groups
- Full resource tree with all 13 Azure resources
- Cosmos DB databases (mindlyst, lysnrai, mywisprai) with all containers
- Storage, Key Vault, OpenAI, Speech Services, Notification Hubs
- Environment variables and resource IDs
- Geographic distribution and cost optimization notes
- Azure CLI quick commands
Co-Authored-By: Warp <agent@warp.dev>
- Gap 13: Growth tsconfig path alias (unused, safe)
- Gap 14: Docker Compose depends_on for tracker-dashboard
- Gap 15: Admin dashboard docs.ts service directory list
- Gap 16: MindLyst docs reference old services
- Gap 17: Old Dockerfiles need deletion
- Confirmed safe: Cosmos pattern, vitest, extraction-service, MindLyst web, pnpm-workspace
- Phase 4 expanded with new task items (4.8.3, 4.8.6, 4.12, 4.13, 4.15.6)
- Gap 1: Product ID naming inconsistency (tracker uses DEFAULT_PRODUCT_ID)
- Gap 2: Missing deps in platform-service (stripe, @bytelyst/auth, @fastify/rate-limit)
- Gap 3: Billing internal key auth must be scoped (not global hook)
- Gap 4-5: Growth webhooks lib + Stripe key config
- Gap 6: 17+ consumer files need URL updates across LysnrAI repo
- Gap 7: Ops status health check route references old ports
- Gap 8: Stripe webhook test hardcodes port 4002
- Gap 9-10: Load tests + Stripe docs reference old ports
- Gap 11: LysnrAI services/ env stubs need cleanup
- Gap 12: Mobile apps — no changes needed (confirmed)
- Route collision check: verified no conflicts
- Added Python client updates, Phase 0 baseline steps, pnpm install verification
- SERVICE_CONSOLIDATION_ROADMAP.md: plan to merge billing+growth+tracker into platform-service (5→2 services)
- AUTH_SERVICE_DESIGN.md: renamed with OUTDATED_CANCELED suffix, auth handled by platform-service
- backup-main.sh: no longer pushes unpushed main commits, removed Main Push column
- commit-workspace.sh: removed push_repo function, local commits only
- repo_commit-workspace.md: updated docs to reflect no-push behavior