Go to file
saravanakumardb1 b4be39888b fix(swift-sdk): remove productId prefix from BLAuthClient keychain keys
BLAuthClient stored tokens as '{productId}_access_token' but all app
wrappers use KeychainHelper.read(key: "access_token") — the bare key.
This caused a critical mismatch: after login, BlobService/LicenseService
could not find the token, and token migration from UserDefaults was invisible
to BLAuthClient.isAuthenticated.

The Keychain service name (bundleId) already namespaces per product,
making the productId prefix redundant. Now uses bare 'access_token' and
'refresh_token' keys matching existing app conventions.
2026-02-28 22:54:01 -08:00
__LOCAL_LLMs docs: add 19 reusable AI coding agent skills + sessions module scaffold 2026-02-28 02:41:22 -08:00
.changeset chore(release): add changesets 2026-02-14 19:49:08 -08:00
.github docs(agent-docs): update platform service and copilot references 2026-02-19 08:22:09 -08:00
.husky chore(husky): run hooks from repo root and avoid npx 2026-02-14 12:55:41 -08:00
.windsurf/workflows chore: add learning_ai_clock + learning_ai_fastgap to all repo workflows (backup, push, sync) 2026-02-28 12:54:56 -08:00
AI.dev/SKILLS fix: update .env.example comments, Grafana dashboard, and debug-service.md for consolidated services 2026-02-14 22:01:55 -08:00
dashboards feat(admin-dashboard): add edge middleware for API route auth gating 2026-02-28 20:25:42 -08:00
docs docs: add platform acceleration implementation roadmap with phased task lists 2026-02-28 21:37:19 -08:00
packages fix(swift-sdk): remove productId prefix from BLAuthClient keychain keys 2026-02-28 22:54:01 -08:00
scripts chore: add learning_ai_clock + learning_ai_fastgap to all repo workflows (backup, push, sync) 2026-02-28 12:54:56 -08:00
services feat(platform-service): add brains, daily-briefs, reflections, streaks modules 2026-02-28 20:24:06 -08:00
.aider.conf.yml fix(common): configure ESLint 9 and fix lint issues 2026-02-12 16:37:30 -08:00
.clinerules docs: update agent docs — add missing packages, fix stale service refs, update test counts 2026-02-15 01:09:29 -08:00
.cursorrules docs: update agent docs — add missing packages, fix stale service refs, update test counts 2026-02-15 01:09:29 -08:00
.editorconfig chore(scaffold): initialize pnpm workspace with build tooling 2026-02-12 11:19:29 -08:00
.env.example test(waitlist): add 45 unit tests + update doc checkboxes with commit links 2026-02-16 22:49:42 -08:00
.gitattributes fix(local-llms): harden WSL setup and dashboard Ollama connectivity 2026-02-22 16:44:58 -08:00
.gitignore ci: update CI/CD configuration 2026-02-21 14:13:07 -08:00
.nvmrc chore(scaffold): initialize pnpm workspace with build tooling 2026-02-12 11:19:29 -08:00
.prettierrc feat: add quick wins - prettier, bundle limits, coverage 2026-02-12 15:54:06 -08:00
.windsurfrules docs: update agent docs — add missing packages, fix stale service refs, update test counts 2026-02-15 01:09:29 -08:00
AGENTS.md docs: add portable Docker/CI build instructions (prep-consumer.sh) 2026-02-28 13:17:03 -08:00
CLAUDE.md fix(common): configure ESLint 9 and fix lint issues 2026-02-12 16:37:30 -08:00
docker-compose.yml refactor: remove growth/billing/tracker from common-plat docker-compose, update Traefik labels 2026-02-14 21:40:09 -08:00
eslint.config.js feat(packages): add @bytelyst/auth-client + telemetry-client, extend react-auth lifecycle 2026-02-28 04:49:46 -08:00
MANUAL_CI.md docs: fix stale references to consolidated services and migrated dashboards 2026-02-28 03:06:44 -08:00
package.json chore: add extraction-service to AGENTS.md, CI matrix, token pre-commit hook (7.9) 2026-02-14 20:48:07 -08:00
pnpm-lock.yaml refactor(dashboards): wire @bytelyst/telemetry-client into admin-web + tracker-web, add onInit + baseUrl to react-auth 2026-02-28 11:27:57 -08:00
pnpm-workspace.yaml feat(dashboards): migrate admin + tracker dashboards to common-plat as product-agnostic 2026-02-28 02:17:35 -08:00
quick-check.sh ci: disable GitHub Actions and add manual quality checks 2026-02-12 23:13:07 -08:00
README.md docs: add portable Docker/CI build instructions (prep-consumer.sh) 2026-02-28 13:17:03 -08:00
tsconfig.base.json chore(scaffold): initialize pnpm workspace with build tooling 2026-02-12 11:19:29 -08:00
vitest.config.ts fix(common): configure ESLint 9 and fix lint issues 2026-02-12 16:37:30 -08:00

ByteLyst Common Platform

Shared packages and microservices for ByteLyst ecosystem products.

⚠️ GitHub Actions Temporarily Disabled

CI/CD is currently disabled due to billing issues. Please run manual quality checks before merging:

  • See MANUAL_CI.md for instructions
  • Use .windsurf/workflows/production-readiness.md for comprehensive checks

Quick Start

# Install dependencies
pnpm install

# Build all packages + services
pnpm build

# Quick quality check (5 min) - run before pushing!
./quick-check.sh

# Run all tests (165 total across packages + services)
pnpm test

# Type-check all packages
pnpm typecheck

# Run a specific service in dev mode
pnpm --filter @lysnrai/platform-service dev

Repository Structure

learning_ai_common_plat/
├── packages/                    # Shared libraries (@bytelyst/*)
│   ├── errors/                  # Typed HTTP service errors (400429)
│   ├── cosmos/                  # Azure Cosmos DB client + container registry
│   ├── config/                  # Zod env loader + product identity
│   ├── auth/                    # JWT, middleware, password hashing
│   ├── api-client/              # Configurable fetch wrapper
│   ├── react-auth/              # React auth context factory
│   └── design-tokens/           # Cross-platform tokens (JSON → CSS/TS/Kotlin/Swift)
├── dashboards/                  # Product-agnostic web dashboards (Next.js)
│   ├── admin-web/               # Platform admin console (port 3001)
│   └── tracker-web/             # Issue tracker + public roadmap (port 3003)
├── services/                    # Product-agnostic microservices
│   ├── platform-service/        # Consolidated: auth, audit, flags, billing, growth, tracker (port 4003)
│   ├── extraction-service/      # LangExtract text extraction + Python sidecar (port 4005)
│   └── monitoring/              # Loki + Grafana config, health-check
└── docs/                        # Architecture docs, roadmap, analysis

Shared Libraries

Package Description Peer Dependencies
@bytelyst/errors Typed HTTP service errors (400429)
@bytelyst/logger Structured logger factory for services/dashboards
@bytelyst/cosmos Azure Cosmos DB client singleton + container registry @azure/cosmos
@bytelyst/blob Azure Blob Storage helpers + SAS URL generation @azure/storage-blob
@bytelyst/config Zod-based env config loader + product identity zod
@bytelyst/auth JWT utilities, auth middleware, password hashing jose, bcryptjs
@bytelyst/fastify-core Fastify service bootstrap (request-id, /health, errors) fastify
@bytelyst/api-client Configurable fetch wrapper with auth token injection
@bytelyst/react-auth React auth context factory (typed provider + hook) react
@bytelyst/design-tokens Cross-platform design tokens (JSON → CSS/TS/Kotlin/Swift)
@bytelyst/extraction Extraction service client + shared types @bytelyst/api-client
@bytelyst/testing Shared test helpers (Fastify inject, schema asserts) vitest
@bytelyst/monitoring Health-check aggregation utilities

Shared Services

Service Port Description Tests
platform-service 4003 Consolidated: auth, audit, flags, billing, growth, tracker, telemetry, etc. 1,029
extraction-service 4005 LangExtract text extraction + Python sidecar 46
monitoring Loki + Grafana dashboards, health-check script

Note: billing-service (4002), growth-service (4001), and tracker-service (4004) were consolidated into platform-service (Feb 2026).

All services are product-agnostic — every Cosmos document includes a productId field, so a single deployment serves LysnrAI, MindLyst, or any future product.

Quick Start

# Install dependencies
pnpm install

# Build all packages + services
pnpm build

# Quick quality check (5 min) - run before pushing!
./quick-check.sh

# Run all tests (165 total across packages + services)
pnpm test

# Type-check all packages
pnpm typecheck

# Run a specific service in dev mode
pnpm --filter @lysnrai/platform-service dev

Consuming Libraries from Product Repos

During development, use file: references in consumer package.json:

// From a Next.js dashboard at repo root (2 levels up):
"@bytelyst/errors": "file:../../learning_ai_common_plat/packages/errors"

// From MindLyst web (3 levels up — inside mindlyst-native/web/):
"@bytelyst/design-tokens": "file:../../../learning_ai_common_plat/packages/design-tokens"

All repos must be cloned side-by-side under the same parent directory.

Portable Builds (Docker / CI)

file: refs break in Docker and CI because the sibling repo isn't available at the expected relative path. Use the tarball prep workflow to make builds self-contained:

# 1. Build all @bytelyst/* packages
pnpm build

# 2. Pack tarballs + rewrite a consumer's package.json
#    (run from the consumer repo)
../learning_ai_common_plat/scripts/prep-consumer.sh <target-dir>

# 3. Build (Docker, EAS, CI — no sibling repo access needed)
docker build <target-dir>

# 4. Restore original package.json
../learning_ai_common_plat/scripts/prep-consumer.sh <target-dir> --restore

Each consumer repo has a convenience wrapper: scripts/docker-prep.sh (or scripts/docker-prep-dashboards.sh in LysnrAI).

Consumer Repo Wrapper Script Targets
learning_voice_ai_agent scripts/docker-prep-dashboards.sh user-dashboard-web
learning_ai_clock scripts/docker-prep.sh web
learning_ai_fastgap scripts/docker-prep.sh root package.json
learning_multimodal_memory_agents scripts/docker-prep.sh mindlyst-native/web

Dashboards inside this repo (dashboards/admin-web, dashboards/tracker-web) use workspace:* refs and do NOT need this workflow — pnpm resolves them automatically.

Design Tokens

Generate platform-specific token files from the canonical JSON:

cd packages/design-tokens
pnpm generate

Outputs in packages/design-tokens/generated/:

  • tokens.css — CSS custom properties (--ml-*)
  • tokens.ts — TypeScript constants
  • MindLystTokens.kt — Kotlin object for KMP
  • MindLystTheme.swift — Swift structs for SwiftUI

Roadmap

See docs/ROADMAP.md for the full phased extraction plan.