# 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.