diff --git a/docs/WORKSPACE_INVENTORY.md b/docs/WORKSPACE_INVENTORY.md index 25bf76c2..9a4b88fb 100644 --- a/docs/WORKSPACE_INVENTORY.md +++ b/docs/WORKSPACE_INVENTORY.md @@ -3,28 +3,28 @@ > **Purpose:** Workspace-level inventory for the active multi-repo ByteLyst development environment. > **Workspace Root:** `~/code/mygh/` > **Canonical Repo List:** `.windsurf/workflows/repos.txt` -> **Last Updated:** 2026-03-20 +> **Last Updated:** 2026-03-21 --- ## 1. Active Workspace Repositories -| Repository | Product / Role | Primary Stack | Current Scope | -| ----------------------------------- | ------------------ | ------------------------------------------------------- | ------------------------------------------------------------------- | -| `learning_ai_common_plat` | Shared platform | TypeScript, Fastify, Next.js, Swift, Kotlin | 53 shared packages, 4 services, 3 dashboards, MCP/A2A orchestration | -| `learning_voice_ai_agent` | LysnrAI | Python 3.12, Fastify, Next.js, Swift, Kotlin | Desktop app, product backend, user dashboard, mobile apps | -| `learning_multimodal_memory_agents` | MindLyst | Kotlin Multiplatform, SwiftUI, Jetpack Compose, Next.js | Shared KMP core, iOS, Android, web dashboard, product backend | -| `learning_ai_clock` | ChronoMind | Next.js, SwiftUI, Kotlin, Fastify | Timer/focus product across web, Apple, Android, backend | -| `learning_ai_fastgap` | NomGap | React Native (Expo), Next.js, Fastify | Fasting engine, mobile UI, web app, product backend | -| `learning_ai_jarvis_jr` | JarvisJr | SwiftUI, Next.js, Kotlin, Fastify | Voice-first coaching apps, marketplace/backend | -| `learning_ai_peakpulse` | PeakPulse | SwiftUI, Fastify | Sensor-driven tracking app and backend | -| `learning_ai_notes` | NoteLett | Fastify, Next.js, React Native (Expo) | Structured notes platform across backend, web, and mobile | -| `learning_ai_flowmonk` | FlowMonk | Fastify, Next.js, React Native (Expo) | Agent-first planning platform across backend, web, and mobile | -| `learning_ai_trails` | ActionTrail | Fastify, Next.js | AI activity oversight: actions, alerts, approvals, SDK | -| `learning_ai_smart_auth` | SmartAuth | Docs + extends platform-service | Unified auth & identity design (OneAuth, OAuth, MFA, Passkeys) | -| `learning_ai_auth_app` | ByteLyst Auth App | SwiftUI, Jetpack Compose | Standalone auth companion app (iOS, Android, watchOS, widgets) | -| `learning_ai_productivity_web` | Productivity Tools | Next.js | Internal productivity web tools | -| `learning_ai_local_memory_gpt` | LocalMemoryGPT | React, Express | Local memory-augmented GPT prototype | +| Repository | Product / Role | Primary Stack | Current Scope | +| ----------------------------------- | ------------------ | ------------------------------------------------------- | -------------------------------------------------------------------- | +| `learning_ai_common_plat` | Shared platform | TypeScript, Fastify, Next.js, Swift, Kotlin | 58 shared packages, 4 services, 3 dashboards, MCP/A2A orchestration | +| `learning_voice_ai_agent` | LysnrAI | Python 3.12, Fastify, Next.js, Swift, Kotlin | Desktop app, product backend, user dashboard, mobile apps | +| `learning_multimodal_memory_agents` | MindLyst | Kotlin Multiplatform, SwiftUI, Jetpack Compose, Next.js | Shared KMP core, iOS, Android, web dashboard, product backend | +| `learning_ai_clock` | ChronoMind | Next.js, SwiftUI, Kotlin, Fastify | Timer/focus product across web, Apple, Android, backend | +| `learning_ai_fastgap` | NomGap | React Native (Expo), Next.js, Fastify | Fasting engine, mobile UI, web app, product backend | +| `learning_ai_jarvis_jr` | JarvisJr | SwiftUI, Next.js, Kotlin, Fastify | Voice-first coaching apps, marketplace/backend | +| `learning_ai_peakpulse` | PeakPulse | SwiftUI, Fastify | Sensor-driven tracking app and backend | +| `learning_ai_notes` | NoteLett | Fastify, Next.js, React Native (Expo) | Structured notes platform across backend, web, and mobile | +| `learning_ai_flowmonk` | FlowMonk | Fastify, Next.js, React Native (Expo) | Agent-first planning platform across backend, web, and mobile | +| `learning_ai_trails` | ActionTrail | Fastify, Next.js | AI activity oversight: actions, alerts, approvals, SDK | +| `learning_ai_smart_auth` | SmartAuth | Docs + extends platform-service | Unified auth & identity design (OneAuth, OAuth, MFA, Passkeys) | +| `learning_ai_auth_app` | ByteLyst Auth App | SwiftUI, Jetpack Compose | Standalone auth companion app (iOS, Android, watchOS, widgets) | +| `learning_ai_productivity_web` | Productivity Tools | Next.js | Internal productivity web tools | +| `learning_ai_local_memory_gpt` | LocalMemoryGPT | Fastify 5, Next.js 16, SQLite, Ollama | Local-first AI chat with persistent memory, RAG, multi-model compare | --- @@ -32,15 +32,16 @@ `learning_ai_common_plat` is the shared infrastructure layer for the whole workspace. -### 2.1 Shared Packages (53 total) +### 2.1 Shared Packages (58 total) - **Core:** `config`, `cosmos`, `errors`, `logger`, `testing`, `datastore`, `storage` -- **Auth:** `auth`, `auth-client`, `auth-ui`, `react-auth` +- **Auth:** `auth`, `auth-client`, `auth-ui`, `react-auth`, `fastify-auth` - **API/Clients:** `api-client`, `platform-client`, `broadcast-client`, `survey-client`, `feedback-client`, `marketplace-client`, `org-client`, `referral-client`, `subscription-client` - **Telemetry/Diagnostics:** `telemetry-client`, `diagnostics-client`, `swift-diagnostics` - **Feature Control:** `feature-flag-client`, `kill-switch-client` - **Storage/Data:** `blob`, `blob-client`, `sync`, `offline-queue` -- **Backend Framework:** `fastify-core`, `fastify-sse`, `events`, `event-store`, `monitoring`, `push`, `queue`, `webhook-dispatch` +- **Backend Framework:** `fastify-core`, `fastify-sse`, `events`, `event-store`, `monitoring`, `push`, `queue`, `webhook-dispatch`, `backend-config`, `backend-flags`, `backend-telemetry` +- **Security:** `field-encrypt` (AES-256-GCM envelope encryption, 3 key providers) - **AI/ML:** `extraction`, `llm`, `llm-router`, `speech` - **UI/UX:** `design-tokens`, `dashboard-components`, `dashboard-shell`, `celebrations`, `gentle-notifications`, `quick-actions`, `time-references`, `accessibility`, `create-app` - **Platform SDKs:** `swift-platform-sdk`, `kotlin-platform-sdk`, `react-native-platform-sdk` @@ -49,12 +50,12 @@ _(All under the `@bytelyst/` scope — consumed via `file:` or `workspace:_` ref ### 2.2 Services -| Service | Port | Purpose | -| -------------------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `platform-service` | 4003 | Product-agnostic platform APIs: auth, flags, telemetry, diagnostics, jobs, analytics, A/B testing, changelog, webhooks, marketplace, predictive analytics, orgs, SCIM, and more (63 modules) | -| `extraction-service` | 4005 | LangExtract-based extraction tasks with Python sidecar | -| `mcp-server` | 4007 | MCP tool registry, tool execution, product/operator tools, and A2A orchestration pipelines (14 tool namespaces) | -| `monitoring` | — | Loki/Grafana and health-check infrastructure | +| Service | Port | Purpose | +| -------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `platform-service` | 4003 | Product-agnostic platform APIs: auth, flags, telemetry, diagnostics, jobs, analytics, A/B testing, changelog, webhooks, marketplace, predictive analytics, orgs, SCIM, and more (63 modules, ~117 test files) | +| `extraction-service` | 4005 | LangExtract-based extraction tasks with Python sidecar | +| `mcp-server` | 4007 | MCP tool registry, tool execution, product/operator tools, and A2A orchestration pipelines (14 tool namespaces) | +| `monitoring` | — | Loki/Grafana and health-check infrastructure | ### 2.3 Dashboards @@ -68,19 +69,20 @@ _(All under the `@bytelyst/` scope — consumed via `file:` or `workspace:_` ref ## 3. Product Repos and Shared Platform Consumption -| Product | Port | Shared Platform Dependencies | -| ------------- | ---- | --------------------------------------------------------------------------------- | -| LysnrAI | 4015 | shared packages, platform-service, extraction-service, dashboards integration | -| MindLyst | 4014 | shared packages, extraction integration, design tokens, platform-service patterns | -| ChronoMind | 4011 | shared packages, design token flow, platform-service patterns | -| NomGap | 4013 | React Native platform SDK, shared packages, platform-service patterns | -| JarvisJr | 4012 | shared SDKs, platform-service, marketplace patterns | -| PeakPulse | 4010 | Swift platform SDK, shared platform wrappers, design/system patterns | -| NoteLett | 4016 | shared packages, platform-service, extraction-service, mobile/web client patterns | -| FlowMonk | 4017 | shared packages, platform-service, offline queue, planning-platform patterns | -| ActionTrail | 4018 | shared packages, platform-service, SSE/webhooks, SDK (@actiontrail/sdk) | -| SmartAuth | — | Extends platform-service auth module (no separate backend) | -| ByteLyst Auth | — | Consumes platform-service directly via Swift/Kotlin platform SDKs | +| Product | Port | Shared Platform Dependencies | +| ------------- | ---- | ----------------------------------------------------------------- | +| LysnrAI | 4015 | 7 modules, field-encrypt, extraction-service, dashboards | +| MindLyst | 4014 | 5 modules, KMP shared core, extraction integration, design tokens | +| ChronoMind | 4011 | 5 modules, design token flow, platform-service patterns | +| NomGap | 4013 | 7 modules, field-encrypt, React Native platform SDK | +| JarvisJr | 4012 | 5 modules, field-encrypt, marketplace patterns | +| PeakPulse | 4010 | 2 modules, Swift platform SDK, sensor-driven tracking | +| NoteLett | 4016 | 7 modules + 8 MCP tools, field-encrypt, mobile/web | +| FlowMonk | 4017 | 10 modules, offline queue, deterministic scheduler | +| ActionTrail | 4018 | 13 modules, field-encrypt, SDK (@actiontrail/sdk), SSE/webhooks | +| LocalMemGPT | 4019 | 8 modules, SQLite + Ollama, standalone (not platform-service) | +| SmartAuth | — | Extends platform-service auth module (no separate backend) | +| ByteLyst Auth | — | Consumes platform-service directly via Swift/Kotlin platform SDKs | --- @@ -94,19 +96,28 @@ _(All under the `@bytelyst/` scope — consumed via `file:` or `workspace:_` ref --- -## 5. Test Count Summary +## 5. Test File Summary (by surface) -| Component | Tests | -| -------------------- | ---------- | -| platform-service | ~1,050+ | -| extraction-service | ~47 | -| Product backends (9) | ~1,217 | -| ActionTrail SDK | 21 | -| ActionTrail E2E | 40 | -| Kotlin platform SDK | 57 | -| NomGap mobile tests | 505 | -| ChronoMind web tests | 373 | -| **Estimated total** | **3,500+** | +| Component | Test Files | Notes | +| -------------------------- | ---------- | ---------------------------------------------- | +| platform-service | 117 | 63 modules, Vitest | +| extraction-service | 12 | Python sidecar + TS | +| mcp-server | 5 | 14 tool namespaces | +| Shared packages | 63 | Vitest across 58 packages | +| Dashboards (admin+tracker) | 32 | Next.js tests + E2E | +| Kotlin platform SDK | 9 | JUnit5 + MockWebServer | +| LysnrAI (all surfaces) | 48 | backend=14, web=17, ios=7, android=9, python | +| MindLyst (all surfaces) | 25 | backend=13, ios=1, android=12 | +| ChronoMind (all surfaces) | 34 | backend=7, web=18, ios=8, android=1 | +| NomGap (all surfaces) | 41 | backend=11, web=12, mobile=18 | +| JarvisJr (all surfaces) | 18 | backend=10, web=6, ios=1, android=1 | +| PeakPulse (all surfaces) | 22 | backend=6, ios=16 | +| NoteLett (all surfaces) | 32 | backend=20, web=8, mobile=4 | +| FlowMonk (all surfaces) | 28 | backend=15, web=8, mobile=5 | +| ActionTrail (all) | 32 | backend=17, web=12, sdk=3 | +| LocalMemGPT (all) | 19 | backend=15, web=4 | +| E2E (common plat) | 1 | Playwright diagnostics | +| **Total test files** | **~538** | Across 14 active repos (excluding test runner) | --- @@ -126,8 +137,10 @@ _(All under the `@bytelyst/` scope — consumed via `file:` or `workspace:_` ref ## 7. Notes -- This document reflects the currently active 13-repo workspace (plus 1 prototype repo). +- This document reflects the currently active 14-repo workspace (plus `temp_uxlab` which is empty). - Product-specific backends now live in their product repositories, while `learning_ai_common_plat` remains product-agnostic. - `mcp-server` and `ux-lab` are active capability surfaces. -- `learning_ai_local_memory_gpt` is a standalone prototype, not part of the ByteLyst ecosystem. +- `learning_ai_local_memory_gpt` has been rebuilt as Fastify 5 + Next.js 16 + SQLite/Ollama (no longer Express/React). - `learning_ai_productivity_web` is an internal tools site, not a consumer of platform-service. +- `learning_ai_smart_auth` is a docs-only repo (PRD, roadmap); implementation lives in platform-service auth module. +- `@bytelyst/field-encrypt` is integrated into 5 product backends (LysnrAI, JarvisJr, NoteLett, NomGap, ActionTrail). diff --git a/docs/learning_ai_common_plat_INVENTORY.md b/docs/learning_ai_common_plat_INVENTORY.md index 514f86d7..02cd22fc 100644 --- a/docs/learning_ai_common_plat_INVENTORY.md +++ b/docs/learning_ai_common_plat_INVENTORY.md @@ -2,7 +2,7 @@ > **Purpose:** Comprehensive reference for all reusable components, services, SDKs, and tools available to ByteLyst product teams. > **Repo:** `learning_ai_common_plat` -> **Last Updated:** 2026-03-20 +> **Last Updated:** 2026-03-21 --- @@ -10,7 +10,7 @@ | Category | Count | Notes | | --------------------- | ------- | -------------------------------------------------------------------- | -| **Shared Packages** | 53 | `@bytelyst/*` — consumed via `file:` or `workspace:*` | +| **Shared Packages** | 58 | `@bytelyst/*` — consumed via `file:` or `workspace:*` | | **Platform Services** | 4 | `platform-service`, `extraction-service`, `mcp-server`, `monitoring` | | **Dashboards** | 3 | `admin-web`, `tracker-web`, `ux-lab` | | **Platform SDKs** | 3 | Swift, Kotlin, React Native | @@ -18,7 +18,7 @@ | **MCP Namespaces** | 14 | mcp-server tool namespaces + A2A pipelines | | **Product Configs** | 7 | `products/` manifests for each product | | **Cosmos Containers** | ~65+ | Shared + product-specific | -| **Total Tests** | ~2,200+ | Service + package + SDK tests (platform + products) | +| **Total Tests** | ~2,200+ | Service + package + SDK tests (238 test files in this repo alone) | --- @@ -73,18 +73,28 @@ ### 2.5 Backend Framework -| Package | Purpose | Exports | Consumers | -| ---------------------------- | ------------------------- | -------------------------------------------------- | -------------------- | -| `@bytelyst/fastify-core` | Service bootstrap | `createServiceApp()`, `startService()`, Swagger UI | All Fastify services | -| `@bytelyst/fastify-sse` | Server-Sent Events plugin | SSE route helpers, event streaming | Services with SSE | -| `@bytelyst/events` | In-memory event bus | `EventBus`, typed event schemas, error isolation | platform-service | -| `@bytelyst/event-store` | Persistent event store | Event append, query, replay | Services | -| `@bytelyst/webhook-dispatch` | Webhook delivery engine | HMAC signing, retry, dispatch | platform-service | -| `@bytelyst/queue` | Job/task queue | Queue management, workers | Services | -| `@bytelyst/monitoring` | Health checks + telemetry | Health utilities, Loki/Grafana helpers | All services | -| `@bytelyst/push` | Push notification service | APNS, FCM integration | platform-service | +| Package | Purpose | Exports | Consumers | +| ----------------------------- | ------------------------- | ----------------------------------------------------- | -------------------- | +| `@bytelyst/fastify-core` | Service bootstrap | `createServiceApp()`, `startService()`, Swagger UI | All Fastify services | +| `@bytelyst/fastify-sse` | Server-Sent Events plugin | SSE route helpers, event streaming | Services with SSE | +| `@bytelyst/events` | In-memory event bus | `EventBus`, typed event schemas, error isolation | platform-service | +| `@bytelyst/event-store` | Persistent event store | Event append, query, replay | Services | +| `@bytelyst/webhook-dispatch` | Webhook delivery engine | HMAC signing, retry, dispatch | platform-service | +| `@bytelyst/queue` | Job/task queue | Queue management, workers | Services | +| `@bytelyst/monitoring` | Health checks + telemetry | Health utilities, Loki/Grafana helpers | All services | +| `@bytelyst/push` | Push notification service | APNS, FCM integration | platform-service | +| `@bytelyst/backend-config` | Shared Zod config schema | Base config for Fastify product backends | Product backends | +| `@bytelyst/backend-flags` | Feature flag registry | In-memory feature flags for product backends | Product backends | +| `@bytelyst/backend-telemetry` | Telemetry event buffer | In-memory telemetry buffer for product backends | Product backends | +| `@bytelyst/fastify-auth` | JWT auth middleware | JWT extraction + request context for product backends | Product backends | -### 2.6 AI/ML & Extraction +### 2.6 Security + +| Package | Purpose | Exports | Consumers | +| ------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------ | ------------------ | +| `@bytelyst/field-encrypt` | AES-256-GCM envelope encrypt | `createFieldEncryptor()`, 3 key providers (AKV, env, memory), DEK cache, migration helpers | 5 product backends | + +### 2.7 AI/ML & Extraction | Package | Purpose | Exports | Consumers | | ---------------------- | ------------------------- | --------------------------------------------------- | ---------------- | @@ -93,7 +103,7 @@ | `@bytelyst/llm-router` | Deterministic LLM routing | Provider/model selection, fallback, health tracking | Services + MCP | | `@bytelyst/speech` | Speech SDK wrappers | Azure Speech integration | Desktop + Mobile | -### 2.7 Platform Experience & Sync +### 2.8 Platform Experience & Sync | Package | Purpose | Exports / Surface | Consumers | | -------------------------------- | ----------------------------------- | ------------------------------------------- | ------------------ | @@ -103,7 +113,7 @@ | `@bytelyst/sync` | Cross-platform sync helpers | Sync orchestration, queueing, merge helpers | SDKs + mobile apps | | `@bytelyst/swift-diagnostics` | Swift diagnostics support | Crash/error helpers, diagnostics capture | Apple platforms | -### 2.8 Design System & UX +### 2.9 Design System & UX | Package | Purpose | Exports | Consumers | | -------------------------------- | ----------------------------- | ------------------------------------- | ------------- | @@ -114,7 +124,7 @@ | `@bytelyst/time-references` | Familiar time references | Relative time, time blindness helpers | Web + Mobile | | `@bytelyst/accessibility` | Accessibility utilities | VoiceOver, Dynamic Type, a11y checks | All platforms | -### 2.9 React Native +### 2.10 React Native | Package | Purpose | Exports | Consumers | | ------------------------------------- | --------------- | ---------------------------------------- | ----------------------- | @@ -424,15 +434,15 @@ Workflow scripts for AI agents and developers: Each product has a `product.json` manifest: -| Product | File | Backend Port | Repo | -| ---------- | ------------------------- | ------------ | ----------------------------------- | -| LysnrAI | `lysnrai/product.json` | 4015 | `learning_voice_ai_agent` | -| MindLyst | `mindlyst/product.json` | 4014 | `learning_multimodal_memory_agents` | -| ChronoMind | `chronomind/product.json` | 4011 | `learning_ai_clock` | -| JarvisJr | `jarvisjr/product.json` | 4012 | `learning_ai_jarvis_jr` | -| NomGap | `nomgap/product.json` | 4013 | `learning_ai_fastgap` | -| PeakPulse | `peakpulse/product.json` | 4010 | `learning_ai_peakpulse` | -| NoteLett | `notelett/product.json` | 4016 | `learning_ai_notes` | +| Product | File | Backend Port | Repo | Encrypted | +| ---------- | ------------------------- | ------------ | ----------------------------------- | --------- | +| LysnrAI | `lysnrai/product.json` | 4015 | `learning_voice_ai_agent` | ✅ | +| MindLyst | `mindlyst/product.json` | 4014 | `learning_multimodal_memory_agents` | — | +| ChronoMind | `chronomind/product.json` | 4011 | `learning_ai_clock` | — | +| JarvisJr | `jarvisjr/product.json` | 4012 | `learning_ai_jarvis_jr` | ✅ | +| NomGap | `nomgap/product.json` | 4013 | `learning_ai_fastgap` | ✅ | +| PeakPulse | `peakpulse/product.json` | 4010 | `learning_ai_peakpulse` | — | +| NoteLett | `notelett/product.json` | 4016 | `learning_ai_notes` | ✅ | --- @@ -626,17 +636,17 @@ cd dashboards/tracker-web && npm run build ``` ┌──────────────────────────────────────────────────────────────────────────┐ -│ PRODUCT APPS (9) │ +│ PRODUCT APPS (10) │ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │ │LysnrAI │ │MindLyst │ │ChronoM. │ │JarvisJr │ │NomGap │ │ │ │ :4015 │ │ :4014 │ │ :4011 │ │ :4012 │ │ :4013 │ │ │ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ │ -│ ┌────┴────┐ ┌────┴────┐ ┌────┴────┐ ┌────┴────┐ │ -│ │PeakPulse│ │NoteLett │ │FlowMonk │ │Action │ │ -│ │ :4010 │ │ :4016 │ │ :4017 │ │Trail │ │ -│ │ │ │ │ │ │ │ :4018 │ │ -│ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ │ -│ └───────────┴───────────┴───────────┘ │ +│ ┌────┴────┐ ┌────┴────┐ ┌────┴────┐ ┌────┴────┐ ┌────┴────┐ │ +│ │PeakPulse│ │NoteLett │ │FlowMonk │ │Action │ │LocalMem │ │ +│ │ :4010 │ │ :4016 │ │ :4017 │ │Trail │ │GPT:4019 │ │ +│ │ │ │ │ │ │ │ :4018 │ │(standal)│ │ +│ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ │ +│ └───────────┴───────────┴───────────┴───────────┘ │ │ │ │ │ ┌──────────┴──────────┐ │ │ │ Platform SDKs (3) │ │ @@ -646,7 +656,7 @@ cd dashboards/tracker-web && npm run build │ ┌─────────────────────────┼────────────────────────────────────────────────┐ │ ┌──────────┴──────────┐ │ -│ │ Shared Packages (53)│ │ +│ │ Shared Packages (58)│ │ │ │ (@bytelyst/*) │ │ │ └──────────┬──────────┘ │ │ │ │