Concrete Component/Route Structure
A pragmatic React app structure for the DMS GUI.
Route Structure
| Route | Purpose |
|---|---|
/login | Authentication |
/onboarding | New user onboarding |
/dashboard | Personalized overview (recent docs, tasks, approvals) |
/documents | Global library with filters and views |
/spaces/:spaceId | Project/department spaces with scoped docs |
/documents/:documentId | Document detail with preview, metadata, activity |
/tasks | Approvals, review requests |
/admin/* | Policies, roles, audit, tenants |
Key Components
Layout Components
| Component | Description |
|---|---|
AppShell | Sidebar, topbar, routing outlet |
LeftSidebar | Global navigation |
TopBar | Search, user menu, quick actions |
Search Components
| Component | Description |
|---|---|
GlobalSearchBar | Global search with typeahead |
SavedSearchList | User's saved searches |
FacetFilterPanel | Faceted search filters |
Document Components
| Component | Description |
|---|---|
DocumentTable | Virtualized table view |
DocumentGrid | Card grid view |
Breadcrumb | Navigation breadcrumbs |
FileTree | Hierarchical tree view |
Detail Components
| Component | Description |
|---|---|
DocumentPreview | File preview/viewer |
MetadataPanel | Metadata display/edit |
VersionTimeline | Version history |
ActivityFeed | Activity log |
Collaboration Components
| Component | Description |
|---|---|
CommentsPanel | Threaded comments |
TaskList | Document tasks |
SharePermissionsDrawer | Sharing/permissions UI |
Workflow Components
| Component | Description |
|---|---|
WorkflowBoard | Kanban workflow view |
AdminAuditLog | Audit log viewer |
PolicyList | Policy management |
Suggested File Structure
src/
├── components/
│ ├── layout/
│ │ ├── AppShell.tsx
│ │ ├── LeftSidebar.tsx
│ │ └── TopBar.tsx
│ ├── search/
│ │ ├── GlobalSearchBar.tsx
│ │ ├── SavedSearchList.tsx
│ │ └── FacetFilterPanel.tsx
│ ├── documents/
│ │ ├── DocumentTable.tsx
│ │ ├── DocumentGrid.tsx
│ │ ├── Breadcrumb.tsx
│ │ └── FileTree.tsx
│ ├── detail/
│ │ ├── DocumentPreview.tsx
│ │ ├── MetadataPanel.tsx
│ │ ├── VersionTimeline.tsx
│ │ └── ActivityFeed.tsx
│ ├── collaboration/
│ │ ├── CommentsPanel.tsx
│ │ ├── TaskList.tsx
│ │ └── SharePermissionsDrawer.tsx
│ └── workflow/
│ ├── WorkflowBoard.tsx
│ ├── AdminAuditLog.tsx
│ └── PolicyList.tsx
├── pages/
│ ├── LoginPage.tsx
│ ├── OnboardingPage.tsx
│ ├── DashboardPage.tsx
│ ├── DocumentsPage.tsx
│ ├── SpacePage.tsx
│ ├── DocumentDetailPage.tsx
│ ├── TasksPage.tsx
│ └── admin/
│ ├── PoliciesPage.tsx
│ ├── RolesPage.tsx
│ ├── AuditPage.tsx
│ └── TenantsPage.tsx
├── hooks/
│ ├── useDocuments.ts
│ ├── useSearch.ts
│ ├── useWorkflow.ts
│ └── usePermissions.ts
├── services/
│ ├── documentService.ts
│ ├── searchService.ts
│ ├── workflowService.ts
│ └── authService.ts
└── types/
├── document.ts
├── search.ts
├── workflow.ts
└── permission.ts
Follow-up Prompt for Next Iteration
"Design a React component architecture (with TypeScript interfaces) for a multi-tenant document management GUI that includes: global search, faceted document browsing, document detail with preview/versioning, collaboration (comments/tasks), and lifecycle workflows (review/approval/retention). Assume a separate backend API; focus on React components, state management, and routing patterns."