- Copied as-is from learning_voice_ai_agent/services/platform-service - 55 tests passing (vitest) - Fastify 5 + Cosmos DB + jose + bcryptjs + Zod - Modules: auth, audit, flags, notifications, blob, ratelimit - Port 4003 |
||
|---|---|---|
| docs | ||
| packages | ||
| services/platform-service | ||
| .editorconfig | ||
| .gitignore | ||
| .nvmrc | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| tsconfig.base.json | ||
| vitest.config.ts | ||
@bytelyst/common-platform
Shared packages for the ByteLyst ecosystem — used by LysnrAI and MindLyst.
Packages
| Package | Description | Peer Dependencies |
|---|---|---|
@bytelyst/errors |
Typed HTTP service errors (400–429) | — |
@bytelyst/cosmos |
Azure Cosmos DB client singleton + container registry | @azure/cosmos |
@bytelyst/config |
Zod-based env config loader + product identity | zod |
@bytelyst/auth |
JWT utilities, auth middleware, password hashing | jose, bcryptjs |
@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) | — |
Quick Start
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run all tests
pnpm test
# Type-check all packages
pnpm typecheck
Consuming from LysnrAI / MindLyst
During development, use file: references in consumer package.json:
// From Fastify services (3 levels up):
"@bytelyst/errors": "file:../../../learning_ai_common_plat/packages/errors"
// From Next.js dashboards 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.
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 constantsMindLystTokens.kt— Kotlin object for KMPMindLystTheme.swift— Swift structs for SwiftUI
Roadmap
See docs/ROADMAP.md for the full phased extraction plan.