From automation
Complete guide to building document exchange pages. A document exchange page lets users upload, download, and manage documents organized into collapsible request groups. Use when building, modifying, or debugging any document exchange page, document upload/download feature, or dokumente page in the finstreet context.
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin finstreet-fe-claude-pluginsThis skill uses the workspace's default tool permissions.
A document exchange page lets users manage documents organized into collapsible request groups. Each group contains document request cards that support upload, download, and delete. The feature is split by portal (FSP vs PM), but shares common actions, a sorting hook, a zustand store, and backend models.
actions.mdcomponents.mdevals/evals.jsonevals/files/eval-1/DocumentExchangePageContent.tsxevals/files/eval-1/DocumentExchangeRequestDisplay.tsxevals/files/eval-1/DocumentExchangeRequestGroup.tsxevals/files/eval-2/DocumentExchangePageContent.tsxevals/files/eval-2/DocumentExchangeRequestDisplay.tsxevals/files/eval-2/DocumentExchangeRequestGroup.tsxshared.mdSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
A document exchange page lets users manage documents organized into collapsible request groups. Each group contains document request cards that support upload, download, and delete. The feature is split by portal (FSP vs PM), but shares common actions, a sorting hook, a zustand store, and backend models.
Page (server) → Header (client) + PageContent (client)
↓
RequestGroup (client) × N
↓
RequestDisplay (client) × N per group
↓
DocumentRequest (from @finstreet/ui)
Shared files live in common/ and at the feature root. Portal-specific components live in fsp/ or pm/.
src/features/documentExchange/
├── store.ts ← zustand toggle for "hide completed"
├── useSortRequestsByRequestGroup.ts ← sorts requests into 4 groups
├── common/
│ ├── actions/
│ │ ├── documentExchangeUploadAction.ts
│ │ ├── documentExchangeDownloadDocumentAction.ts
│ │ ├── documentExchangeDeleteDocumentAction.ts
│ │ └── documentExchangeRefetchAction.ts
│ └── components/
│ └── DocumentExchangeLoading.tsx
└── {portal}/ ← fsp or pm
└── components/
├── DocumentExchangePageContent.tsx
├── DocumentExchangeRequestGroup.tsx
└── DocumentExchangeRequestDisplay.tsx
When creating a document exchange for a new product/portal:
| Feature | FSP | PM |
|---|---|---|
| Message modal | Yes (DocumentRelatedMessageModal) | No |
| DocumentTags | Yes | No |
| sendMessage callback | Yes | No |
| Progress text color | text.dark | text.light |
| Header wraps | FspFinancingCaseOverviewSubPageHeader | PropertyManagementCaseDetailsPageSubHeader |
Both portals share: common actions, store, sorting hook, loading component, and backend.
"use client" — they use hooks (state, translations, zustand store)DocumentRequest component from @finstreet/ui handles the actual upload/download UIcommon/actions/ — only adjust revalidatePath routes for new productsgetRequestsWithDocumentsdocumentExchange for all componentsuseTranslations from next-intl (not useExtracted)export const) for components