Frontend: - Replace Next.js with Vite + React + TypeScript - Add new component architecture (app-shell, sidebar, dashboard modules) - Implement product modules: FRAME, safety protocols, walkthrough checkin, campus/staff attendance, personality quiz, sign language, classroom timer - Add shadcn/ui component library with Tailwind CSS - Remove legacy generated components, stores, and pages Backend: - Add product migrations: frame_entries, user_progress, safety_quiz_results, walkthrough_checkins, communication_events, personality_quiz_results, campus_attendance_config/summaries, staff_attendance_records, content_catalog - Add corresponding models, services, and routes - Implement cookie-based auth with refresh token rotation - Add content catalog seeder with product content - Migrate to ESLint flat config - Switch from yarn to npm Infrastructure: - Update .gitignore for new tooling - Add project documentation (CLAUDE.md, docs/) - Remove deprecated config files and yarn.lock Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.2 KiB
2.2 KiB
User Progress Frontend Integration
Purpose
User progress follows the frontend three-layer architecture for sign language progress and dashboard zone check-ins.
View -> Business Logic -> API/Data Access -> Backend
Files
View layer:
frontend/src/components/frameworks/SignLanguage.tsxfrontend/src/components/sign-language/SignLanguageProgressPanel.tsxfrontend/src/components/sign-language/SignLanguageVideoModal.tsxfrontend/src/components/frameworks/Dashboard.tsxfrontend/src/components/dashboard/DashboardZoneCheckIn.tsxfrontend/src/components/frameworks/ZonesOfRegulation.tsxfrontend/src/components/zones-of-regulation/ZonesOfRegulationView.tsx
Business logic layer:
frontend/src/business/dashboard/hooks.tsfrontend/src/business/dashboard/selectors.tsfrontend/src/business/sign-language/hooks.tsfrontend/src/business/sign-language/selectors.tsfrontend/src/business/user-progress/hooks.tsfrontend/src/business/user-progress/mappers.tsfrontend/src/business/user-progress/types.ts
API/data access layer:
frontend/src/shared/api/userProgress.tsfrontend/src/shared/types/userProgress.ts
Constants:
frontend/src/shared/constants/userProgress.ts
Behavior
- Learned sign IDs load from
GET /api/user_progress?progress_type=sign_learned. - Marking a sign learned uses
POST /api/user_progress. - Unmarking a sign uses
DELETE /api/user_progress/by-item. - The sign language page combines user progress with backend content catalog records in
useSignLanguagePage. - Dashboard zone check-in uses
item_id=currentandprogress_type=zone_checkin; dashboard page composition lives inuseDashboardPage. - The zones of regulation page currently renders content catalog records only. It does not persist check-ins; adding that interaction requires a dedicated UX task.
- Views render explicit backend errors from React Query state.
- User progress ownership is derived by the backend from the authenticated session.
Remaining Related Work
Other module progress types should reuse this API only when the data is truly current-user progress. Aggregate director reporting should use separate backend summary endpoints.