- Added
getServerSession(authOptions)checks to 19 API route files - Returns 401 Unauthorized for unauthenticated requests
- Exceptions:
auth/[...nextauth],auth/register,health(public endpoints)
- Installed Vitest + dependencies, configured vitest.config.ts
- 7 test files, 113 tests passing:
src/lib/simulation/__tests__/math.test.ts(29 tests) -- matrix opssrc/lib/simulation/__tests__/ekf.test.ts(16 tests) -- Extended Kalman Filtersrc/lib/simulation/__tests__/cbf.test.ts(16 tests) -- Control Barrier Functionssrc/lib/simulation/__tests__/integration.test.ts(5 tests) -- EKF+CBF+Controlsrc/app/api/auth/register/__tests__/route.test.ts(16 tests) -- registration flowsrc/lib/crypto/__tests__/pqc-kyber.test.ts(19 tests) -- Kyber KEMsrc/lib/crypto/__tests__/pqc-integration.test.ts(12 tests) -- full PQC integration
src/app/error.tsx-- global error boundarysrc/app/not-found.tsx-- custom 404 (inline SVG, no Lucide icons)src/app/dashboard/error.tsx-- dashboard error boundary with retrysrc/app/dashboard/loading.tsx-- dashboard skeletonsrc/app/dashboard/digital-twin/loading.tsx-- 3D viewer skeletonsrc/app/dashboard/calendar/loading.tsx-- calendar grid skeletonsrc/app/dashboard/wellness/loading.tsx-- wellness metrics skeleton
src/app/api/auth/reset-password/route.ts-- POST handler with Zod validation, bcrypt 12 roundssrc/app/auth/reset-password/page.tsx-- 4-step reset page (identify -> verify -> reset -> confirm)src/lib/mockStore.ts-- addedupdateUserPassword()methodsrc/app/auth/login/page.tsx-- added "Forgot Password?" link
src/app/layout.tsx-- added<Toaster />to root layoutsrc/components/ui/toast.tsx-- added'use client'directivesrc/components/ui/toaster.tsx-- added'use client'directivesrc/hooks/use-toast.ts-- added'use client'directive- Wired to: signup, login, calendar, wellness, opportunities pages
src/app/dashboard/layout.tsx-- active route highlighting, "More" overflow Sheet, WCAG touch targetssrc/app/page.tsx-- hamburger menu with Sheet for mobilesrc/app/globals.css-- mobile menu styles
- Fixed 3 root causes across
pqc-signatures.tsandpqc-hybrid-encryption.ts:@noble/post-quantumv0.5.4 sign/verify argument order was inverted- Envelope encryption dropped wrappedDEK/dekNonce from EncryptedData output
- HKDF deriveKey() used random salt on each call, producing mismatched keys
- All 12 PQC integration tests now pass (was 5/12)
- Full suite: 113 tests, 0 failures
- Version: 2.0.0-alpha
- Next.js: 16.1.5 with Turbopack
- Build: Passing (65 pages, 0 errors)
- Tests: 113 passing, 0 failures across 7 test files
- Auth: NextAuth.js v4, credentials provider, mock user store, 19 API routes guarded
- Data: File-based mock store (no production database connected)
- Database Schema: Drizzle ORM with 25+ tables defined but DATABASE_URL not configured
- Security: PQC encryption (Kyber KEM + XChaCha20-Poly1305), PQC signatures (ML-DSA/Dilithium), CSP headers, HIPAA-oriented design, auth guards
- 3D: Three.js DigitalTwinCanvas component (basic humanoid, health-score color mapping)
- Repo: github.com/ihep-platform/ihep.app (master branch)
not-found.tsxmust NOT use Lucide icons or any library that callsuseStateinternally. Next.js 16.1.5 prerenders this page at build time regardless of'use client'.- Any component imported in
layout.tsxmust have'use client'if it uses hooks (toast.tsx, toaster.tsx, use-toast.ts all required this directive).
@noble/post-quantumv0.5.4 API:sign(message, secretKey),verify(signature, message, publicKey)- Envelope encryption uses XChaCha20-Poly1305 for both plaintext and DEK wrapping
- HKDF-SHA512 key derivation uses fixed zero salt (KEM shared secret provides full entropy)
- Signature sizes: ML-DSA44=2420, ML-DSA65=3309, ML-DSA87=4627
EncryptedDatainterface includes: ciphertext, kyberCiphertext, nonce, wrappedDEK, dekNonce, algorithm, keyId, timestamp, metadataHash
- Implement RBAC checks per endpoint (patient vs provider vs admin roles)
- Add E2E tests with Playwright for critical user journeys
- Connect Drizzle ORM to a PostgreSQL database (DATABASE_URL)
- Replace mock store with database-backed user repository
- Continue grant application work (ARPA-H ADVOCATE due Feb 27, CMS ACCESS due Apr 1)