saravanakumardb1
7d5ed86724
feat: add universal prep-consumer.sh for portable Docker/CI builds + fix tsc errors
2026-02-28 12:32:11 -08:00
saravanakumardb1
4e94ecd721
feat(auth): add forgot-password/change-password API routes to admin dashboard + wire email delivery
...
Admin dashboard:
- platform-client.ts: Added forgotPasswordViaService, changePasswordViaService, deleteAccountViaService
- app/api/auth/forgot-password/route.ts: New API route proxying to platform-service
- app/api/auth/change-password/route.ts: New API route for authenticated password change
Platform-service (from prior session):
- auth/routes.ts: Added /auth/change-password and DELETE /auth/account endpoints, wired email verification on register
- auth/types.ts: Added ChangePasswordSchema and DeleteAccountSchema
- delivery/subscribers.ts: Updated password reset subscriber, added email verification subscriber
- delivery/channels/email.ts: Added ByteLyst email API provider (sendViaBytelyst)
- delivery/types.ts: Added 'bytelyst' provider
- events/types.ts: Added resetToken/displayName to user.password_reset, added user.email_verification_requested event
2026-02-28 04:17:04 -08:00
saravanakumardb1
27f271d983
feat(platform): add P1 operational maturity modules — sessions, maintenance, exports, IP rules
...
- modules/sessions: device session tracking, revoke one/all, admin force-revoke (9 tests)
- modules/maintenance: 4 modes (off/read_only/maintenance/emergency), bypass roles/IPs, scheduled windows (14 tests)
- modules/exports: GDPR data export jobs for users/audit/telemetry/usage/subscriptions/licenses (10 tests)
- modules/ip-rules: IP allow/deny with CIDR matching, temporary blocks with expiry (10 tests)
- cosmos-init: 4 new containers (sessions, ip_rules, export_jobs, maintenance_windows)
- 1029 platform-service tests passing across 74 test files
2026-02-28 02:47:22 -08:00
saravanakumardb1
069d1ffda9
docs: add 19 reusable AI coding agent skills + sessions module scaffold
2026-02-28 02:41:22 -08:00
saravanakumardb1
662d417267
feat(platform): add email delivery module, wire event bus into auth, update roadmap
...
- modules/delivery: 8 email templates, renderer, SendGrid/Postmark/console adapters, dispatcher, delivery log, 21 tests
- modules/delivery/subscribers: event bus listeners for user.created, password_reset, email_verified
- auth/routes: emit bus events on register, forgot-password, verify-email (fire-and-forget)
- cosmos-init: delivery_log container (pk /pk, 90d TTL)
- roadmap: updated inventory (30 modules, 14 packages, 988 tests), marked P0 items complete
- 988 platform-service + 14 events = 1002 total tests passing
2026-02-28 02:36:58 -08:00
saravanakumardb1
772f428967
feat(platform): add P0 foundational modules — event bus, scheduled jobs, password reset, email verification, status page
2026-02-28 02:29:08 -08:00
saravanakumardb1
9a5e93bf05
feat(nomgap): add social-fasting + meal-log modules (47 tests, 2 Cosmos containers)
2026-02-28 00:37:46 -08:00
saravanakumardb1
5e8f133816
feat(webhooks): add webhook subscriptions module — 15 event types, HMAC signing, retry delivery
2026-02-28 00:27:32 -08:00
saravanakumardb1
b4237acaa2
feat(chronomind): add routines, households, shared-timers modules (88 new tests, 847 total)
2026-02-28 00:05:18 -08:00
saravanakumardb1
c1a1f86cd6
feat(timers): add timer CRUD endpoints for ChronoMind cloud sync (42 new tests, 759 total)
2026-02-27 23:48:31 -08:00
saravanakumardb1
1744bcf63f
feat(api): NomGap fasting modules — sessions CRUD + stats, 14 built-in protocols + custom CRUD, body stages + autophagy confidence (47 new tests, 717 total)
2026-02-27 22:32:28 -08:00
saravanakumardb1
ca70a05e1d
feat(flags): add region, osVersion targeting to feature flags
...
- Add OsVersionRange interface + Zod schema (platform, minVersion?, maxVersion?)
- Add regions[] and osVersions[] to FeatureFlagDoc, CreateFlagSchema, UpdateFlagSchema
- Add compareVersions() helper for dot-separated semver comparison
- Extend GET /flags/poll with ?region and ?osVersion query params
- Region targeting: flag only returned if client region is in flag's regions list
- OS version targeting: per-platform min/max version range filtering
- Add 10 new tests (schema validation, compareVersions edge cases)
- 634 tests passing, tsc clean
2026-02-17 20:53:48 -08:00
saravanakumardb1
51e2ecdec8
test(telemetry): Phase 3 regression tests — UpdateClusterSchema, ClusterStatusEnum, extractClientIp (614→624 tests)
2026-02-17 11:24:59 -08:00
saravanakumardb1
788ee57935
docs(telemetry): update routes doc comment with all 14 endpoints
2026-02-17 11:23:38 -08:00
saravanakumardb1
08b9642408
fix(telemetry): 3 bugs — Slack Block Kit text key, cluster reopen clears resolution, affectedInstallIds uses correct ID
2026-02-17 11:22:13 -08:00
saravanakumardb1
0bfd4bdf22
feat(telemetry): geo distribution endpoint (GET /telemetry/geo) with Cosmos GROUP BY aggregation
2026-02-17 11:13:55 -08:00
saravanakumardb1
61c919a916
feat(telemetry): Phase 3 — policy preview endpoint (count matching clients from recent events)
2026-02-17 10:59:13 -08:00
saravanakumardb1
2f61ea517c
feat(telemetry): Phase 3 — geo enrichment, Prometheus metrics export endpoint
2026-02-17 10:56:19 -08:00
saravanakumardb1
80a4459f81
docs: update documentation
2026-02-17 10:49:14 -08:00
saravanakumardb1
2fb341048e
feat(telemetry): Phase 3 — rate limiting, batch dedup, ETag config caching (614 tests)
2026-02-17 10:24:07 -08:00
saravanakumardb1
20f77d5a50
test(telemetry): add route-logic tests — containsPII, computePk, normalizeMessage, fingerprint, policyMatch, mergePolicies (34→77 tests)
2026-02-17 09:42:57 -08:00
saravanakumardb1
ce4c4ff53d
feat(telemetry): add telemetry module — ingest, config, query, clusters, policies (34 tests)
2026-02-17 09:06:43 -08:00
saravanakumardb1
18a5b342d9
fix(request-context): block sunset products in public productId resolver
2026-02-16 23:45:17 -08:00
saravanakumardb1
b0e8304d59
test(server): update @bytelyst/config mock for loadProductIdentity
2026-02-16 23:28:52 -08:00
saravanakumardb1
c7480661eb
fix(waitlist): harden public endpoints and unsubscribe validation
...
- Block sunset products on public waitlist join/count/config endpoints
- Verify unsubscribe email matches unsubscribeToken before status change
- Keep idempotent join behavior explicit for existing entries (200 path)
- Escape CSV newline/carriage-return values to prevent malformed exports
- Refactor request productId extraction to shared helper in request-context
- Guard prelaunchConfig merge with safe default object in products update route
2026-02-16 23:28:32 -08:00
saravanakumardb1
6a996cc11d
test(waitlist): add 45 unit tests + update doc checkboxes with commit links
...
- 45 tests: schema validation, email normalization, status transitions, route exports
- Update Phase 1, 2, 3, 4 checkboxes in PRE_LAUNCH_SIGNUP_SYSTEM.md with commit SHAs
- Add webhook env vars to .env.example
2026-02-16 22:49:42 -08:00
saravanakumardb1
2692c918ce
feat(waitlist): add pre-launch waitlist module (types, repo, routes)
...
- Create waitlist/types.ts: WaitlistEntryDoc, Zod schemas for join/status/unsubscribe/admin
- Create waitlist/repository.ts: full CRUD, dedup by emailNormalized, position assignment, stats
- Create waitlist/routes.ts: 5 public endpoints + 7 admin endpoints with role guard
- Add waitlist container to cosmos-init.ts (+ 13 previously missing containers)
- Add dispatchWaitlistJoined webhook to webhooks.ts
- Register waitlistRoutes in server.ts
- Public: join, check status, count, config, unsubscribe
- Admin: list, stats, get, update, delete, batch invite, CSV export
2026-02-16 22:45:14 -08:00
saravanakumardb1
66e657a646
feat(products): extend product status lifecycle + prelaunch config
...
- Add 6 product statuses: draft, pre_launch, beta, active, sunset, disabled
- Add PrelaunchConfig with customFields, CAPTCHA, tagline, maxSignups
- Add isValidStatusTransition() helper for safe status changes
- Update getRequestProductId() to block draft/sunset/disabled
- Add getRequestProductIdForPublic() for pre_launch waitlist routes
- Add status transition validation to product update route
- Add PRE_LAUNCH_SIGNUP_SYSTEM.md design doc with full roadmap
2026-02-16 22:36:53 -08:00
saravanakumardb1
209213b50d
test(server): cover platform bootstrap wiring and hooks
2026-02-16 15:25:27 -08:00
saravanakumardb1
1df94103ea
test(cosmos): add init path coverage for platform-service
2026-02-16 15:22:38 -08:00
saravanakumardb1
e3f173c164
test(config): add env schema coverage for platform-service
2026-02-16 15:20:04 -08:00
saravanakumardb1
9fbaf60ba8
test(platform-service): add route coverage for items invitations audit
2026-02-16 15:00:13 -08:00
saravanakumardb1
7179f1e7c4
test(platform-service): add promos route-level tests
2026-02-16 12:46:40 -08:00
saravanakumardb1
e4ee23aab4
test(platform-service): add comments route-level tests
2026-02-16 12:43:56 -08:00
saravanakumardb1
3e1647ae96
test(platform-service): add tokens route-level tests
2026-02-16 12:41:34 -08:00
saravanakumardb1
dc0cf6d8b4
test(platform-service): add referrals route-level tests
2026-02-16 12:38:42 -08:00
saravanakumardb1
783b9792df
test(platform-service): add memory route-level tests
2026-02-16 12:36:27 -08:00
saravanakumardb1
8576fe2e91
test(platform-service): add route tests for settings, votes, and public modules
2026-02-16 12:33:17 -08:00
saravanakumardb1
c7934af227
test(platform-service): add subscriptions route-level tests — 395 tests, 39.6% stmts
2026-02-16 12:17:00 -08:00
saravanakumardb1
1cb9af3ae4
test(platform-service): add usage route-level tests — 386 tests, 37.9% stmts
2026-02-16 12:15:40 -08:00
saravanakumardb1
149d97dd9f
test(platform-service): add route-level tests for plans + notifications — 379 tests, 35.4% stmts
2026-02-16 12:14:42 -08:00
saravanakumardb1
87f7d76915
test(platform-service): add products, cache, votes repository tests — 362 tests, 32.6% stmts
2026-02-16 12:08:40 -08:00
saravanakumardb1
747d89fe4d
test(platform-service): add repository tests for settings, referrals — 336 tests, 30.64% coverage
2026-02-16 12:05:03 -08:00
saravanakumardb1
fbb2197f7c
test(platform-service): add repository tests for notifications, plans, subscriptions, usage, tokens, memory + fix extraction-service flaky test
2026-02-16 11:59:06 -08:00
saravanakumardb1
7524c4d29e
feat(platform-service): add GET /settings/kill-switch public endpoint
...
- No auth required — mobile apps call this at launch before login
- Reads kill_switch feature flag from Cosmos DB
- If flag enabled=true → returns disabled:true with maintenance message
- Fail-open: DB errors allow app to run normally
- Response: { enabled: bool, disabled: bool, message: string }
Used by iOS KillSwitchService.swift and Android KillSwitchService.kt
2026-02-15 21:30:03 -08:00
saravanakumardb1
5622499575
feat(licenses): add POST /licenses/revoke endpoint
...
Sets license status to 'revoked' and clears all device activations.
Returns the updated license doc. Idempotent — already-revoked licenses
return immediately.
2026-02-15 20:15:10 -08:00
saravanakumardb1
972a1a21d7
feat(usage): cross-product usage queries + product breakdown
...
- Make productId optional in repository list() — omitting it queries all products
- Add resolveProductFilter() helper: productId=_all skips filter, specific value overrides default
- Add ProductBreakdown interface for per-product aggregation
- Summary endpoint now returns productBreakdown[] alongside model/source breakdowns
- Enables admin to compare John's LysnrAI usage vs MindLyst usage
2026-02-15 19:47:23 -08:00
saravanakumardb1
1cf74d22fa
feat(usage): add source/platform tracking + source breakdown in summary
...
- Add optional 'source' field to UsageDoc (desktop/web/ios/android)
- Add 'source' to UpsertUsageSchema validation
- Include source in upsert document ID to avoid cross-platform overwrites
- Add SourceBreakdown interface
- Aggregate sourceBreakdown in GET /usage/summary alongside modelBreakdown
- Clients can now pass source when reporting usage for per-app analytics
2026-02-15 18:57:16 -08:00
saravanakumardb1
b977e85bc2
feat(platform-service): add profile updates, tokens, and themes modules
...
Auth:
- PUT /auth/profile — self-service profile update (displayName, phone, bio, avatarUrl)
- ProfileUpdateSchema added to types.ts
- Repository update() expanded to accept profile fields
Tokens module (new):
- GET /tokens — list tokens (admin: all, user: own)
- POST /tokens — create API token (admin only)
- GET /tokens/count — count active tokens
- PATCH /tokens/:id — revoke token (admin only)
- DELETE /tokens/:id — delete token (super_admin only)
Themes module (new):
- GET /themes — list all themes (admin only)
- POST /themes — create theme (admin only)
- GET /themes/active — get active theme (public, no auth)
- GET /themes/:id — get theme by id (admin only)
- PUT /themes/:id — update theme (admin only)
- DELETE /themes/:id — delete theme (admin only)
- POST /themes/:id/activate — set theme as active (admin only)
2026-02-15 17:29:43 -08:00
saravanakumardb1
be3f5459bd
feat(platform-service): add SSO login endpoint (/auth/sso)
...
- POST /auth/sso — accepts verified email + provider + productId
- Creates user if not exists (with subscription + license provisioning)
- Issues platform JWT tokens for existing SSO users
- Supports Microsoft and Google OAuth providers
- Added SsoLoginSchema to types.ts
2026-02-15 16:38:10 -08:00