saravanakumardb1
97b3ffb21d
feat(ai-diagnostics): add LLM analyzer with prompts and insight generation [2.1-2.2]
2026-03-03 11:52:12 -08:00
saravanakumardb1
50b7e22985
feat(ai-diagnostics): add Azure OpenAI embedding pipeline [1.2.1]
2026-03-03 11:47:12 -08:00
saravanakumardb1
a9b224749c
feat(ab-testing): add experiment types and cosmos containers [1.1]
2026-03-03 11:44:33 -08:00
saravanakumardb1
4de01269b5
feat(ai-diagnostics): add error clustering types and cosmos containers [1.1.1-1.1.2]
2026-03-03 11:44:23 -08:00
saravanakumardb1
8e90358960
feat(platform): PII Redaction library (Appendix D.1)
...
- 8 PII patterns: email, SSN, credit card, phone, IP, password/token, JWT, API key
- redactPII() for string redaction
- redactObject() for recursive object redaction
- redactLogMessage() for log entries with context
- containsPII() and getPIITypes() detection helpers
- Custom pattern registration
- Preset configurations: minimal, standard, aggressive
2026-03-03 09:37:53 -08:00
saravanakumardb1
4bf18f4d4f
feat(platform-service): Phase 4.4 - Push notification wiring (FCM/APNS)
...
- push-notifications.ts: FCM and APNS delivery services
- Device token registration/management
- sendPushNotification() for bulk delivery
- Automatic token deactivation on APNS 410 responses
2026-03-03 08:05:21 -08:00
saravanakumardb1
1b11db3f6f
feat(broadcasts,surveys): Phase 1 complete - backend modules
...
- broadcasts/types.ts: Broadcast, BroadcastTarget, BroadcastMetrics, InAppMessage
- broadcasts/repository.ts: CRUD + delivery tracking + read receipts
- broadcasts/targeting.ts: evaluateTarget(), semver, FNV-1a hash
- broadcasts/routes.ts: Admin CRUD + public endpoints (14 routes)
- surveys/types.ts: Survey, Question, SurveyResponse, conditional logic
- surveys/repository.ts: CRUD + analytics + CSV export
- surveys/routes.ts: Admin CRUD + public endpoints (13 routes)
- cosmos-init.ts: 7 new containers with TTL policies
- server.ts: Register broadcastRoutes + surveyRoutes
Implements Phase 1 of platform_BROADCAST_SURVEY_ROADMAP.md
2026-03-02 23:51:23 -08:00
saravanakumardb1
dea1521dd5
feat(diagnostics): add 4 Cosmos containers (sessions, traces, logs, screenshots) with TTL
2026-03-02 23:32:49 -08:00
saravanakumardb1
e943f14608
fix(marketplace): prevent duplicate votes with vote tracking collection
...
- Add marketplace_votes container to cosmos-init.ts
- Add MarketplaceVoteDoc type and vote repository functions
- Fix vote endpoint to toggle votes (prevent unlimited voting)
- Fix listMyReports to filter by productId for data isolation
- Update report routes to pass productId to listMyReports
2026-03-02 10:12:33 -08:00
saravanakumardb1
3e05260a6f
feat(marketplace): generic template marketplace with listings, reviews, installs, certification
2026-03-02 10:02:54 -08:00
saravanakumardb1
7ca2139418
refactor(storage): migrate to storage abstraction
2026-03-02 09:07:33 -08:00
saravanakumardb1
4d126cb051
feat(platform-service): migrate 6 repositories to @bytelyst/datastore (flags, settings, comments, votes, products, themes) — 756/756 tests pass
2026-03-02 00:51:03 -08:00
saravanakumardb1
b33d3cf2b3
feat(platform): add webhook subscriptions module, DB migration runner, Swagger UI — complete 23/25 roadmap items
2026-03-01 23:38:48 -08:00
saravanakumardb1
24d7896599
refactor(platform-service): migrate product-specific modules to product repo backends
...
Remove 23 product-specific module directories from platform-service:
- ChronoMind: timers, routines, households, shared-timers, webhooks
- JarvisJr: jarvis-agents, jarvis-sessions, jarvis-memory, jarvis-teams, marketplace
- NomGap: fasting-sessions, fasting-protocols, body-stages, social-fasting, meal-log, push-triggers
- PeakPulse: peak-sessions, peak-routes
- MindLyst: brains, memory, reflections, daily-briefs, streaks
Update server.ts: remove product module imports and registrations
Update cosmos-init.ts: remove product-specific container definitions
Clean up server.test.ts: remove 5 stale vi.mock() calls
Update AGENTS.md: add section 13 (product backends), update test counts
Platform-service tests: 759 passing (platform-common only)
Product backends: PeakPulse 32, ChronoMind 171, JarvisJr 198, NomGap 152, MindLyst 59
2026-03-01 20:38:32 -08:00
saravanakumardb1
a2461fc26a
fix(platform): replace 3 console.* calls with process.stdout/stderr in cosmos-init + server startup
2026-03-01 17:41:02 -08:00
saravanakumardb1
d10b898ba5
feat(peak-routes): add PeakPulse track point storage module — types, repository, routes, 10 tests
2026-03-01 07:40:19 -08:00
saravanakumardb1
b20e1c6165
feat(peak-sessions): add PeakPulse session sync module — types, repository, routes, 20 tests
2026-03-01 07:12:28 -08:00
saravanakumardb1
dcabe46de2
feat(jarvis): add jarvis-agents, jarvis-sessions, jarvis-memory modules (63 tests)
2026-03-01 07:09:12 -08:00
saravanakumardb1
1b2a5d5483
fix(platform-service): register 13 missing MindLyst Cosmos containers
...
Add containers used by MindLyst web API routes to platform-service
cosmos-init so the shared database has a single authoritative registry:
share_cards, notification_log, analytics_events, brain_packs,
chat_sessions, ab_experiments, waitlist_entries, email_captures,
engagement_campaigns, context_triggers, monitoring_reports,
nudge_state, triage_retries
Note: 'referrals' is intentionally skipped — the growth module already
registers it with /id partition key, but MindLyst uses /userId. This
partition key mismatch requires a separate data migration to reconcile.
All 1141 platform-service tests pass.
2026-02-28 19:23:04 -08:00
saravanakumardb1
ba2641c552
feat(platform-service): add push notification triggers module (6 endpoints, 22 tests)
...
- 7 trigger types: streak_risk, fast_milestone, stage_transition, social_invite, weekly_digest, achievement_unlocked, refeeding_reminder
- Built-in templates with variable interpolation
- CRUD + batch create + pending trigger query + status updates + stats
- push_triggers container (TTL 30d)
- 1,112 total platform-service tests passing
2026-02-28 14:10:11 -08:00
saravanakumardb1
20e0ef2201
feat(platform-service): add P2 Product Intelligence modules (5 modules, 61 tests)
...
- experiments: A/B testing with FNV-1a deterministic variant assignment (7 endpoints, 15 tests)
- analytics: metric ingest + daily/weekly/monthly rollup queries (3 endpoints, 14 tests)
- feedback: in-app bug/feature/praise submission + admin triage (6 endpoints, 14 tests)
- impersonation: admin user impersonation with audit trail (4 endpoints, 6 tests)
- changelog: public product changelog with admin CRUD (6 endpoints, 12 tests)
- 6 new Cosmos containers added to cosmos-init.ts
- All 5 route modules registered in server.ts
- 1,090 total platform-service tests passing
2026-02-28 14:04:07 -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
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
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
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
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
0c3c109bf1
feat(platform-service): add settings module with device overrides
...
- Added settings module (types, repository, routes)
- Endpoints: GET/PUT /settings, GET/PUT/DELETE /settings/device/:deviceId
- Enforced userId from JWT and productId request scoping
- Added settings Cosmos container registration and route registration in server
- Added module tests for settings schemas and route export
- Verified: tsc --noEmit clean, 20 test files / 183 tests passing
2026-02-15 14:57:20 -08:00
saravanakumardb1
c0830e3dec
refactor(platform-service): remove BILLING_INTERNAL_KEY guard from server.ts
...
- Billing routes (subscriptions, usage, plans, licenses) now registered directly
- No more X-Internal-Key header check — JWT-based productId auth is sufficient
- BILLING_INTERNAL_KEY removed from config schema and AKV secret resolution
- 166 tests pass, tsc clean
2026-02-15 14:30:30 -08:00
saravanakumardb1
60617ab050
refactor(platform-service): replace PRODUCT_ID with getRequestProductId(req) in all modules
...
- 26 files updated: all repositories accept productId parameter instead of env var
- All route handlers extract productId via getRequestProductId(req) (JWT → header → env fallback)
- Repositories: auth, flags, audit, notifications, licenses, plans, referrals, usage, subscriptions, invitations
- Routes: all above + promos, items, memory, public, ratelimit, stripe
- lib/webhooks.ts: dispatchWebhook accepts optional productId parameter
- Stripe webhook handler uses metadata-based productId (no client JWT available)
- Ratelimit default config uses DEFAULT_PRODUCT_ID at startup
- 166 tests pass, tsc --noEmit clean
2026-02-15 14:29:11 -08:00
saravanakumardb1
365061566a
feat(platform-service): add getRequestProductId() + getRequestProductConfig() helpers
...
- 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
2026-02-15 14:14:17 -08:00
saravanakumardb1
755c16dbfb
feat(platform-service): add products module (types, repository, cache, routes)
...
- 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
2026-02-15 14:13:03 -08:00
17c41e8441
feat(platform-service): add memory-items API backed by Cosmos
2026-02-15 03:20:09 -08:00
saravanakumardb1
29fc8124e4
refactor: merge tracker-service into platform-service
...
Phase 3 of service consolidation (5→2 services).
Moved modules:
- items (16 tests)
- comments (6 tests)
- votes (5 tests)
- public (16 tests) — rate-limited, no auth required
Changes:
- Copied 4 modules from tracker-service
- Added DEFAULT_PRODUCT_ID alias in product-config.ts (Gap 1)
- Created src/lib/auth.ts re-exporting extractAuth from @bytelyst/auth (Gap 2)
- Added @bytelyst/auth and @fastify/rate-limit to package.json (Gap 2)
- Registered itemRoutes, commentRoutes, voteRoutes, publicRoutes in server.ts
- Public routes at top level (no auth scope)
- Removed tracker-service directory
Tests: 158 passing (115 + 43 from tracker = 158) ✅
Build: clean ✅
Service consolidation Phases 1-3 complete:
- growth-service: merged ✅
- billing-service: merged ✅
- tracker-service: merged ✅
Remaining: 2 services (platform-service + extraction-service)
2026-02-14 21:34:21 -08:00
saravanakumardb1
f13c676139
refactor: merge billing-service into platform-service
...
Phase 2 of service consolidation (5→2 services).
Moved modules:
- subscriptions (9 tests)
- usage (7 tests)
- plans (9 tests)
- licenses (7 tests)
- stripe (0 tests — webhook signature verified at runtime)
Changes:
- Copied 5 modules + stripe.ts lib from billing-service
- Added billing env vars to config schema (Stripe, internal key, etc.)
- Scoped billing routes with internal key auth guard (Gap 3)
- When BILLING_INTERNAL_KEY is set, billing routes require x-internal-key header
- When unset, billing routes are open (dev mode)
- Stripe routes always outside scope (own webhook signature check)
- Removed billing-service directory
Tests: 115 passing (83 + 32 from billing = 115) ✅
Build: clean ✅
2026-02-14 21:31:04 -08:00
saravanakumardb1
05008ee04f
refactor: merge growth-service into platform-service
...
Phase 1 of service consolidation (5→2 services).
Moved modules:
- invitations (12 tests)
- referrals (9 tests)
- promos (7 tests)
Changes:
- Copied 3 modules + webhooks.ts lib from growth-service
- Added stripe dep to platform-service package.json
- Added webhook env vars to config schema
- Registered invitationRoutes, referralRoutes, promoRoutes in server.ts
- Removed growth-service directory
Tests: 83 passing (was 55 + 28 from growth = 83) ✅
Build: clean ✅
2026-02-14 21:27:44 -08:00
95b45a9fd3
fix(cosmos): init containers on startup for local compose
2026-02-14 20:57:17 -08:00
125eb03745
feat(blob): add @bytelyst/blob shared package
2026-02-14 15:53:33 -08:00
saravanakumardb1
90b9cf93d8
fix(common): configure ESLint 9 and fix lint issues
...
- Added @eslint/js dependency
- Updated eslint.config.js for ESLint 9 compatibility
- Added required globals (crypto, localStorage, React, etc.)
- Fixed unused imports and variables
- Disabled sort-imports temporarily
- Formatted all files with Prettier
2026-02-12 16:37:30 -08:00
saravanakumardb1
4ae7a9d023
refactor(services): rewire lib/ to @bytelyst/* packages + add docker-compose
...
Rewired all 4 services:
- lib/errors.ts → re-exports from @bytelyst/errors
- lib/cosmos.ts → re-exports from @bytelyst/cosmos
- lib/product-config.ts → uses loadProductIdentity()/getProductId() from @bytelyst/config
- lib/config.ts → kept self-contained (zod v3/v4 type mismatch with loadConfig)
Added workspace deps (@bytelyst/errors, @bytelyst/cosmos, @bytelyst/config) to all 4 services.
Added docker-compose.yml with Loki, Grafana, Traefik, and all 4 services.
Added .env.example with required env vars.
Added passWithNoTests to vitest.config.ts.
Pinned root zod to ^3.24.0 to match service zod versions.
All 12 projects build. 175 tests passing.
2026-02-12 11:49:42 -08:00