How tharns1999-cmyk/qms-portal_newversion works
This repository appears to be a document-control application: users manage controlled documents, route document action requests (DARs) for review and approval, and handle periodic reviews and controlled copies. The React app routes users to these workflows and keeps application state in a persisted Zustand store; a separate Express backend exposes controlled-copy operations. The README is only a Vite template and documents no product capabilities. Several routes and services are unsampled, so those branches are included from the tree, while edges are limited to relationships evidenced by excerpts or the SOURCE INDEX.
Main entry points: App.jsx React application · useStore.js Workflow state · index.js HTTP API and reports · PeriodicReviewService.js Schedule and task rules
Components 32
Application Shell
- React application
src/App.jsx - Navigation shell
src/components/layout/Layout.jsx - Route access
src/components/auth/ProtectedRoute.jsx - Workflow state
src/store/useStore.js - SLA lifecycle timer
src/components/SLAEngine.jsx - Operations dashboard
src/pages/Dashboard/Dashboard.jsx
Document Actions
- DAR authoring
src/pages/DarWorkflow/DarNewForm.jsx - DAR revision and obsolescence
src/pages/DarWorkflow/DarRevisionForm.jsx - Task inbox
src/pages/Tasks/TaskInbox.jsx - Task review
src/pages/Tasks/TaskReview.jsx - DAR inspection
src/components/workflow/DarReviewModal.jsx - Reviewer resolution
src/utils/workflowResolver.js
Periodic Reviews
- Review dashboard
src/pages/PeriodicReviews/PeriodicReviewDashboard.jsx - My review tasks
src/pages/PeriodicReviews/MyReviewTasks.jsx - Review detail
src/pages/PeriodicReviews/PeriodicReviewDetail.jsx - Schedule and task rules
src/services/PeriodicReviewService.js - Review permissions
src/services/PeriodicReviewAccessService.js - Review-to-DAR linkage
src/services/PeriodicReviewDarLinkService.js
Document Control
- Document library
src/pages/Library/Library.jsx - Controlled-copy register
src/pages/ControlledCopy/ControlledCopyRegister.jsx - External documents
src/pages/ExternalDocs/ExternalDocsList.jsx - Master data administration
src/pages/Admin/MasterDataHub.jsx - PDF watermarking
src/services/UniversalWatermarkService.js
Controlled Copy Backend
- HTTP API and reports
backend/index.js - Copy number allocation
backend/services/CcNumberService.js - Copy PDF issuance
backend/services/PdfService.js - Copy replacement
backend/services/ReplacementService.js - PDF stamping
backend/utils/PdfStamper.js - Effective-date job
backend/jobs/AutoEffectiveJob.js - Recall escalation job
backend/jobs/RecallEscalationJob.js
Other components
- Staff user
- PostgreSQL
Connections 39
- Staff user → React application: uses
src/App.jsx - React application → Navigation shell: routes through
src/App.jsx - React application → SLA lifecycle timer: mounts
src/App.jsx - React application → Workflow state: initializes reviews
src/App.jsx - React application → Route access: guards routes
src/App.jsx - Route access → Workflow state: reads user state
src/components/auth/ProtectedRoute.jsx - SLA lifecycle timer → Workflow state: checks SLA
src/components/SLAEngine.jsx - React application → DAR authoring: routes to
src/App.jsx - React application → DAR revision and obsolescence: routes to
src/App.jsx - React application → Task inbox: routes to
src/App.jsx - React application → Task review: routes to
src/App.jsx - Task review → DAR inspection: renders
src/pages/Tasks/TaskReview.jsx - Task review → Workflow state: reads and updates
src/pages/Tasks/TaskReview.jsx - Workflow state → Reviewer resolution: resolves reviewers
src/store/useStore.js - Staff user → Review dashboard: opens
- Review dashboard → Review permissions: checks access
src/pages/PeriodicReviews/PeriodicReviewDashboard.jsx - Review dashboard → Schedule and task rules: uses schedules
src/pages/PeriodicReviews/PeriodicReviewDashboard.jsx - Review dashboard → Review detail: opens detail
src/pages/PeriodicReviews/PeriodicReviewDashboard.jsx - My review tasks → Schedule and task rules: uses review rules
src/pages/PeriodicReviews/MyReviewTasks.jsx - Review detail → Review permissions: checks access
src/pages/PeriodicReviews/PeriodicReviewDetail.jsx - Review detail → Schedule and task rules: uses review rules
src/pages/PeriodicReviews/PeriodicReviewDetail.jsx - Workflow state → Schedule and task rules: generates schedules
src/store/useStore.js - Workflow state → Review-to-DAR linkage: syncs completed DARs
src/store/useStore.js - Review-to-DAR linkage → Schedule and task rules: calculates next date
src/services/PeriodicReviewDarLinkService.js - React application → Document library: routes to
src/App.jsx - React application → Controlled-copy register: routes to
src/App.jsx - React application → External documents: routes to
src/App.jsx - React application → Master data administration: routes to
src/App.jsx - Controlled-copy register → PDF watermarking: uses watermarking
src/pages/ControlledCopy/ControlledCopyRegister.jsx - HTTP API and reports → Copy number allocation: allocates numbers
backend/index.js - HTTP API and reports → Copy PDF issuance: issues copy PDF
backend/index.js - HTTP API and reports → Copy replacement: configures service
backend/index.js - Copy replacement → Copy PDF issuance: fetches original PDF
backend/services/ReplacementService.js - Copy replacement → PDF stamping: stamps replacement
backend/services/ReplacementService.js - Copy PDF issuance → PDF stamping: uses stamper
backend/services/PdfService.js - HTTP API and reports → PostgreSQL: queries
backend/index.js - Copy replacement → PostgreSQL: reads and writes
backend/services/ReplacementService.js - HTTP API and reports → Effective-date job: loads job
backend/index.js - HTTP API and reports → Recall escalation job: loads job
backend/index.js