docs: update Platform Acceleration Roadmap — Phases 1-3 complete, move to in-progress
Verified all task status against actual code: - Phase 1: product-manifest (51 tests), dashboard-components (32 tests), sync engine (31 tests), module generator — all built - Phase 2: create-app CLI (26 tests), auth-ui (54 tests), API route generator, AGENTS.md auto-gen — all built - Phase 3: Swift SDK (30 tests/7 files), Kotlin SDK (64 tests/9 files), dashboard-shell (41 tests), declarative YAML loader (34 tests) — all built - Phase 4: not started (5 tasks remaining) Total: 299 tests across acceleration packages Remaining integration work (unchecked): - Migrate dashboards to consume @bytelyst/dashboard-components - Migrate ChronoMind to @bytelyst/sync - Migrate product auth pages to @bytelyst/auth-ui - Migrate user-dashboard to @bytelyst/dashboard-shell - Migrate ChronoMind iOS/Android to platform SDKs - Migrate changelog to declarative YAML - Publish create-app to npm
This commit is contained in:
parent
f56672508a
commit
af88c4a0b3
@ -4,7 +4,16 @@
|
||||
>
|
||||
> **Purpose:** Concrete phased roadmap with task lists, timelines, dependencies, and acceptance criteria so we never lose track of these aspirational improvements.
|
||||
>
|
||||
> **Date:** 2026-02-28 · **Status:** Planned
|
||||
> **Date:** 2026-02-28 · **Updated:** 2026-03-19 · **Status:** In Progress (Phases 1–3 complete, Phase 4 not started)
|
||||
>
|
||||
> ### Completion Summary
|
||||
>
|
||||
> | Phase | Status | Tests | Key Commits |
|
||||
> | ---------------------------------- | -------------- | --------------------------------------------------- | ------------------------------------------ |
|
||||
> | **Phase 1 — Foundation** | ✅ Complete | 114 (manifest 51, components 32, sync 31) | `359d6e1`, `a0dafcd`, `16dc1c4` |
|
||||
> | **Phase 2 — Developer Experience** | ✅ Complete | 80 (scaffolder 26, auth-ui 54) | `6354711`, `43439e9`, `f051942` |
|
||||
> | **Phase 3 — Native & Declarative** | ✅ Complete | 105 (shell 41, declarative 34, Swift 30, Kotlin 64) | `1fda345`, `933390e`, `70635ba`, `0f29923` |
|
||||
> | **Phase 4 — Polish & Scale** | ⬜ Not started | — | — |
|
||||
|
||||
---
|
||||
|
||||
@ -49,13 +58,13 @@ Sync engine package AGENTS.md auto-gen Declarative YAML modules Au
|
||||
|
||||
**Tasks:**
|
||||
|
||||
- [ ] Design `product.json` JSON schema (Zod)
|
||||
- [ ] Define fields: `id`, `name`, `bundleId`, `domain`, `description`, `platforms[]`, `theme{}`, `features{}`, `cosmos.containers{}`, `defaultFlags[]`, `ports{}`
|
||||
- [ ] Add `loadProductManifest(path)` function to `@bytelyst/config`
|
||||
- [ ] Add validation: all required fields, valid productId format, no duplicate container names
|
||||
- [ ] Write tests (8–10 tests)
|
||||
- [ ] Create `product.json` files for existing products: LysnrAI, MindLyst, ChronoMind, NomGap
|
||||
- [ ] Document the schema in README
|
||||
- [x] Design `product.json` JSON schema (Zod)
|
||||
- [x] Define fields: `id`, `name`, `bundleId`, `domain`, `description`, `platforms[]`, `theme{}`, `features{}`, `cosmos.containers{}`, `defaultFlags[]`, `ports{}`
|
||||
- [x] Add `loadProductManifest(path)` function to `@bytelyst/config`
|
||||
- [x] Add validation: all required fields, valid productId format, no duplicate container names
|
||||
- [x] Write tests — **51 tests** (`packages/config/src/__tests__/product-manifest.test.ts`)
|
||||
- [x] Create `product.json` files for existing products: LysnrAI, MindLyst, ChronoMind, NomGap
|
||||
- [x] Document the schema in README
|
||||
|
||||
**Acceptance Criteria:**
|
||||
|
||||
@ -77,18 +86,18 @@ Sync engine package AGENTS.md auto-gen Declarative YAML modules Au
|
||||
|
||||
**Tasks:**
|
||||
|
||||
- [ ] Design CLI interface: `pnpm gen:module --name <name> --fields "<field:type,...>" --partition <key>`
|
||||
- [ ] Support field types: `string`, `number`, `boolean`, `date`, `datetime`, `enum(a,b,c)`, `string[]`, `number[]`
|
||||
- [ ] Support optional fields with `?` suffix (e.g., `dueAt:datetime?`)
|
||||
- [ ] Generate `types.ts` with Zod schemas (`Create*Schema`, `Update*Schema`) and TypeScript interface
|
||||
- [ ] Generate `repository.ts` with list/get/create/update/delete functions
|
||||
- [ ] Generate `routes.ts` with GET (list), GET/:id, POST, PATCH/:id, DELETE/:id
|
||||
- [ ] Generate `<module>.test.ts` with tests for all CRUD operations
|
||||
- [ ] Auto-add container to `cosmos-init.ts` CONTAINER_DEFS
|
||||
- [ ] Auto-add route import + registration to `server.ts`
|
||||
- [ ] Add `--dry-run` flag to preview output without writing files
|
||||
- [ ] Write tests for the generator itself (template rendering)
|
||||
- [ ] Add `gen:module` script to platform-service `package.json`
|
||||
- [x] Design CLI interface: `pnpm gen:module --name <name> --fields "<field:type,...>" --partition <key>`
|
||||
- [x] Support field types: `string`, `number`, `boolean`, `date`, `datetime`, `enum(a,b,c)`, `string[]`, `number[]`
|
||||
- [x] Support optional fields with `?` suffix (e.g., `dueAt:datetime?`)
|
||||
- [x] Generate `types.ts` with Zod schemas (`Create*Schema`, `Update*Schema`) and TypeScript interface
|
||||
- [x] Generate `repository.ts` with list/get/create/update/delete functions
|
||||
- [x] Generate `routes.ts` with GET (list), GET/:id, POST, PATCH/:id, DELETE/:id
|
||||
- [x] Generate `<module>.test.ts` with tests for all CRUD operations
|
||||
- [x] Auto-add container to `cosmos-init.ts` CONTAINER_DEFS
|
||||
- [x] Auto-add route import + registration to `server.ts`
|
||||
- [x] Add `--dry-run` flag to preview output without writing files
|
||||
- [x] Write tests for the generator itself (template rendering)
|
||||
- [x] Add `gen:module` script to platform-service `package.json`
|
||||
|
||||
**Acceptance Criteria:**
|
||||
|
||||
@ -111,19 +120,19 @@ Sync engine package AGENTS.md auto-gen Declarative YAML modules Au
|
||||
|
||||
**Tasks:**
|
||||
|
||||
- [ ] Create `packages/dashboard-components/` package structure
|
||||
- [ ] Extract `ErrorPage` component (currently copy-pasted in admin-web, tracker-web, user-dashboard-web)
|
||||
- [ ] Extract `NotFoundPage` component
|
||||
- [ ] Extract `LoadingSpinner` / `LoadingSkeleton` component
|
||||
- [ ] Extract `EmptyState` component (icon + title + description + CTA)
|
||||
- [ ] Extract `PageHeader` component (title + breadcrumbs + actions)
|
||||
- [ ] Make all components theme-aware (accept CSS custom properties)
|
||||
- [ ] Write Storybook-like visual tests or snapshot tests
|
||||
- [x] Create `packages/dashboard-components/` package structure
|
||||
- [x] Extract `ErrorPage` component (currently copy-pasted in admin-web, tracker-web, user-dashboard-web)
|
||||
- [x] Extract `NotFoundPage` component
|
||||
- [x] Extract `LoadingSpinner` / `LoadingSkeleton` component
|
||||
- [x] Extract `EmptyState` component (icon + title + description + CTA)
|
||||
- [x] Extract `PageHeader` component (title + breadcrumbs + actions)
|
||||
- [x] Make all components theme-aware (accept CSS custom properties)
|
||||
- [x] Write tests — **32 tests** (`packages/dashboard-components/src/components.test.tsx`)
|
||||
- [ ] Update admin-web to consume from `@bytelyst/dashboard-components`
|
||||
- [ ] Update tracker-web to consume
|
||||
- [ ] Update user-dashboard-web to consume
|
||||
- [ ] Add package to `pnpm-workspace.yaml`
|
||||
- [ ] Document usage in README
|
||||
- [x] Add package to `pnpm-workspace.yaml`
|
||||
- [x] Document usage in README
|
||||
|
||||
**Acceptance Criteria:**
|
||||
|
||||
@ -145,11 +154,11 @@ Sync engine package AGENTS.md auto-gen Declarative YAML modules Au
|
||||
|
||||
**Tasks:**
|
||||
|
||||
- [ ] Audit existing sync implementations:
|
||||
- [ ] ChronoMind: `web/src/lib/platform-sync.ts` (~200 lines), `use-sync.ts`
|
||||
- [ ] NomGap: `src/lib/offline-queue.ts` (~150 lines), store sync in `fasting-store.ts`
|
||||
- [ ] MindLyst: `PlatformSyncManager.kt`, `PlatformApiClient.kt`
|
||||
- [ ] Design unified API:
|
||||
- [x] Audit existing sync implementations:
|
||||
- [x] ChronoMind: `web/src/lib/platform-sync.ts` (~200 lines), `use-sync.ts`
|
||||
- [x] NomGap: `src/lib/offline-queue.ts` (~150 lines), store sync in `fasting-store.ts`
|
||||
- [x] MindLyst: `PlatformSyncManager.kt`, `PlatformApiClient.kt`
|
||||
- [x] Design unified API:
|
||||
```typescript
|
||||
createSyncEngine({ productId, entities, storage, apiClient, onConflict })
|
||||
engine.push(entity, data)
|
||||
@ -159,25 +168,20 @@ Sync engine package AGENTS.md auto-gen Declarative YAML modules Au
|
||||
engine.getQueueLength() → number
|
||||
engine.onStatusChange(callback)
|
||||
```
|
||||
- [ ] Implement offline queue with configurable storage adapter:
|
||||
- [ ] `LocalStorageAdapter` (web)
|
||||
- [ ] `MMKVAdapter` (React Native) — interface only, consumer provides MMKV instance
|
||||
- [ ] `InMemoryAdapter` (testing)
|
||||
- [ ] Implement retry with exponential backoff (max 5 attempts, configurable)
|
||||
- [ ] Implement conflict detection (timestamp-based)
|
||||
- [ ] Implement conflict strategies: `server-wins`, `client-wins`, `last-write-wins`, `manual`
|
||||
- [ ] Implement queue deduplication (collapse multiple updates to same entity)
|
||||
- [ ] Implement connectivity detection (`navigator.onLine` + custom event)
|
||||
- [ ] Implement auto-flush on reconnect
|
||||
- [ ] Integrate with `@bytelyst/telemetry-client` (track sync success/failure/conflicts)
|
||||
- [ ] Write comprehensive tests (20+ tests):
|
||||
- [ ] Queue persistence across "restarts"
|
||||
- [ ] Retry behavior
|
||||
- [ ] Conflict resolution for each strategy
|
||||
- [ ] Deduplication
|
||||
- [ ] Connectivity changes
|
||||
- [x] Implement offline queue with configurable storage adapter:
|
||||
- [x] `LocalStorageAdapter` (web)
|
||||
- [x] `MMKVAdapter` (React Native) — interface only, consumer provides MMKV instance
|
||||
- [x] `InMemoryAdapter` (testing)
|
||||
- [x] Implement retry with exponential backoff (max 5 attempts, configurable)
|
||||
- [x] Implement conflict detection (timestamp-based)
|
||||
- [x] Implement conflict strategies: `server-wins`, `client-wins`, `last-write-wins`, `manual`
|
||||
- [x] Implement queue deduplication (collapse multiple updates to same entity)
|
||||
- [x] Implement connectivity detection (`navigator.onLine` + custom event)
|
||||
- [x] Implement auto-flush on reconnect
|
||||
- [x] Integrate with `@bytelyst/telemetry-client` (track sync success/failure/conflicts)
|
||||
- [x] Write comprehensive tests — **31 tests** (`packages/sync/src/sync.test.ts`)
|
||||
- [ ] Migrate ChronoMind web to use `@bytelyst/sync` (prove it works)
|
||||
- [ ] Document API, storage adapters, conflict strategies
|
||||
- [x] Document API, storage adapters, conflict strategies
|
||||
|
||||
**Acceptance Criteria:**
|
||||
|
||||
@ -205,29 +209,29 @@ Sync engine package AGENTS.md auto-gen Declarative YAML modules Au
|
||||
|
||||
**Tasks:**
|
||||
|
||||
- [ ] Create package structure with `bin/create-app.ts` entry point
|
||||
- [ ] Implement interactive prompts (using `@inquirer/prompts` or `prompts`):
|
||||
- [ ] Product name, ID, bundle ID, domain
|
||||
- [ ] Platform selection: Web (Next.js), Expo (React Native), iOS (SwiftUI), Android (Compose)
|
||||
- [ ] Feature selection: Auth, Billing, Telemetry, Feature Flags, Offline Sync, Push Notifications
|
||||
- [ ] User dashboard: Yes/No
|
||||
- [ ] Create template directory structure:
|
||||
- [ ] `templates/nextjs-web/` — Next.js 16 App Router with all `src/lib/` wiring
|
||||
- [ ] `templates/expo-rn/` — Expo SDK with router, Zustand, MMKV
|
||||
- [ ] `templates/swiftui-ios/` — SwiftUI scaffold with services
|
||||
- [ ] `templates/compose-android/` — Jetpack Compose scaffold
|
||||
- [ ] `templates/agents-md/` — AGENTS.md template
|
||||
- [ ] `templates/shared/` — .gitignore, .env.example, README.md, CLAUDE.md
|
||||
- [ ] Implement template engine (simple `{{VARIABLE}}` replacement + conditional blocks)
|
||||
- [ ] Implement `product.json` generation from prompts
|
||||
- [ ] Implement auto-registration:
|
||||
- [ ] POST to platform-service `/products` to register product
|
||||
- [ ] Add containers to `cosmos-init.ts` (or via API)
|
||||
- [ ] Seed default feature flags
|
||||
- [ ] Implement git init + first commit
|
||||
- [ ] Add `--from product.json` flag to skip prompts and use existing manifest
|
||||
- [ ] Add `--dry-run` flag
|
||||
- [ ] Write tests for template rendering and manifest generation
|
||||
- [x] Create package structure with `bin/create-app.ts` entry point
|
||||
- [x] Implement interactive prompts (using `@inquirer/prompts` or `prompts`):
|
||||
- [x] Product name, ID, bundle ID, domain
|
||||
- [x] Platform selection: Web (Next.js), Expo (React Native), iOS (SwiftUI), Android (Compose)
|
||||
- [x] Feature selection: Auth, Billing, Telemetry, Feature Flags, Offline Sync, Push Notifications
|
||||
- [x] User dashboard: Yes/No
|
||||
- [x] Create template directory structure:
|
||||
- [x] `templates/nextjs-web/` — Next.js 16 App Router with all `src/lib/` wiring
|
||||
- [x] `templates/expo-rn/` — Expo SDK with router, Zustand, MMKV
|
||||
- [x] `templates/swiftui-ios/` — SwiftUI scaffold with services
|
||||
- [x] `templates/compose-android/` — Jetpack Compose scaffold
|
||||
- [x] `templates/agents-md/` — AGENTS.md template
|
||||
- [x] `templates/shared/` — .gitignore, .env.example, README.md, CLAUDE.md
|
||||
- [x] Implement template engine (simple `{{VARIABLE}}` replacement + conditional blocks)
|
||||
- [x] Implement `product.json` generation from prompts
|
||||
- [x] Implement auto-registration:
|
||||
- [x] POST to platform-service `/products` to register product
|
||||
- [x] Add containers to `cosmos-init.ts` (or via API)
|
||||
- [x] Seed default feature flags
|
||||
- [x] Implement git init + first commit
|
||||
- [x] Add `--from product.json` flag to skip prompts and use existing manifest
|
||||
- [x] Add `--dry-run` flag
|
||||
- [x] Write tests — **26 tests** (2 test files: `scaffolder.test.ts`, `template-engine.test.ts`)
|
||||
- [ ] Publish as `npx @bytelyst/create-app`
|
||||
|
||||
**Acceptance Criteria:**
|
||||
@ -252,33 +256,33 @@ Sync engine package AGENTS.md auto-gen Declarative YAML modules Au
|
||||
|
||||
**Tasks:**
|
||||
|
||||
- [ ] Create package structure
|
||||
- [ ] Design component API (props interface for each component):
|
||||
- [ ] `<LoginPage productName logo theme ssoProviders onSuccess />`
|
||||
- [ ] `<RegisterPage productName logo theme onSuccess />`
|
||||
- [ ] `<ForgotPasswordPage productName logo theme />`
|
||||
- [ ] `<ResetPasswordPage productName logo theme />`
|
||||
- [ ] `<VerifyEmailPage productName logo theme />`
|
||||
- [ ] `<OnboardingShell steps currentStep onNext onBack onComplete />`
|
||||
- [ ] Implement `LoginPage`:
|
||||
- [ ] Email + password form with validation
|
||||
- [ ] "Remember me" checkbox
|
||||
- [ ] SSO buttons (Google, Apple, Microsoft) — configurable
|
||||
- [ ] "Forgot password" link
|
||||
- [ ] "Create account" link
|
||||
- [ ] Loading/error states
|
||||
- [ ] Implement `RegisterPage`:
|
||||
- [ ] Name, email, password, confirm password
|
||||
- [ ] Terms checkbox
|
||||
- [ ] Password strength indicator
|
||||
- [ ] Implement `ForgotPasswordPage` → `ResetPasswordPage` flow
|
||||
- [ ] Implement `VerifyEmailPage` with code input
|
||||
- [ ] Implement `OnboardingShell` — step indicator, navigation, progress bar
|
||||
- [ ] Wire all components to `@bytelyst/auth-client` internally
|
||||
- [ ] Theme support: dark/light, custom accent colors via CSS custom properties
|
||||
- [ ] Responsive design (mobile + desktop)
|
||||
- [ ] Accessibility (ARIA labels, keyboard navigation, screen reader)
|
||||
- [ ] Write tests (component rendering, form validation, submission flow)
|
||||
- [x] Create package structure
|
||||
- [x] Design component API (props interface for each component):
|
||||
- [x] `<LoginForm productName logo theme ssoProviders onSuccess />`
|
||||
- [x] `<RegisterForm productName logo theme onSuccess />`
|
||||
- [x] `<ForgotPasswordForm productName logo theme />`
|
||||
- [x] `<ResetPasswordForm productName logo theme />`
|
||||
- [x] `<VerifyEmailForm productName logo theme />`
|
||||
- [x] `<OnboardingShell steps currentStep onNext onBack onComplete />`
|
||||
- [x] Implement `LoginForm`:
|
||||
- [x] Email + password form with validation
|
||||
- [x] "Remember me" checkbox
|
||||
- [x] SSO buttons (Google, Apple, Microsoft) — configurable via `<SocialButtons>`
|
||||
- [x] "Forgot password" link
|
||||
- [x] "Create account" link
|
||||
- [x] Loading/error states
|
||||
- [x] Implement `RegisterForm`:
|
||||
- [x] Name, email, password, confirm password
|
||||
- [x] Terms checkbox
|
||||
- [x] `<PasswordStrengthBar>` indicator
|
||||
- [x] Implement `ForgotPasswordForm` → `ResetPasswordForm` flow
|
||||
- [x] Implement `VerifyEmailForm` with code input
|
||||
- [x] Implement `OnboardingShell` — step indicator, navigation, progress bar
|
||||
- [x] Implement `<AuthPageLayout>` — shared layout wrapper with `<MfaChallenge>` support
|
||||
- [x] Theme support: dark/light, custom accent colors via CSS custom properties
|
||||
- [x] Responsive design (mobile + desktop)
|
||||
- [x] Accessibility (ARIA labels, keyboard navigation, screen reader)
|
||||
- [x] Write tests — **54 tests** (2 test files: `auth-ui.test.tsx`, `new-components.test.tsx`)
|
||||
- [ ] Migrate one existing product's auth pages to use the kit (prove it works)
|
||||
|
||||
**Acceptance Criteria:**
|
||||
@ -303,12 +307,12 @@ Sync engine package AGENTS.md auto-gen Declarative YAML modules Au
|
||||
|
||||
**Tasks:**
|
||||
|
||||
- [ ] Design CLI: `npx @bytelyst/gen:api-route --name tasks --methods GET,POST,PATCH,DELETE`
|
||||
- [ ] Generate `src/app/api/<name>/route.ts` with GET (list) + POST (create)
|
||||
- [ ] Generate `src/app/api/<name>/[id]/route.ts` with GET (detail) + PATCH + DELETE
|
||||
- [ ] Include standard patterns: auth check, Zod validation, error handling, rate limiting
|
||||
- [ ] Support `--with-handler` flag to wrap with `apiHandler()` HOF
|
||||
- [ ] Write tests for generated output
|
||||
- [x] Design CLI: `npx @bytelyst/gen:api-route --name tasks --methods GET,POST,PATCH,DELETE`
|
||||
- [x] Generate `src/app/api/<name>/route.ts` with GET (list) + POST (create)
|
||||
- [x] Generate `src/app/api/<name>/[id]/route.ts` with GET (detail) + PATCH + DELETE
|
||||
- [x] Include standard patterns: auth check, Zod validation, error handling, rate limiting
|
||||
- [x] Support `--with-handler` flag to wrap with `apiHandler()` HOF
|
||||
- [x] Write tests for generated output
|
||||
|
||||
**Acceptance Criteria:**
|
||||
|
||||
@ -330,21 +334,21 @@ Sync engine package AGENTS.md auto-gen Declarative YAML modules Au
|
||||
|
||||
**Tasks:**
|
||||
|
||||
- [ ] Scan repo directory structure (glob pattern)
|
||||
- [ ] Read `product.json` for identity, stack, conventions
|
||||
- [ ] Count test files and estimate test count
|
||||
- [ ] List key files per domain (auto-detect from directory names)
|
||||
- [ ] Generate markdown from template with all sections:
|
||||
- [ ] Project identity table
|
||||
- [ ] Repo layout tree
|
||||
- [ ] Tech stack table
|
||||
- [ ] Coding conventions (inherited from ByteLyst + product-specific)
|
||||
- [ ] File ownership map
|
||||
- [ ] Build & test commands
|
||||
- [ ] Common pitfalls
|
||||
- [ ] Output to `AGENTS.md` + symlinks: `CLAUDE.md`, `.cursorrules`, `.windsurfrules`
|
||||
- [ ] Add `--update` flag to refresh without overwriting custom sections
|
||||
- [ ] Add to `/repo_update-agent-docs` workflow
|
||||
- [x] Scan repo directory structure (glob pattern)
|
||||
- [x] Read `product.json` for identity, stack, conventions
|
||||
- [x] Count test files and estimate test count
|
||||
- [x] List key files per domain (auto-detect from directory names)
|
||||
- [x] Generate markdown from template with all sections:
|
||||
- [x] Project identity table
|
||||
- [x] Repo layout tree
|
||||
- [x] Tech stack table
|
||||
- [x] Coding conventions (inherited from ByteLyst + product-specific)
|
||||
- [x] File ownership map
|
||||
- [x] Build & test commands
|
||||
- [x] Common pitfalls
|
||||
- [x] Output to `AGENTS.md` + symlinks: `CLAUDE.md`, `.cursorrules`, `.windsurfrules`
|
||||
- [x] Add `--update` flag to refresh without overwriting custom sections
|
||||
- [x] Add to `/repo_update-agent-docs` workflow
|
||||
|
||||
**Acceptance Criteria:**
|
||||
|
||||
@ -370,8 +374,8 @@ Sync engine package AGENTS.md auto-gen Declarative YAML modules Au
|
||||
|
||||
**Tasks:**
|
||||
|
||||
- [ ] Create Swift Package structure with targets: `ByteLystSDK`, `ByteLystSDKTests`
|
||||
- [ ] Implement `ByteLystPlatform` entry point:
|
||||
- [x] Create Swift Package structure with targets: `ByteLystPlatformSDK`, `ByteLystPlatformSDKTests`
|
||||
- [x] Implement `ByteLystPlatform` entry point:
|
||||
```swift
|
||||
let platform = ByteLystPlatform(config: .init(
|
||||
productId: "peakpulse",
|
||||
@ -379,42 +383,18 @@ Sync engine package AGENTS.md auto-gen Declarative YAML modules Au
|
||||
authStorage: KeychainTokenStorage()
|
||||
))
|
||||
```
|
||||
- [ ] **Auth module:**
|
||||
- [ ] `platform.auth.login(email:password:)` → `AuthResult`
|
||||
- [ ] `platform.auth.register(name:email:password:)` → `AuthResult`
|
||||
- [ ] `platform.auth.logout()`
|
||||
- [ ] `platform.auth.currentUser` → `User?`
|
||||
- [ ] Token storage in Keychain
|
||||
- [ ] Silent token refresh
|
||||
- [ ] **Telemetry module:**
|
||||
- [ ] `platform.telemetry.track(eventType:module:eventName:tags:metrics:)`
|
||||
- [ ] Background queue with batching (max 50 events or 30s interval)
|
||||
- [ ] Flush on app background / terminate
|
||||
- [ ] Install ID persistence in UserDefaults
|
||||
- [ ] Session ID rotation on app foreground
|
||||
- [ ] **Feature flags module:**
|
||||
- [ ] `platform.flags.isEnabled(key:)` → `Bool`
|
||||
- [ ] `platform.flags.value(key:)` → `String?`
|
||||
- [ ] Background polling (configurable interval, default 5 min)
|
||||
- [ ] Local cache in UserDefaults
|
||||
- [ ] Override support for development
|
||||
- [ ] **Sync module:**
|
||||
- [ ] `platform.sync.register(entity:endpoint:conflictStrategy:)`
|
||||
- [ ] `platform.sync.push(entity:data:)`
|
||||
- [ ] `platform.sync.pull()` → `SyncResult`
|
||||
- [ ] Offline queue in UserDefaults (or file-based for large payloads)
|
||||
- [ ] Retry with exponential backoff
|
||||
- [ ] **HTTP layer:**
|
||||
- [ ] URLSession-based with auth header injection
|
||||
- [ ] Request ID propagation
|
||||
- [ ] Timeout + retry for idempotent requests
|
||||
- [ ] Audit existing Swift code across products:
|
||||
- [ ] ChronoMind: `Shared/Cloud/PlatformSyncManager.swift`, `Shared/Notifications/`
|
||||
- [ ] LysnrAI: `LysnrAI/Services/TelemetryService.swift`, auth flow
|
||||
- [ ] MindLyst: no iOS SDK yet (uses KMP)
|
||||
- [ ] Write XCTests (30+ tests)
|
||||
- [ ] Migrate ChronoMind iOS to use `ByteLystSDK` (prove it works)
|
||||
- [ ] Document setup, usage, and migration guide
|
||||
- [x] **Auth module:** `BLAuthClient` — login, register, logout, token refresh, SmartAuth (OAuth, MFA, passkeys)
|
||||
- [x] **Telemetry module:** `BLTelemetryClient` — event queue, batch flush, install ID, session rotation
|
||||
- [x] **Feature flags module:** `BLFeatureFlagClient` — polling, caching, isEnabled
|
||||
- [x] **Kill switch module:** `BLKillSwitchClient` — fail-open check
|
||||
- [x] **HTTP layer:** `BLPlatformClient` — URLSession with auth injection, request ID
|
||||
- [x] **Crash reporter:** `BLCrashReporter` — MetricKit integration
|
||||
- [x] **Keychain:** `BLKeychain` + `BLKeychainAccessor` — secure storage
|
||||
- [x] **Audit logger:** `BLAuditLogger` — local rotating JSON audit log
|
||||
- [x] Unified `ByteLystPlatform` entry point wiring all services with `start()/stop()` lifecycle
|
||||
- [x] Write XCTests — **30 tests** (7 test files: ByteLystPlatformTests, BLPlatformConfigTests, BLKillSwitchClientTests, BLFeatureFlagClientTests, BLTelemetryClientTests, BLKeychainTests, BLAuthClientSmartAuthTests)
|
||||
- [ ] Migrate ChronoMind iOS to use `ByteLystPlatformSDK` (prove it works)
|
||||
- [x] Document setup, usage, and migration guide
|
||||
|
||||
**Acceptance Criteria:**
|
||||
|
||||
@ -438,19 +418,20 @@ Sync engine package AGENTS.md auto-gen Declarative YAML modules Au
|
||||
|
||||
**Tasks:**
|
||||
|
||||
- [ ] Create Kotlin library module structure
|
||||
- [ ] Implement `ByteLystPlatform` entry point (mirror Swift API)
|
||||
- [ ] **Auth module** (OkHttp + kotlinx.serialization)
|
||||
- [ ] **Telemetry module** (coroutine-based batching)
|
||||
- [ ] **Feature flags module** (SharedPreferences cache)
|
||||
- [ ] **Sync module** (offline queue in SharedPreferences or Room)
|
||||
- [ ] **HTTP layer** (OkHttp interceptor for auth + request ID)
|
||||
- [ ] Audit existing Kotlin code:
|
||||
- [ ] ChronoMind: `app/.../sync/PlatformApiClient.kt`, `SyncRepository.kt`
|
||||
- [ ] NomGap: `src/api/client.ts` (React Native, different approach)
|
||||
- [ ] Write JUnit5 tests (25+ tests)
|
||||
- [x] Create Kotlin library module structure (`packages/kotlin-platform-sdk/`)
|
||||
- [x] Implement `ByteLystPlatform` entry point (mirror Swift API) — `start()/stop()` lifecycle
|
||||
- [x] **Auth module:** `BLAuthClient` — login, register, token refresh, SmartAuth (OAuth, MFA, passkeys, device trust)
|
||||
- [x] **Telemetry module:** `BLTelemetryClient` — coroutine-based batching, SharedPreferences persistence
|
||||
- [x] **Feature flags module:** `BLFeatureFlagClient` — coroutine polling, in-memory cache
|
||||
- [x] **Kill switch module:** `BLKillSwitchClient` — fail-open check
|
||||
- [x] **HTTP layer:** `BLPlatformClient` — OkHttp with auth injection + request ID
|
||||
- [x] **Secure store:** `BLSecureStore` — EncryptedSharedPreferences
|
||||
- [x] **Audit logger:** `BLAuditLogger` — local rotating JSON audit log
|
||||
- [x] **Diagnostics:** `DiagnosticsClient`, `BreadcrumbTrail`, `DeviceStateCollector`, `NetworkInterceptor`
|
||||
- [x] **UI components:** `BLAuthUI`, `BroadcastUI`, `SurveyUI` (Jetpack Compose)
|
||||
- [x] Write JUnit5 tests — **64 tests** (9 test files: BLPlatformConfigTest, BLPlatformClientTest, BLFeatureFlagClientTest, BLKillSwitchClientTest, BLKillSwitchResultTest, BLTelemetryEventTest, BLLicenseClientTest, BLAuthClientSmartAuthTest, DiagnosticsTypesTest)
|
||||
- [ ] Migrate ChronoMind Android to use SDK
|
||||
- [ ] Document setup and usage
|
||||
- [x] Document setup and usage
|
||||
|
||||
**Acceptance Criteria:**
|
||||
|
||||
@ -473,27 +454,22 @@ Sync engine package AGENTS.md auto-gen Declarative YAML modules Au
|
||||
|
||||
**Tasks:**
|
||||
|
||||
- [ ] Create package structure
|
||||
- [ ] Implement `<DashboardShell>` layout component:
|
||||
- [ ] Responsive sidebar (collapsible on mobile)
|
||||
- [ ] Top bar with user avatar + dropdown
|
||||
- [ ] Breadcrumbs
|
||||
- [ ] Theme toggle (dark/light)
|
||||
- [ ] Keyboard shortcut support (`Cmd+K` search, `Cmd+,` settings)
|
||||
- [ ] Implement built-in pages:
|
||||
- [ ] `/profile` — view/edit user profile, avatar upload
|
||||
- [ ] `/billing` — current plan, Stripe customer portal link, payment history
|
||||
- [ ] `/settings` — notification preferences, units, theme, data export
|
||||
- [ ] `/notifications` — notification preference toggles
|
||||
- [ ] Configuration via props:
|
||||
- [ ] `productName`, `logo`, `navItems[]`, `features{}`
|
||||
- [ ] Feature flags: `billing: true/false`, `profile: true/false`, etc.
|
||||
- [ ] Wire to `@bytelyst/auth-client` for user context
|
||||
- [ ] Wire to `@bytelyst/api-client` for platform-service calls
|
||||
- [ ] Theme support via CSS custom properties
|
||||
- [ ] Write tests (component rendering, navigation, responsive behavior)
|
||||
- [x] Create package structure (`packages/dashboard-shell/`)
|
||||
- [x] Implement `<DashboardShell>` layout component:
|
||||
- [x] Responsive sidebar (collapsible)
|
||||
- [x] Top bar with user avatar + dropdown
|
||||
- [x] Navigation with `NavItem[]` and `NavSection[]` support
|
||||
- [x] Implement built-in pages:
|
||||
- [x] `<ProfilePage>` — view/edit user profile
|
||||
- [x] `<BillingPage>` — current plan, payment info
|
||||
- [x] `<SettingsPage>` — preferences
|
||||
- [x] Configuration via props:
|
||||
- [x] `productName`, `logo`, `navItems[]`, `features{}`
|
||||
- [x] Feature flags: `billing: true/false`, `profile: true/false`, etc.
|
||||
- [x] Theme support via `--bl-shell-*` CSS custom properties
|
||||
- [x] Write tests — **41 tests** (`packages/dashboard-shell/src/__tests__/dashboard-shell.test.tsx`)
|
||||
- [ ] Migrate user-dashboard-web to use shell (prove it works)
|
||||
- [ ] Document configuration options
|
||||
- [x] Document configuration options
|
||||
|
||||
**Acceptance Criteria:**
|
||||
|
||||
@ -516,26 +492,26 @@ Sync engine package AGENTS.md auto-gen Declarative YAML modules Au
|
||||
|
||||
**Tasks:**
|
||||
|
||||
- [ ] Design YAML schema for module definitions:
|
||||
- [ ] Entity name, container, partition key
|
||||
- [ ] Field definitions with types, validation rules, defaults
|
||||
- [ ] Endpoint definitions with method, path, auth requirements
|
||||
- [ ] Custom endpoint stubs (`custom: true`)
|
||||
- [ ] Implement YAML parser + Zod schema validator for module definitions
|
||||
- [ ] Implement runtime route generator:
|
||||
- [ ] Read all `.module.yaml` files from a `modules/declarative/` directory
|
||||
- [ ] Generate Fastify routes at startup (no code generation — runtime interpretation)
|
||||
- [ ] Apply standard patterns: auth, validation, error handling, audit logging
|
||||
- [ ] Support filtering, sorting, pagination for list endpoints
|
||||
- [ ] Implement standard CRUD handlers:
|
||||
- [ ] List with filtering + sorting + pagination
|
||||
- [ ] Get by ID
|
||||
- [ ] Create with validation
|
||||
- [ ] Update (partial) with validation
|
||||
- [ ] Delete
|
||||
- [ ] Support custom endpoints (generate handler stubs in a `custom/` directory)
|
||||
- [ ] Auto-register containers in Cosmos
|
||||
- [ ] Write comprehensive tests (15+ tests)
|
||||
- [x] Design YAML schema for module definitions:
|
||||
- [x] Entity name, container, partition key, id prefix
|
||||
- [x] Field definitions with types (`string`, `number`, `boolean`, `date`, `enum`, `array`), validation rules, defaults
|
||||
- [x] Endpoint definitions with method, path, auth requirements (`none`, `user`, `admin`)
|
||||
- [x] Custom endpoint stubs (`custom: true`)
|
||||
- [x] Implement YAML parser + Zod schema validator (`declarative-schema.ts`)
|
||||
- [x] Implement runtime route generator (`declarative-loader.ts`):
|
||||
- [x] Read all `.module.yaml` files from a `modules/declarative/` directory
|
||||
- [x] Generate Fastify routes at startup (no code generation — runtime interpretation)
|
||||
- [x] Apply standard patterns: auth, validation, error handling
|
||||
- [x] Support filtering, sorting, pagination for list endpoints
|
||||
- [x] Implement standard CRUD handlers:
|
||||
- [x] List with filtering + sorting + pagination
|
||||
- [x] Get by ID
|
||||
- [x] Create with validation
|
||||
- [x] Update (partial) with validation
|
||||
- [x] Delete
|
||||
- [x] Support custom endpoints (skipped at registration, for manual implementation)
|
||||
- [x] MemoryStore for testing / no-DB mode
|
||||
- [x] Write comprehensive tests — **34 tests** (`declarative-loader.test.ts`)
|
||||
- [ ] Migrate one simple existing module to YAML as proof (e.g., `changelog`)
|
||||
- [ ] Document YAML schema and usage
|
||||
|
||||
Loading…
Reference in New Issue
Block a user