Portal

Customer-facing portal for document submission, form filling, and appointment booking. Uses separate token-based Authentication (not session-based).

Architecture

LayerLocation
Routesbackend/src/routes/portal/
Service (orchestrator)backend/src/services/portal-service.ts
Sub-servicesbackend/src/services/portal/ — portal-access, portal-fulfillment, portal-freeform, portal-form, portal-download, portal-help, portal-notification, portal-pdf
Auth middlewarebackend/src/middleware/portal-auth.ts
Appointment authbackend/src/middleware/appointment-portal-auth.ts
Pagesfrontend/src/pages/portal/ (+ frontend/src/pages/PortalAppointmentView.tsx)
Componentsfrontend/src/components/portal/ (27 files)
Queriesfrontend/src/lib/queries/portalQueries.ts, portalAppointmentQueries.ts

Portal Pages

PagePurpose
PortalDashboardCustomer overview with pending tasks
PortalFormPageForm wizard for customer data entry
PortalAppointmentViewAppointment booking and management (lives at frontend/src/pages/PortalAppointmentView.tsx)
PortalTokenErrorPageToken validation error handling

Key Components

ComponentPurpose
PortalDocumentUploadModalUpload documents for Document Obtaining
PortalDocumentTable / PortalDocumentCardDisplay document status
DocumentChecklistTrack required document submission progress
PortalHelpChatDialog / PortalStickyChatbotIn-portal help chat
FormWizard/Multi-step form rendering (see Form Builder)
PortalNotificationBellIn-app Notifications
PortalUploadZoneDrag-and-drop file upload area

Features

  • Document upload — customers upload required Documents through a guided checklist
  • Form wizard — multi-step forms created with Form Builder, rendered for customer completion
  • Appointment booking — schedule and manage Appointments with renovation team
  • Help chat — contextual help via sticky chatbot
  • Notification bell — real-time portal Notifications

Document Upload Flow

Uploads go through portal-fulfillment-service.ts in two steps: (1) the file streams into CAS via FileService and a pending fulfillment row is created with the fileId; (2) submitFulfillments() transitions pending fulfillments to submitted and updates the collection request. Since PR#2005, each upload also enters the canonical file chain (collection → member → version, plus an opportunistic project link) introduced by PR#1752; freeform uploads run through portal-freeform-service.ts.

Authentication Flow

Portal tokens are issued per-project and sent to customers via email or SMS. The token grants scoped access to a specific project’s portal view, without requiring a full user account. For local testing, mock demo customers exist (e.g. max.mustermann@example.de / Test123!) and log in through the normal login form.