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.8 KiB
2.8 KiB
Sign Language Integration
Purpose
SignLanguage renders backend-owned sign catalog content and current-user learned progress through the three-layer frontend architecture.
View -> Business Logic -> API/Data Access -> Backend
Runtime sign records, teaching tips, video URLs, GIF URLs, step instructions, and page-level teaching reminders belong to backend content catalog payloads. The frontend owns only UI state, filter config, style tokens, and progress interaction wiring.
Frontend Layers
View:
frontend/src/components/frameworks/SignLanguage.tsxfrontend/src/components/frameworks/SignLanguageVideoModal.tsxfrontend/src/components/sign-language/SignLanguageView.tsxfrontend/src/components/sign-language/SignLanguageHeader.tsxfrontend/src/components/sign-language/SignLanguageRememberPanel.tsxfrontend/src/components/sign-language/SignLanguageProgressPanel.tsxfrontend/src/components/sign-language/SignLanguageFilters.tsxfrontend/src/components/sign-language/SignLanguageGrid.tsxfrontend/src/components/sign-language/SignLanguageCard.tsxfrontend/src/components/sign-language/SignLanguageVideoModal.tsx
Business logic:
frontend/src/business/sign-language/hooks.tsfrontend/src/business/sign-language/selectors.tsfrontend/src/business/sign-language/types.ts
Shared contracts and UI config:
frontend/src/shared/types/app.tsfrontend/src/shared/constants/signLanguage.tsfrontend/src/shared/constants/contentCatalog.ts
Backend Contracts
The page reads content from:
GET /api/public/content-catalog/sign-language-itemsGET /api/public/content-catalog/sign-language-page-content
Learned progress uses:
GET /api/user_progress?progress_type=sign_learnedPOST /api/user_progressDELETE /api/user_progress/by-item
Content payloads are seeded in:
backend/src/db/seeders/content-catalog-data/content-catalog-seed-payloads.js
Behavior
useSignLanguagePageloads sign items, page content, and learned sign progress.- Selectors handle category counts, search/category filtering, progress percentage, video duration, filter normalization, and YouTube search URL construction.
- View components receive a prepared page model and do not call API/data access modules.
- The video modal uses
useSignLanguageVideoModalStatefor GIF/video mode, GIF loading state, and step-guide expansion. - Loading, empty, and error states are explicit through
StatePanel.
Data Ownership Rules
- Do not add sign records, teaching tips, page reminders, video URLs, GIF URLs, or step instructions to frontend constants.
- Do not add frontend fallback sign payloads.
- Keep frontend constants limited to filter options, category style classes, external URL templates, and UI view modes.
- Test-only fixtures may live in selector tests or
frontend/src/test-seeds/.