How splaika/ctn-prototype works
CTN Suite is a SharePoint-hosted clinical-trial-notification workflow for drafting, reviewing, approving, submitting, and generating CTN XML. The SPFx web part selects the data source and user role, then hosts the application; the repository persists notification and master data in SharePoint lists. The README also documents setup, role-based access, and the shared UI/domain-logic source. Several domain modules are unsampled, so their links are shown only where documented; the graph omits uncertain implementation details.
Main entry points: CtnApp.tsx Workflow app · CtnSuiteWebPart.ts SPFx host · sharepointRepository.ts SharePoint repository · spClient.ts SharePoint REST client
Components 19
SharePoint host
- SPFx host
ctn-spfx/src/webparts/ctnSuite/CtnSuiteWebPart.ts - Setup screen
ctn-spfx/src/webparts/ctnSuite/SetupView.tsx - Host styles
ctn-spfx/src/webparts/ctnSuite/hostStyles.ts
CTN workflow
- Workflow app
ctn-spfx/src/webparts/ctnSuite/CtnApp.tsx - Notification authoring
demo/app/src/ctn/components/CreateWizard.tsx - Dashboard
demo/app/src/ctn/components/Dashboard.tsx - Notification list
demo/app/src/ctn/components/NotificationList.tsx - Review and approval
demo/app/src/ctn/components/NotificationDetail.tsx - PDF import
demo/app/src/ctn/components/ImportView.tsx
Domain services
- CTN XML output
demo/app/src/ctn/xml.ts - CTN rules
demo/app/src/ctn/logic.ts - Role permissions
demo/app/src/ctn/permissions.ts
Persistence and setup
- Role resolver
ctn-spfx/src/data/roleResolver.ts - SharePoint repository
ctn-spfx/src/data/sharepointRepository.ts - SharePoint REST client
ctn-spfx/src/data/spClient.ts - List provisioning
ctn-spfx/src/data/listProvisioner.ts - SharePoint lists
- In-memory client
ctn-spfx/src/data/fakeSpClient.ts
Other components
- CTN users
Connections 21
- CTN users → SPFx host: uses
README.md - SPFx host → Workflow app: hosts
ctn-spfx/src/webparts/ctnSuite/CtnSuiteWebPart.ts - SPFx host → SharePoint repository: injects
ctn-spfx/src/webparts/ctnSuite/CtnSuiteWebPart.ts - SPFx host → Role resolver: resolves role
ctn-spfx/src/webparts/ctnSuite/CtnSuiteWebPart.ts - SPFx host → Setup screen: shows setup
ctn-spfx/src/webparts/ctnSuite/CtnSuiteWebPart.ts - SPFx host → Host styles: applies styles
ctn-spfx/src/webparts/ctnSuite/CtnSuiteWebPart.ts - Setup screen → List provisioning: starts setup
ctn-spfx/src/webparts/ctnSuite/SetupView.tsx - List provisioning → SharePoint lists: creates lists
ctn-spfx/src/data/listProvisioner.ts - Workflow app → Dashboard: renders
ctn-spfx/src/webparts/ctnSuite/CtnApp.tsx - Workflow app → Notification list: renders
ctn-spfx/src/webparts/ctnSuite/CtnApp.tsx - Workflow app → PDF import: renders
ctn-spfx/src/webparts/ctnSuite/CtnApp.tsx - Workflow app → Notification authoring: supports drafting
README.md - Workflow app → Review and approval: supports workflow
README.md - Workflow app → SharePoint repository: loads and saves
ctn-spfx/src/webparts/ctnSuite/CtnApp.tsx - SharePoint repository → SharePoint REST client: calls
ctn-spfx/src/data/sharepointRepository.ts - SharePoint REST client → SharePoint lists: reads and writes
ctn-spfx/src/data/spClient.ts - SharePoint repository → CTN rules: normalizes data
ctn-spfx/src/data/sharepointRepository.ts - SharePoint repository → Role permissions: checks access
ctn-spfx/src/data/sharepointRepository.ts - Role resolver → Role permissions: maps roles
ctn-spfx/src/data/roleResolver.ts - Workflow app → CTN XML output: generates XML
README.md - In-memory client → SharePoint REST client: implements interface
ctn-spfx/src/data/fakeSpClient.ts