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
| Layer | Path |
|---|---|
| Schema | backend/src/db/schema.ts |
| Routes | backend/src/routes/document-obtaining/ (batches, collections, fulfillments, reminders, help requests) |
| Batch Service | backend/src/services/document-request-batch-service.ts |
| Dashboard Service | backend/src/services/document-obtaining-dashboard-service.ts |
| Dashboard Page | frontend/src/pages/internal/DocumentObtainingDashboard.tsx |
| Detail Pages | frontend/src/pages/internal/DocumentObtainingSets.tsx, DocumentObtainingDocs.tsx, DocumentObtainingCollections.tsx, DocumentObtainingDetail.tsx |
| Components | frontend/src/components/document-obtaining/ (59 files) |
| Filter Context | frontend/src/contexts/ResponsibilityFilterContext.tsx |
Database Tables
| Table | Purpose |
|---|---|
documentObtaining | Root entity linking a document-obtaining process to a project |
documentObtainingRequests | Individual document requests within a process |
documentObtainingRequestBatches | Groups of requests sent together to a customer |
documentObtainingFulfillments | Customer uploads fulfilling a request |
documentObtainingNotifications | Notification records (email/SMS sent to customer) |
documentObtainingReminderHistory | Tracks when reminders were sent |
documentObtainingHelpRequests | Customer help requests when stuck |
documentObtainingActivityLogs | Comprehensive activity trail |
documentObtainingEmailTemplates | Configurable email templates for notifications |
documentObtainingFormDrafts | Saved draft state for Forms filled by customers |
documentObtainingReviewChecklistResults | Review checklist outcomes per document |
documentObtainingRejectionBundles | Groups of rejected documents sent back together |
documentObtainingRejectionReasons | Predefined rejection reasons |
documentObtainingCollections | Logical groupings of document requests (e.g., “Funding Docs”, “Building Docs”) |
Core Workflow
- Create collection — group document requests into a collection for a project
- Assign documents — select which documents are needed, set due dates
- Send to customer — batch requests sent via Portal with email/SMS Notifications
- Customer uploads — customer fills Forms or uploads Files through the portal
- Review — internal staff review submissions via Document Review checklists
- 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
ResponsibilityFilterContextto scope views by Departments
Frontend Architecture
The 59 components in frontend/src/components/document-obtaining/ cover:
| Area | Examples |
|---|---|
| Dashboard | Stats cards, filters, batch action bar |
| Collections | Collection list, collection detail, document assignment |
| Fulfillments | Upload progress, fulfillment preview, review panel |
| Reminders | Reminder dialog, template selector, history view |
| Rejections | Rejection bundle builder, reason picker |
| Help | Help 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
Related Pages
Documents | Document Review | Files | Portal | Forms | Form Builder | Notifications | Departments | Users | Projects | Service Layer Pattern