Skip to main content

Concrete Component/Route Structure

A pragmatic React app structure for the DMS GUI.

Route Structure

RoutePurpose
/loginAuthentication
/onboardingNew user onboarding
/dashboardPersonalized overview (recent docs, tasks, approvals)
/documentsGlobal library with filters and views
/spaces/:spaceIdProject/department spaces with scoped docs
/documents/:documentIdDocument detail with preview, metadata, activity
/tasksApprovals, review requests
/admin/*Policies, roles, audit, tenants

Key Components

Layout Components

ComponentDescription
AppShellSidebar, topbar, routing outlet
LeftSidebarGlobal navigation
TopBarSearch, user menu, quick actions

Search Components

ComponentDescription
GlobalSearchBarGlobal search with typeahead
SavedSearchListUser's saved searches
FacetFilterPanelFaceted search filters

Document Components

ComponentDescription
DocumentTableVirtualized table view
DocumentGridCard grid view
BreadcrumbNavigation breadcrumbs
FileTreeHierarchical tree view

Detail Components

ComponentDescription
DocumentPreviewFile preview/viewer
MetadataPanelMetadata display/edit
VersionTimelineVersion history
ActivityFeedActivity log

Collaboration Components

ComponentDescription
CommentsPanelThreaded comments
TaskListDocument tasks
SharePermissionsDrawerSharing/permissions UI

Workflow Components

ComponentDescription
WorkflowBoardKanban workflow view
AdminAuditLogAudit log viewer
PolicyListPolicy 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."