Go to file
saravanakumardb1 cf8781cc11 feat(react-auth): add @bytelyst/react-auth package
- createAuthProvider<TUser>() factory returns typed AuthProvider + useAuth hook
- Configurable storagePrefix, loginEndpoint, mapLoginResponse, onLogout
- localStorage persistence for user, access token, refresh token
- Uses @bytelyst/api-client for login requests
- Replaces 3 duplicated auth-context.tsx files across LysnrAI dashboards
- Peer dep: react >=18.0.0, workspace dep: @bytelyst/api-client
2026-02-12 11:22:41 -08:00
docs docs(roadmap): address 15 gaps found via codebase cross-reference 2026-02-12 10:55:03 -08:00
packages feat(react-auth): add @bytelyst/react-auth package 2026-02-12 11:22:41 -08:00
.editorconfig chore(scaffold): initialize pnpm workspace with build tooling 2026-02-12 11:19:29 -08:00
.gitignore chore(scaffold): initialize pnpm workspace with build tooling 2026-02-12 11:19:29 -08:00
.nvmrc chore(scaffold): initialize pnpm workspace with build tooling 2026-02-12 11:19:29 -08:00
package.json chore(scaffold): initialize pnpm workspace with build tooling 2026-02-12 11:19:29 -08:00
pnpm-workspace.yaml chore(scaffold): initialize pnpm workspace with build tooling 2026-02-12 11:19:29 -08:00
README.md chore(scaffold): initialize pnpm workspace with build tooling 2026-02-12 11:19:29 -08:00
tsconfig.base.json chore(scaffold): initialize pnpm workspace with build tooling 2026-02-12 11:19:29 -08:00
vitest.config.ts chore(scaffold): initialize pnpm workspace with build tooling 2026-02-12 11:19:29 -08:00

@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 (400429)
@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 constants
  • MindLystTokens.kt — Kotlin object for KMP
  • MindLystTheme.swift — Swift structs for SwiftUI

Roadmap

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