# Product Context — PEDW FrontEnd ## Primary user workflows 1. **Public discovery** - Search planning cases (basic, advanced, address, DNS). - Open case summary pages and review documents/history. 2. Authenticated portal (`/myportal/**`) - Sign in via magic-link email. - View dashboards/worklists (my cases, watched cases, awaiting submission, representations). - Start or continue appeal/representation submission flows. 3. **Role-shaped behavior** - General users can create appeals and representations. - LPA users get authority-scoped views and representation actions; raise-appeal behavior is restricted. ## Core domain concepts - **Case / Incident**: core planning entity shown in search, detail, and portal journeys. - **Appeal type**: controls collection/field behavior and some UI logic. - **Representation window**: date-gated period controlling whether representation actions are available. - **Watched case / email notifications**: user subscriptions to case changes. - **DNS**: Developments of National Significance-specific journey and pages. ## Business logic patterns visible in code - Case summary UI varies by appeal type and case attributes. - Representation actions are conditionally shown by appeal type, role, and date windows. - Locale-sensitive behavior affects links, routes, labels, and email template choice. - New-case-reference notifications include preferred-language checks before template selection. ## Important user-facing behaviors - Welsh route aliases are mapped in `next.config.js` and must remain in sync with page behavior. - Breadcrumb/back-navigation behavior is actively maintained across search -> case -> portal routes. - Document visibility/download flows are central to case transparency and must remain stable.