# NoteLett — Agent Task Roadmap **Date:** March 29, 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** | 4 tabs, note detail, auth, 5 stores | 23 tests (4 files) | ✅ typecheck | — | **Package resolution note:** 5 backend `@bytelyst/*` packages (`backend-config`, `backend-flags`, `backend-telemetry`, `fastify-auth`, `field-encrypt`) do not have source directories in `learning_ai_common_plat/packages/`. They resolve via `^0.1.0` from the private Gitea npm registry but their source must be created in common_plat. This is a shared blocker with NomGap — see Phase 0 below. --- ## Phase 0 — Missing Platform Package Source (SHARED BLOCKER) 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 `