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>
56 lines
2.7 KiB
Markdown
56 lines
2.7 KiB
Markdown
# Walk-Through Frontend Integration
|
|
|
|
## Purpose
|
|
|
|
Walk-through check-ins follow the frontend three-layer architecture.
|
|
|
|
```text
|
|
View -> Business Logic -> API/Data Access -> Backend
|
|
```
|
|
|
|
## Files
|
|
|
|
View layer:
|
|
|
|
- `frontend/src/components/frameworks/WalkThroughCheckIn.tsx`
|
|
- `frontend/src/components/frameworks/WalkThroughForm.tsx`
|
|
- `frontend/src/components/frameworks/WalkThroughSummary.tsx`
|
|
- `frontend/src/components/walkthrough-checkin/`
|
|
- `frontend/src/components/walkthrough-form/`
|
|
- `frontend/src/components/walkthrough-summary/`
|
|
|
|
Business logic layer:
|
|
|
|
- `frontend/src/business/walkthrough/hooks.ts`
|
|
- `frontend/src/business/walkthrough/formHooks.ts`
|
|
- `frontend/src/business/walkthrough/mappers.ts`
|
|
- `frontend/src/business/walkthrough/selectors.ts`
|
|
- `frontend/src/business/walkthrough/types.ts`
|
|
- `frontend/src/business/walkthrough/validators.ts`
|
|
|
|
API/data access layer:
|
|
|
|
- `frontend/src/shared/api/walkthrough.ts`
|
|
- `frontend/src/shared/types/walkthrough.ts`
|
|
- `frontend/src/shared/constants/walkthrough.ts`
|
|
|
|
## Behavior
|
|
|
|
- Check-in history and summary data load from `GET /api/walkthrough_checkins`.
|
|
- New check-ins are saved through `POST /api/walkthrough_checkins`.
|
|
- Delete support exists in the typed API/business layer for future view controls.
|
|
- Shared constants own rating categories, staff options, time ranges, and display labels.
|
|
- `useWalkthroughCheckInPage` owns check-in page tabs, refresh, submit orchestration, loading/submitting/error state, stats, and history rows.
|
|
- Business selectors own rating lookup, check-in stats, history row mapping, averages, trends, flags, recognitions, and status colors.
|
|
- Business validators own walk-through form submission readiness.
|
|
- `WalkThroughCheckIn.tsx` is a thin wrapper that renders focused check-in components under `frontend/src/components/walkthrough-checkin/`.
|
|
- `useWalkthroughForm` owns form draft state, rating/comment updates, submit DTO construction, and submitted/reset state.
|
|
- `WalkThroughForm.tsx` is a thin wrapper that renders focused form components under `frontend/src/components/walkthrough-form/`.
|
|
- Walk-through form controls use shared UI primitives: `Button`, `Input`, `Textarea`, and `StatePanel` where applicable.
|
|
- `useWalkthroughSummary` owns summary filters, presentation/report mode, growth plan draft state, filtered check-ins, category averages, trend data, teacher frequencies, and generated summary text.
|
|
- `WalkThroughSummary.tsx` is a thin wrapper that renders loading, empty, presentation, printable report, or main summary views.
|
|
|
|
## Remaining Related Work
|
|
|
|
If summaries need server-side aggregation for reporting, add a backend summary endpoint. Keep the frontend selector calculations for local display only.
|