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>
47 lines
1.5 KiB
Markdown
47 lines
1.5 KiB
Markdown
# Director Dashboard Frontend Integration
|
|
|
|
## Purpose
|
|
|
|
Director dashboard follows the frontend three-layer architecture and aggregates backend-backed FRAME, QBS safety quiz, and staff attendance data.
|
|
|
|
```text
|
|
View -> Business Logic -> API/Data Access -> Backend
|
|
```
|
|
|
|
## Files
|
|
|
|
View layer:
|
|
|
|
- `frontend/src/components/frameworks/DirectorDashboard.tsx`
|
|
- `frontend/src/components/director-dashboard/`
|
|
|
|
Business logic layer:
|
|
|
|
- `frontend/src/business/director-dashboard/hooks.ts`
|
|
- `frontend/src/business/director-dashboard/selectors.ts`
|
|
- `frontend/src/business/director-dashboard/types.ts`
|
|
|
|
API/data access layer:
|
|
|
|
- `frontend/src/shared/api/frame.ts`
|
|
- `frontend/src/shared/api/safetyQuizResults.ts`
|
|
- `frontend/src/shared/api/staffAttendance.ts`
|
|
|
|
Constants:
|
|
|
|
- `frontend/src/shared/constants/directorDashboard.ts`
|
|
|
|
## Behavior
|
|
|
|
- The framework component calls `useDirectorDashboardPage` and renders `DirectorDashboardView`.
|
|
- FRAME entries load through `useFrameEntries`.
|
|
- Safety quiz results load through `useSafetyQuizResults`.
|
|
- Staff attendance records and summary load through staff attendance business hooks.
|
|
- Overview metrics, risk areas, and FRAME previews are derived in business selectors.
|
|
- View components use shared `Button`, `Table`, `StatePanel`, and `ModuleHeader` primitives.
|
|
- Loading, empty, and error states are explicit.
|
|
|
|
## Remaining Related Work
|
|
|
|
Time range tabs currently control UI state only. Add backend-supported date filtering before wiring these tabs to query filters.
|