Document Obtaining

The largest feature in Renewa One — a complex multi-step workflow for collecting documents from customers. Spans 59 frontend components, 19 database tables, and dedicated backend route directories. Drives the full cycle from requesting documents through customer upload, review, approval, and rejection.

Source Files

LayerPath
Schemabackend/src/db/schema.ts
Routesbackend/src/routes/document-obtaining/ (batches, collections, fulfillments, reminders, help requests)
Batch Servicebackend/src/services/document-request-batch-service.ts
Dashboard Servicebackend/src/services/document-obtaining-dashboard-service.ts
Dashboard Pagefrontend/src/pages/internal/DocumentObtainingDashboard.tsx
Detail Pagesfrontend/src/pages/internal/DocumentObtainingSets.tsx, DocumentObtainingDocs.tsx, DocumentObtainingCollections.tsx, DocumentObtainingDetail.tsx
Componentsfrontend/src/components/document-obtaining/ (59 files)
Filter Contextfrontend/src/contexts/ResponsibilityFilterContext.tsx

Database Tables

TablePurpose
documentObtainingRoot entity linking a document-obtaining process to a project
documentObtainingRequestsIndividual document requests within a process
documentObtainingRequestBatchesGroups of requests sent together to a customer
documentObtainingFulfillmentsCustomer uploads fulfilling a request
documentObtainingNotificationsNotification records (email/SMS sent to customer)
documentObtainingReminderHistoryTracks when reminders were sent
documentObtainingHelpRequestsCustomer help requests when stuck
documentObtainingActivityLogsComprehensive activity trail
documentObtainingEmailTemplatesConfigurable email templates for notifications
documentObtainingFormDraftsSaved draft state for Forms filled by customers
documentObtainingReviewChecklistResultsReview checklist outcomes per document
documentObtainingRejectionBundlesGroups of rejected documents sent back together
documentObtainingRejectionReasonsPredefined rejection reasons
documentObtainingCollectionsLogical groupings of document requests (e.g., “Funding Docs”, “Building Docs”)

Core Workflow

  1. Create collection — group document requests into a collection for a project
  2. Assign documents — select which documents are needed, set due dates
  3. Send to customer — batch requests sent via Portal with email/SMS Notifications
  4. Customer uploads — customer fills Forms or uploads Files through the portal
  5. Review — internal staff review submissions via Document Review checklists
  6. Approve or reject — approved documents are finalized; rejected ones are bundled with reasons and sent back for resubmission

Key Features

  • Batch operations — send, remind, or reject multiple documents at once
  • Reminder system — automated and manual reminders with configurable email templates and history tracking
  • Help requests — customers can flag difficulties; staff sees these on the dashboard
  • Rejection bundles — group rejections with structured reasons so customers understand what to fix
  • Activity logging — every action (send, upload, review, reject) is recorded in documentObtainingActivityLogs
  • Department filtering — dashboard uses ResponsibilityFilterContext to scope views by Departments

Frontend Architecture

The 59 components in frontend/src/components/document-obtaining/ cover:

AreaExamples
DashboardStats cards, filters, batch action bar
CollectionsCollection list, collection detail, document assignment
FulfillmentsUpload progress, fulfillment preview, review panel
RemindersReminder dialog, template selector, history view
RejectionsRejection bundle builder, reason picker
HelpHelp request list, help request detail

Relationships

DocumentObtaining *──1 Project
DocumentObtaining 1──* DocumentObtainingCollections
Collection 1──* DocumentObtainingRequests
Request 1──* Fulfillments ──* Files
Request 1──* Notifications
Request 1──* ReminderHistory
Request *──1 DocumentTemplate

Documents | Document Review | Files | Portal | Forms | Form Builder | Notifications | Departments | Users | Projects | Service Layer Pattern