# NoteLett — Agent Task Roadmap > **Historical snapshot.** This March 31, 2026 task roadmap is superseded for production-readiness execution. In particular, the old claim that common-platform backend package sources are missing is stale: those packages now exist under `../learning_ai/learning_ai_common_plat/packages/`. Use [`docs/PRODUCTION_READINESS_HANDOFF_ROADMAP.md`](PRODUCTION_READINESS_HANDOFF_ROADMAP.md) as the active checklist. **Date:** March 31, 2026 **Product:** NoteLett (`notelett`) — Structured notes for humans + AI agents **Repo:** `learning_ai_notes` **Stack:** Fastify 5 backend (port 4016) · Next.js 16 web (port 3000) · Expo mobile **Platform deps:** 23 `@bytelyst/*` packages (all resolve against `learning_ai_common_plat`) --- ## Current State | Surface | Routes / Modules | Tests | Build | Platform Pkgs | |---------|-----------------|-------|-------|---------------| | **Backend** | 7 modules, ~32 endpoints, 8 MCP tools | 20 files (unit + integration) | ✅ tsc | 13 (5 missing source in common_plat) | | **Web** | 6 pages, 13 components, 15 lib files | 7 unit + 7 E2E | ✅ next build | 10 (all used) | | **Mobile** | 5 tabs incl. settings, note detail, auth (+ register + session-aware index), kill-switch gate, broadcast + survey in root layout, feedback on settings, **auth-gated** store hydrates + broadcast/survey polling, offline queue flush (after auth, boot + foreground), **`flushTelemetry` on background**, `app-metadata` for telemetry versions, Vitest RN mocks + component smokes (auth, home, settings), 5 stores | 33 tests (7 files) | ✅ typecheck | Direct `@bytelyst/*` clients (+ optional future RN platform SDK) | **Historical package resolution note:** The earlier claim that 5 backend `@bytelyst/*` packages were missing from common platform is stale. On May 5, 2026, `backend-config`, `backend-flags`, `backend-telemetry`, `fastify-auth`, and `field-encrypt` exist in `../learning_ai/learning_ai_common_plat/packages/`. Current package/API drift is tracked in `docs/PRODUCTION_READINESS_HANDOFF_ROADMAP.md` P0.5/P2/P5. ### Web — AI-fast product roadmap For **sequenced web features** (command palette, context export, semantic retrieval, copilot, sharing, MCP onboarding), see **[`WEB_AI_FAST_ROADMAP.md`](./WEB_AI_FAST_ROADMAP.md)**. ### Mobile — sequential handoff For **ordered mobile implementation** (Expo app under `mobile/`), use **[`MOBILE_DELEGATION_ROADMAP.md`](./MOBILE_DELEGATION_ROADMAP.md)** — blocks, file pointers, and acceptance criteria in one place. Update the **Current State** table above when mobile capabilities change materially. ### Mobile — remaining gaps (March 2026 review) **Shipped:** Session-aware `index`, register, kill-switch UI, broadcast/survey, feedback, offline queue, `app-metadata`, **auth-gated hydrates** (notes/workspaces/inbox + polling only when `isAuthenticated`), **`flushTelemetry()` on background**, settings smoke test, capture → `blob-upload` comment. **Still open** (see [`MOBILE_DELEGATION_ROADMAP.md`](./MOBILE_DELEGATION_ROADMAP.md) **§ Remaining / deferred**): 1. **Deeper RNTL** — fireEvent / richer assertions (Block H TODO in delegation doc). 2. **Optional** — `@bytelyst/react-native-platform-sdk` alignment with NomGap (**A §A.3**). 3. **Optional** — `@bytelyst/sync` (**Block I**). --- ## Phase 0 — Missing Platform Package Source (HISTORICAL, RESOLVED) These 5 backend packages are depended on by both NoteLett and NomGap but have no source directory in `learning_ai_common_plat/packages/`. They must be created there before either product's backend can be built from a clean checkout of common_plat. - [ ] **0.1** Create `@bytelyst/backend-config` in `learning_ai_common_plat/packages/backend-config/` - Base Zod config schema extended by all product backends - Imported by: `backend/src/lib/config.ts` - [ ] **0.2** Create `@bytelyst/backend-flags` in `learning_ai_common_plat/packages/backend-flags/` - Feature flag registry for backend services - Imported by: `backend/src/lib/feature-flags.ts` - [ ] **0.3** Create `@bytelyst/backend-telemetry` in `learning_ai_common_plat/packages/backend-telemetry/` - Buffered telemetry event tracking for backends - Imported by: `backend/src/lib/telemetry.ts` - [ ] **0.4** Create `@bytelyst/fastify-auth` in `learning_ai_common_plat/packages/fastify-auth/` - JWT auth middleware (RS256 JWKS + HS256 fallback), `extractAuth`, `requireRole`, `createRequestContext` - Imported by: `backend/src/lib/auth.ts`, `backend/src/lib/request-context.ts`, all route modules - [ ] **0.5** Create `@bytelyst/field-encrypt` in `learning_ai_common_plat/packages/field-encrypt/` - Field-level encryption/decryption with AKV/env/memory key providers - Imported by: `backend/src/lib/field-encrypt.ts`, `backend/src/modules/notes/repository.ts` **Note:** These tasks require changes in `learning_ai_common_plat`, not in this repo. Coordinate with the common platform agent. NomGap also depends on all 5 of these. **Verification:** ```bash cd ../learning_ai_common_plat && pnpm run build cd ../learning_ai_notes/backend && pnpm install && pnpm run typecheck ``` --- ## Phase 0.5 — Fix Broken Imports + Adopt Dashboard Components - [x] **0.5.1** Replace broken `@bytelyst/ui` ToastProvider with `sonner` — [`7babee7`](https://github.com/saravanakumardb1/learning_ai_notes/commit/7babee7) - [x] **0.5.2** Adopt `@bytelyst/dashboard-components` (ErrorPage, NotFoundPage, LoadingSpinner) — [`7babee7`](https://github.com/saravanakumardb1/learning_ai_notes/commit/7babee7) - [x] **0.5.3** Replace raw `extraction-client.ts` with `@bytelyst/extraction` — [`7babee7`](https://github.com/saravanakumardb1/learning_ai_notes/commit/7babee7) --- ## Phase 1 — Critical Web Gaps These block the web app from being usable by real users. - [x] **1.1** Add auth pages — login, register, forgot-password — [`839218a`](https://github.com/saravanakumardb1/learning_ai_notes/commit/839218a) - Create `web/src/app/(auth)/login/page.tsx`, `register/page.tsx`, `forgot-password/page.tsx` - Wire to existing `@bytelyst/react-auth` config in `web/src/lib/auth.ts` - Include form validation, error states, loading states - Files: new pages under `web/src/app/(auth)/` - [x] **1.2** Add `middleware.ts` for route protection — [`839218a`](https://github.com/saravanakumardb1/learning_ai_notes/commit/839218a) - Redirect unauthenticated users from `(app)/*` routes to `/login` - Redirect authenticated users from `/login` to `/dashboard` - Check kill-switch status (call `checkKillSwitch()` from `web/src/lib/kill-switch.ts`) - File: `web/src/middleware.ts` - [x] **1.3** Replace plain textarea with a rich note editor — [`839218a`](https://github.com/saravanakumardb1/learning_ai_notes/commit/839218a) - Current `NoteEditor.tsx` is a bare `