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>
1.9 KiB
1.9 KiB
Vocational Opportunities Frontend Slice
Purpose
Vocational Opportunities follows the frontend three-layer architecture and loads opportunity records from the backend content catalog.
View -> Business Logic -> API/Data Access -> Backend
The frontend keeps only presentation configuration in shared constants. Vocational opportunity records are backend-owned runtime content.
Files
View layer:
frontend/src/components/frameworks/VocationalOpportunities.tsxfrontend/src/components/vocational-opportunities/
Business logic layer:
frontend/src/business/vocational/hooks.tsfrontend/src/business/vocational/selectors.ts
Shared constants and types:
frontend/src/shared/constants/contentCatalog.tsfrontend/src/shared/constants/vocational.tsfrontend/src/shared/types/vocational.ts
API/data access layer:
frontend/src/shared/api/contentCatalog.tsfrontend/src/shared/types/contentCatalog.ts
Behavior
- The framework component is a thin wrapper around
useVocationalOpportunities. - Opportunity records load from
GET /api/public/content-catalog/vocational-opportunities. - Shared constants own zip search configuration, category previews, category icon keys, and style tokens.
- Business selectors own zip normalization, local search result derivation, filtering, category lists, and stats.
- Business hook owns content loading, zip input, search state, search text, category filter, expanded card state, and saved opportunity state.
- View components render header, zip search, pre-search state, loading state, filters, stats, result cards, and empty results.
- Views render explicit loading and error states from the content catalog query.
Management Contract
If vocational opportunities become tenant-owned or admin-editable beyond content catalog management, add a typed backend management contract and keep the frontend integration on the same path: shared/api + business/vocational + thin views.