Commit Graph

233 Commits

Author SHA1 Message Date
saravanakumardb1
ae2dae4413 docs: roadmap — Phase 3 fully complete, all items checked off including geo distribution UI 2026-02-17 11:14:56 -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
70fa6f4738 docs: update roadmap — Phase 3 complete (all items checked off) 2026-02-17 11:00:14 -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
17f4e39c63 docs: update roadmap — Phase 3 nearly complete (cluster actions, audit, alerts, metrics, GDPR UI, indexing) 2026-02-17 10:52:53 -08:00
saravanakumardb1
b74a6f2bfc feat(telemetry): Phase 3 — cluster resolve/ignore, audit logging, webhook alerts, metrics endpoint 2026-02-17 10:50:37 -08:00
saravanakumardb1
056f3236b6 feat(telemetry): Phase 3 — cluster resolve/ignore, audit logging, webhook alerts, metrics endpoint, Cosmos indexes 2026-02-17 10:50:29 -08:00
saravanakumardb1
80a4459f81 docs: update documentation 2026-02-17 10:49:14 -08:00
saravanakumardb1
856788c386 docs: update documentation 2026-02-17 10:35:46 -08:00
saravanakumardb1
0c98e3ae1e docs: update roadmap — Phase 3 progress (policy UI, rate limiting, ETag, dedup, GDPR) 2026-02-17 10:25:11 -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
0edafab501 docs: Phase 2 complete — Android telemetry checked off, roadmap updated 2026-02-17 10:16:45 -08:00
saravanakumardb1
ae45054d32 docs: update roadmap — tracker + admin self-telemetry complete, 128 tests 2026-02-17 10:01:45 -08:00
saravanakumardb1
e6bce1f4c6 docs: add test coverage section to telemetry roadmap (108 tests across 3 components) 2026-02-17 09:44:04 -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
dcc0befb8c docs: fix 10 gaps in telemetry roadmap — code bugs, diagram, missing dashboards 2026-02-17 09:36:56 -08:00
saravanakumardb1
c3d697711e docs: add telemetry implementation roadmap with phase checkboxes and commit links 2026-02-17 09:26:49 -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
083cf029c1 docs: fix 18 gaps in telemetry design doc (rev 2) 2026-02-17 09:01:37 -08:00
saravanakumardb1
c59049efec docs: add client telemetry & log insights detailed design 2026-02-17 08:47:46 -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
b9b4822cad docs(waitlist): add implementation TODOs summary + commit links to roadmap 2026-02-16 22:50:56 -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