# FRAME Frontend Integration

## Purpose

FRAME follows the frontend three-layer architecture for persisted action-plan entries.

```text
View -> Business Logic -> API/Data Access -> Backend
```

## Files

View layer:

- `frontend/src/components/frameworks/FrameModule.tsx`
- `frontend/src/components/frame/`
- `frontend/src/components/frameworks/Dashboard.tsx`
- `frontend/src/components/dashboard/DashboardFramePreview.tsx`
- `frontend/src/components/frameworks/DirectorDashboard.tsx`
- `frontend/src/components/director-dashboard/DirectorRecentFramePanel.tsx`

Business logic layer:

- `frontend/src/business/frame/hooks.ts`
- `frontend/src/business/frame/mappers.ts`
- `frontend/src/business/frame/selectors.ts`
- `frontend/src/business/frame/types.ts`
- `frontend/src/business/dashboard/hooks.ts`
- `frontend/src/business/director-dashboard/hooks.ts`
- `frontend/src/business/director-dashboard/selectors.ts`

API/data access layer:

- `frontend/src/shared/api/frame.ts`
- `frontend/src/shared/types/frame.ts`

Constants:

- `frontend/src/shared/constants/frame.ts`

## Behavior

- FRAME entries load from `GET /api/frame_entries`.
- Create/update workflows use typed API calls and React Query mutations.
- `FrameModule.tsx` is a thin wrapper that calls `useFrameModule` and renders focused FRAME view components.
- FRAME view components use shared UI primitives: `Button`, `Input`, `Textarea`, and `StatePanel`.
- Static FRAME sample entries are not used as runtime persisted-data substitutes.
- Empty and error states are rendered explicitly.
- Dynamic F/R/A/M/E field access is typed through `FrameSectionKey`.
- Director dashboard renders recent FRAME previews through director dashboard selectors instead of deriving preview rows in JSX.
- Home dashboard renders the latest FRAME entry through `useDashboardPage` and `DashboardFramePreview`.

## Remaining Related Work

Dashboard zone check-ins are owned by the dashboard business layer and user progress API, not by FRAME.
