Commit Graph

94 Commits

Author SHA1 Message Date
saravanakumardb1
07d698e700 feat(packages): add @bytelyst/event-store, @bytelyst/fastify-sse, @bytelyst/webhook-dispatch — reusable event infrastructure for product backends 2026-03-10 18:37:01 -07:00
saravanakumardb1
cfca118c71 feat(fastify-core): add shared optional jwt context 2026-03-06 12:52:49 -08:00
saravanakumardb1
acfad8a042 feat(fastify-core): harden lifecycle and readiness support 2026-03-06 12:47:29 -08:00
saravanakumardb1
00b0555c97 fix(fastify-core,mcp-server): add logLevel to ServiceAppOptions and wire config.LOG_LEVEL so log verbosity is actually honoured at runtime 2026-03-05 12:38:09 -08:00
saravanakumardb1
bf7769bdaa fix(diagnostics-client): use session-scoped ingest endpoints; update MCP+A2A docs 2026-03-05 10:41:02 -08:00
saravanakumardb1
71b33fcf62 feat(design-tokens): add SSO brand color tokens 2026-03-04 19:54:40 -08:00
saravanakumardb1
2f7e3ad9b6 refactor(design-tokens): improve token validator
- ignore hsl(var(--...)) / rgb(var(--...))

- export generated/tokens entry
2026-03-04 18:13:13 -08:00
saravanakumardb1
a33f3cfbd6 docs: design system audit, onboarding guide, and AGENTS.md updates
- Comprehensive audit report: DESIGN_SYSTEM_AUDIT_2026-03-03.md
  - Token consumption across all 7 repos
  - 594 hardcoded colors identified
  - Per-product breakdown with migration priorities

- Developer onboarding guide: ONBOARDING.md
  - Platform-specific setup instructions
  - Migration steps for each product
  - Token cheat sheet and troubleshooting

- Updated AGENTS.md with Design System section
  - Never hardcode colors rule
  - Platform usage patterns (Web, iOS, Android, RN)
  - Current adoption status table
  - Validation commands

- Added design-tokens package README
  - Quick start for all platforms
  - Usage examples (CSS, TS, Swift, Kotlin, RN)
  - CI integration examples
2026-03-03 21:55:02 -08:00
saravanakumardb1
2a0a59e56c feat(design-tokens): add validation tooling and React Native bridge
- validate-tokens.js: Scan source files for hardcoded colors
- token-coverage.js: Report token adoption percentage per product
- generate-react-native.ts: Generator for Expo/NomGap StyleSheet tokens

All scripts include:
- Cross-platform file detection (.ts, .tsx, .swift, .kt)
- Product-specific token categorization
- Exit codes for CI integration
2026-03-03 21:51:56 -08:00
saravanakumardb1
78d28307ec feat(design-tokens): v1.1.0 — add product-specific tokens and new categories
- Add product token sections:
  - peakpulse: activity colors, speed zones, elevation, streaks
  - chronomind: urgency levels, focus mode, pomodoro colors
  - nomgap: fasting stage colors, autophagy meter, safety
  - lysnrai: recording states, processing, dictation mode

- Add new token categories:
  - zIndex: layers from hidden (-1) to tooltip (800)
  - icon: xs (12) to 2xl (48)
  - grid: 12-column system with breakpoints
  - opacity: 0-100 scale

- Regenerate all platform outputs (CSS, TS, Kotlin, Swift, React Native)
- Version bumped to 1.1.0
2026-03-03 21:51:20 -08:00
saravanakumardb1
359d6e18a5 feat: Platform Acceleration + A/B Testing Framework
Platform Acceleration Phase 1:
- @bytelyst/sync package: Offline-first sync engine with conflict resolution
  - Storage adapters: LocalStorage, InMemory, MMKV
  - Deduplication, retry with backoff, auto-flush on reconnect
  - 12 comprehensive tests
- @bytelyst/dashboard-components package: Shared React components
  - ErrorPage, NotFoundPage, LoadingSpinner, LoadingSkeleton, EmptyState, PageHeader
  - Theme-aware with CSS custom properties

A/B Testing Framework (Complete):
- Admin UI at /ops/ab-testing with experiments list, variant performance, AI suggestions
- Sidebar navigation with Beaker icon
- 40 tests passing in ab-testing module

All 909 platform-service tests pass.
2026-03-03 19:47:47 -08:00
saravanakumardb1
8749aa211d fix(feedback-client): update tests to use fetch instead of post 2026-03-03 12:26:02 -08:00
saravanakumardb1
7714ab51fb fix(events): add missing platform event schemas for campaign engine and notifications 2026-03-03 12:24:39 -08:00
saravanakumardb1
914e344a92 fix(feedback-client): correct ApiClient method usage and types 2026-03-03 12:20:43 -08:00
saravanakumardb1
7f5ff4c790 feat(config): implement P0-1 - Product manifest specification (product.json schema)
- Add ProductManifestSchema with Zod validation for product identity
- Support theme tokens, cosmos containers, feature flags, ports
- Add loadProductManifest(), validateProductManifest(), resolveTheme()
- Export all schemas and types from config package index
2026-03-03 10:01:40 -08:00
saravanakumardb1
fc8f8d33dc feat(kotlin-platform-sdk): add diagnostics module (Phase 2.3)
New diagnostics package in kotlin-platform-sdk:

- DiagnosticsTypes: Session, TraceSpan, LogEntry, Breadcrumb, NetworkRequest

- DiagnosticsClient: singleton with StateFlow for reactive state

- BreadcrumbTrail: ring buffer (max 100) for timeline

- NetworkInterceptor: OkHttp interceptor for HTTP capture

- DeviceStateCollector: battery, memory, storage, network

- 16+ JUnit tests for types and breadcrumbs

Features:

- configure()/start()/stop() lifecycle

- trace() suspend span wrapper

- log() with breadcrumb integration

- ETag-based config polling

- 30-second batch flush
2026-03-03 09:31:59 -08:00
saravanakumardb1
abcf817cb3 feat(swift-diagnostics): implement Phase 2.2 Swift Client SDK
New package ByteLystDiagnostics with:

- Core types: DiagnosticsSession, TraceSpan, LogEntry, Breadcrumb

- DiagnosticsClient: actor-based singleton with polling

- BreadcrumbTrail: ring buffer (max 100) for timeline

- NetworkInterceptor: URLProtocol-based HTTP capture

- DeviceState: battery, memory, storage, network, thermal

- 20+ XCTest unit tests

Features:

- configure()/start()/stop() lifecycle

- trace() async span wrapper

- log() with breadcrumb integration

- breadcrumb() manual timeline markers

- ETag-based config polling

- 30-second batch flush

Platforms: iOS 15+, macOS 13+, watchOS 8+, tvOS 15+
2026-03-03 09:28:11 -08:00
saravanakumardb1
45dbb789a1 feat(react-native): React Native SDK foundation for NomGap
- package.json with React Native/Expo peer dependencies
- Main index.ts with module exports for all platform services
- Providers and hooks for auth, telemetry, feature flags, kill switch, broadcasts, surveys
2026-03-03 08:40:24 -08:00
saravanakumardb1
8acb8db7d7 feat(diagnostics-client): implement Phase 2.1 TypeScript SDK
New package @bytelyst/diagnostics-client with:

- DiagnosticsClient: singleton with polling for active sessions

- BreadcrumbTrail: ring buffer (max 100) for timeline

- NetworkInterceptor: fetch wrapper for HTTP capture

- DeviceState: memory, storage, network collection

- 21 Vitest tests (all passing)
2026-03-03 08:35:00 -08:00
saravanakumardb1
18dd263797 feat(sdk): Push deep link routing for all platforms
- TypeScript: DeepLinkRouter with URL parsing and handler registration
- Swift: BLDeepLinkRouter with iOS URL handling and Logger integration
- Kotlin: DeepLinkRouter with Android Uri parsing and handler mapping
- Common screen constants: broadcasts, surveys, settings, profile, etc.
2026-03-03 08:33:56 -08:00
saravanakumardb1
6e0b6c33c9 test(admin-web): Add Playwright E2E tests for broadcasts and surveys
- Broadcasts: list, create, target, clone, pause/resume, metrics, delete
- Surveys: list, create with NPS/questions, conditional logic, activate/pause
- Integration: navigation, targeting, incentives, export
2026-03-03 08:31:31 -08:00
saravanakumardb1
55a1256d8b docs(swift,kotlin): Add comprehensive SDK READMEs with broadcast and survey examples
- Swift SDK README: Installation, Broadcast/Survey clients, SwiftUI integration, push notifications
- Kotlin SDK README: Gradle setup, Jetpack Compose components, FCM integration
2026-03-03 08:30:26 -08:00
saravanakumardb1
80df7c1c1e docs(packages): Add comprehensive README for broadcast-client and survey-client
- Installation, quick start, API reference
- React integration examples with hooks and providers
- Offline support documentation
- Type definitions and error handling
2026-03-03 08:29:07 -08:00
saravanakumardb1
b472f73c94 feat(platform-sdk): Phase 4.2/4.3 - iOS and Android native UI components
- BLInAppMessageUI.swift: Banner + Modal SwiftUI components
- BLSurveyUI.swift: Survey modal with all 9 question types for iOS
- BroadcastUI.kt: Banner + Modal Jetpack Compose components
- SurveyUI.kt: Survey modal with all 9 question types for Android
2026-03-03 08:20:01 -08:00
saravanakumardb1
6027d618b7 feat(kotlin-sdk): Phase 3.4 - Broadcast and Survey clients
- BLBroadcastClient.kt: In-app message fetch, read/dismiss, click tracking, polling
- BLSurveyClient.kt: Survey fetch, start/submit/complete, offline cache, polling
- Full coroutine support with Result<T> return types
2026-03-03 07:44:39 -08:00
saravanakumardb1
b96503dc2d feat(swift-sdk): Phase 3.3 - Broadcast and Survey clients
- BLBroadcastClient.swift: In-app message fetch, read/dismiss, click tracking, polling
- BLSurveyClient.swift: Survey fetch, start/submit/complete, offline cache, polling
2026-03-03 07:40:56 -08:00
saravanakumardb1
307b84c2a2 feat(packages): Phase 3.2 - Create @bytelyst/survey-client package
- package.json: ESM module config
- src/index.ts: Survey client factory with types, validation, offline cache
- tsconfig.json: TypeScript configuration

Includes offline response caching for resilience
2026-03-03 07:36:12 -08:00
saravanakumardb1
c720f1c8de feat(packages): Phase 3.1 - Create @bytelyst/broadcast-client package
- package.json: ESM module config
- src/index.ts: Broadcast client factory with types, hooks
- tsconfig.json: TypeScript configuration
2026-03-03 07:34:39 -08:00
saravanakumardb1
88fda8cf39 test(feedback): implement TODO-5 and TODO-7 - GDPR test and Azure lifecycle docs
- Add gdpr.test.ts with GDPR deletion compliance tests
- Add Azure lifecycle policy configuration section to roadmap
- Include Azure Portal, CLI, and Terraform examples
- Document 90-day TTL for GDPR compliance
2026-03-03 07:20:23 -08:00
saravanakumardb1
85d9356a19 feat(platform-sdk): implement TODO-2 and TODO-3 - Swift and Kotlin feedback clients
- Add BLFeedbackClient.swift with submitFeedback(), captureAndSubmit(), captureScreen()
- Add BLFeedbackClient.kt with FeedbackParams, DeviceContext, screenshot capture
- Include implementation instructions and error handling
- Mirror API structure between Swift and Kotlin SDKs
2026-03-03 07:18:45 -08:00
saravanakumardb1
bd19d444f1 test(feedback-client): implement TODO-4 - integration tests for screenshot flow
- Add integration tests for full SAS flow (generate SAS → upload → submit)
- Add test for feedback without screenshot
- Add upload progress tracking test
- Add unit tests for content type validation and size limits
- Skip integration tests if blob storage not configured
2026-03-03 07:11:40 -08:00
saravanakumardb1
921f21164d feat(feedback-client): implement TODO-1 - web screenshot capture
- Add ScreenshotOptions and CaptureResult interfaces
- Implement captureScreenshot() with getDisplayMedia for screen capture
- Implement captureElement() placeholder for DOM element capture
- Implement captureAndSubmit() flow
- Fix getDisplayMedia constraints (remove cursor property)
2026-03-03 07:11:07 -08:00
saravanakumardb1
b261cda1cd feat(feedback-client): Phase 2.1 - create @bytelyst/feedback-client TypeScript SDK 2026-03-03 00:03:03 -08:00
saravanakumardb1
d876bb0626 feat(blob): add feedbackScreenshots container for user feedback attachments 2026-03-02 23:54:38 -08:00
saravanakumardb1
6a23a02cd4 fix(diagnostics): BUG-4, BUG-5, BUG-7, BUG-8 - race condition, transactions, test isolation, auth validation
- BUG-4: Add optimistic concurrency control with retry to updateSessionStats
- BUG-5: Document transaction limitations in batch operations
- BUG-7: Fix test isolation with unique productIds per test run
- BUG-8: Add session ownership validation to ingest endpoints
2026-03-02 23:47:14 -08:00
saravanakumardb1
ee9d4b358d feat(cloud-agnostic): complete Sprints 4-6 — secrets consumer migration, @bytelyst/speech package, push verified 2026-03-02 09:46:24 -08:00
saravanakumardb1
faca108813 docs(sdk): fix stale route references in Swift SDK source comments and README 2026-03-02 09:17:09 -08:00
saravanakumardb1
1beb6ae7ed fix(kotlin-sdk): add /api prefix to all API paths for consistency
Normalize Kotlin SDK API paths to match Swift SDK and TypeScript SDK convention:
- BLAuthClient: /auth/* → /api/auth/*
- BLBlobClient: /blob/sas → /api/blob/sas
- BLCrashReporter: /telemetry/events → /api/telemetry/events
- BLFeatureFlagClient: /flags/poll → /api/flags/poll
- BLKillSwitchClient: /flags/kill-switch → /api/flags/kill-switch
- BLLicenseClient: /licenses/* → /api/licenses/*
- BLTelemetryClient: /telemetry/events → /api/telemetry/events

All SDKs now consistently include /api prefix in paths, with baseUrl
configured as http://host:port/api. Fixes incompatibility introduced
in recent path normalization (commit 78b942a).
2026-03-02 09:16:12 -08:00
saravanakumardb1
053190d660 fix(kotlin-sdk): add missing /api prefix to flags, kill-switch, and telemetry routes 2026-03-02 09:15:03 -08:00
saravanakumardb1
78b942a105 fix(sdk): normalize API path convention — all SDK components now include /api prefix in paths 2026-03-02 09:10:19 -08:00
saravanakumardb1
10e252617b feat(packages): fix test assertions for x-request-id header compatibility
- Update kill-switch-client and feature-flag-client tests to use
  expect.objectContaining for headers to handle x-request-id
- Move React Native SDK roadmap to completed/

Total: 44 client-side package tests passing
2026-03-02 09:08:45 -08:00
saravanakumardb1
7ca2139418 refactor(storage): migrate to storage abstraction 2026-03-02 09:07:33 -08:00
saravanakumardb1
6fe41de481 fix(datastore): SQL now emits ARRAY_CONTAINS OR CONTAINS for array+string support 2026-03-02 01:50:09 -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
dfa5eb73fa feat(packages): add cloud-agnostic abstraction packages — datastore, storage, llm, push + refactor secrets (58 tests) 2026-03-02 00:43:06 -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
1373b6dd8b feat(blob-client): scaffold @bytelyst/blob-client — browser/RN-safe blob storage via SAS URLs (12 tests) 2026-03-01 21:51:34 -08:00
saravanakumardb1
5c5a18570d fix(ts-clients): add DOM lib to browser-safe package tsconfigs (fetch/AbortController/setTimeout require DOM types) 2026-03-01 21:33:53 -08:00
saravanakumardb1
2518e1a92e fix(ts-clients): add x-request-id header to feature-flag-client and kill-switch-client 2026-03-01 21:17:38 -08:00
saravanakumardb1
f953c2b0bc fix(kotlin-sdk): thread-safety, resource leaks, URL encoding, JSON safety, deprecated API
- BLTelemetryClient/BLAuditLogger/BLCrashReporter: @Synchronized isoNow() for SimpleDateFormat thread-safety

- BLCrashReporter: replace unsafe JSON string interpolation with buildJsonObject + JsonArray

- BLBlobClient: close OkHttp Response body with .use {} to prevent resource leak

- BLFeatureFlagClient/BLKillSwitchClient: URL-encode query parameter values

- build.gradle.kts: kotlinOptions {} -> compilerOptions {} (Kotlin 2.1 convention)
2026-03-01 21:17:27 -08:00