Overview

This document is a single-page navigator for two enterprise modules in the GB5 backend & frontend: WI Work Instruction and CMS Content Management System. For every feature you'll find the BE C# file paths (DAL / BLL / SL) and the matching FE Angular file paths (services, components, models).

Use the search box in the left sidebar to filter section headings. Use the back-to-top button bottom-right to jump back. Every section has a stable anchor for deep linking.

Architecture Diagram

Browser / Mobile
      │
Angular 20 FE  ←─── projects/wi/ and projects/cms/
      │  HTTP
      ▼
FastEndpoints SL  ←─── WiSL / CMSSL
      │
BLL (Business Logic)  ←─── WiBLL / CMSBLL
      │
DAL (Data Access)  ←─── WiDAL / CMSDAL
      │  Dapper + raw SQL
SQL Server (WI.* and DBO.* schemas)

Three-Layer Pattern

SL (*.cs in EndPoints/) → BaseEndpoint<TReq, TResp>
  ↓ injects IBll
BLL (*.cs in WiBLL/) → validates, orchestrates
  ↓ injects IDal
DAL (*.cs in WiDAL/CustomCode/) → IQueryExecutor → Dapper
  ↑ SQL constants in WiDAL/Query/Wi/*QB.cs
Layer rules.
  • SL must never call DAL directly — always go through BLL.
  • BLL must never reference ASP.NET types (HttpContext, etc.).
  • DAL must never contain business logic; only data retrieval/mutation.
  • All SQL lives in *QB.cs files — never inline in BLL or DAL.

Legend & Conventions

BadgeMeaning
BEBackend / C# (DAL, BLL, SL)
FEFrontend / Angular 20
DBDatabase / SQL Server table or query
APIHTTP endpoint / route
WIWork Instruction module (blue accent)
CMSContent Management module (green accent)

WI BE Section 1: WI Module — Backend (C#)

1.1 Database Schema DB

WI tables live in the WI. schema. Supplementary infrastructure tables (workstations, lines, rosters) live in the DBO. schema.

TableSchemaPurpose
MWIPROCESSWIProcess hierarchy root
MWISUBPROCESSWISubProcess within a Process
MWIWIWI document header (title, version, status, etc.)
MWISECTIONWIOrdered sections within a WI
MWISTEPWISteps within a section; WORKSTATIONID column (-1 = inherit)
MWISTEPCONTENTWIContent blocks per step; CONTAINERID / CONTAINERTYPE / ZONENAME columns
MWIASSIGNMENTWISpecificity-scored assignment rules (WI ↔ Workstation/Line/Model/Routing)
MWIACTIVITYSCHEDULEWIScheduled maintenance activities
MWORKSTATIONCONFIGWIPer-workstation display configuration
MWISKILLREQUIREMENTWIRequired skills for a WI
MWICOMPETENCYREQUIREMENTWIRequired competencies for a WI
TWIEXECUTIONWIExecution run header (start/complete/flag)
TWISTEPEXECUTIONWIPer-step execution record (actual duration)
TWIACKNOWLEDGEMENTWIOperator acknowledgement record
LWIVERSIONWIImmutable version change log
MWORKSTATIONDBOWorkstation master (code, type, workcenter)
MPRODUCTIONLINESTATIONDBOAppend-only: which workstations are on each line
TLINESHIFTROSTERDBOShift roster header (line + shift + date)
TLINESHIFTSTAFFINGDBOWho is staffed at which workstation for a roster
MLINEOPERATIONMAPDBOV4 flat: maps production line + routing detail → workstation
DDL & Migration Files.
  • Full DDL: DB/Schema/wi-complete-ddl.sql
  • Container evolution migration: DB/Migrations/20260610_WI_StepContentContainerEvolution.sql

1.2 Query Builders (SQL Constants) BE

All SQL lives in *QB.cs files as public const string. Never embedded inline in BLL/DAL.

QB FilePathKey Constants
WiMasterQBWiDAL/Query/Wi/WiMasterQB.csGET_WI_LIST, GET_WI_BY_ID, GET_WI_FULL_DETAIL, SAVE_WI, GET_STEPS_WITH_EFFECTIVE_WORKSTATION
WiSectionQBWiDAL/Query/Wi/WiSectionQB.csGET_SECTIONS, SAVE_SECTION, DELETE_SECTION
WiStepQBWiDAL/Query/Wi/WiStepQB.csGET_STEPS, SAVE_STEP, DELETE_STEP (includes WORKSTATIONID)
WiStepContentQBWiDAL/Query/Wi/WiStepContentQB.csGET_CONTENTS, SAVE_CONTENT, DELETE_CONTENT (includes container columns)
WiAssignmentQBWiDAL/Query/Wi/WiAssignmentQB.csGET_BY_WI, SAVE_ASSIGNMENT, RESOLVE_FOR_WORKSTATION
WiExecutionQBWiDAL/Query/Wi/WiExecutionQB.csINSERT_EXECUTION, UPDATE_STEP_STATUS, COMPLETE_EXECUTION, CHECK_ACK, SAVE_ACK
WiAnalyticsQBWiDAL/Query/Wi/WiAnalyticsQB.csGET_EXECUTION_HISTORY, GET_TIME_STUDY, GET_COMPLIANCE_SUMMARY
WorkstationQBWiDAL/Query/Wi/WorkstationQB.csGET_LIST, GET_BY_ID, INSERT, UPDATE, GET_SELECT_LIST
LineStationQBWiDAL/Query/Wi/LineStationQB.csGET_CURRENT_BY_LINE, CLOSE_CURRENT, INSERT_NEW
LineRosterQBWiDAL/Query/Wi/LineRosterQB.csGET_ROSTER_HEADER, INSERT_ROSTER, GET_STAFFING_BY_ROSTER, INSERT_STAFFING, MARK_ABSENT, GET_PLANNED_VS_ACTUAL
LineMapQBWiDAL/Query/Wi/LineMapQB.csGET_CURRENT_MAP, GET_STAFFING_GAP, CLOSE_CURRENT, INSERT_NEW
WiProcessQBWiDAL/Query/Wi/WiProcessQB.csGET_LIST, GET_BY_ID, SAVE
WiSkillRequirementQBWiDAL/Query/Wi/WiSkillRequirementQB.csGET_BY_WI, SAVE, DELETE

1.3 DTOs and Enums BE

FilePathKey Types
WiDTO.cs WiDAL/DTO/Wi/WiDTO.cs WiHeaderDTO, WiSectionDTO, WiStepDTO, WiStepContentDTO, WiStepContainerDTO, WiAssignmentDTO, WiExecutionDTO, WorkstationDTO, LineShiftRosterDTO, LineShiftStaffingDTO, LineOperationMapDTO, WiStepSwimLaneDTO, WiExecutionHistoryDTO, WiTimeStudyDTO, WiComplianceSummaryDTO
WiEnums.cs WiDAL/DTO/Wi/WiEnums.cs WiStatus, ContentType (0–9), WiContainerType (Single / TwoColumn / Banner / Accordion / Tab), ContentSource, RosterType, RosterStatus, StaffingRole, WorkstationType

1.4 DAL Layer (Data Access) BE DB

FeatureInterfaceImplementationKey Methods
WI MasterWiDAL/CustomCode/WiMaster/IWiMasterDAL.csWiMasterDAL.csGetWiList, GetWiById, GetWiFullDetail, SaveWiFull, GetVersionHistory, GetStepsWithWorkstationAsync
WI SectionWiDAL/CustomCode/WiSection/IWiSectionDAL.csWiSectionDAL.csGetByWi, Save, Delete
WI StepWiDAL/CustomCode/WiStep/IWiStepDAL.csWiStepDAL.csGetBySection, Save, Delete
WI Step ContentWiDAL/CustomCode/WiStepContent/IWiStepContentDAL.csWiStepContentDAL.csGetByStep, Save, Delete
WI AssignmentWiDAL/CustomCode/WiAssignment/IWiAssignmentDAL.csWiAssignmentDAL.csGetByWi, Save, Delete, ResolveForWorkstation
WI ExecutionWiDAL/CustomCode/WiExecution/IWiExecutionDAL.csWiExecutionDAL.csResolveForWorkstation, StartExecution, UpdateStepStatus, CompleteExecution, CheckAcknowledgement, SaveAcknowledgement
WI AnalyticsWiDAL/CustomCode/WiAnalytics/IWiAnalyticsDAL.csWiAnalyticsDAL.csGetExecutionHistoryAsync, GetTimeStudyAsync, GetComplianceSummaryAsync
WI ProcessWiDAL/CustomCode/WiProcess/IWiProcessDAL.csWiProcessDAL.csGetList, GetById, Save, Delete
WI SubProcessWiDAL/CustomCode/WiSubProcess/IWiSubProcessDAL.csWiSubProcessDAL.csGetList, GetById, Save, Delete
WI VersionWiDAL/CustomCode/WiVersion/IWiVersionDAL.csWiVersionDAL.csGetByWi, Save
WI Skill Req.WiDAL/CustomCode/WiSkillRequirement/IWiSkillRequirementDAL.csWiSkillRequirementDAL.csGetByWi, Save, Delete
WorkstationWiDAL/CustomCode/Workstation/IWorkstationDAL.csWorkstationDAL.csGetListAsync, GetByIdAsync, InsertAsync, UpdateAsync, GetSelectListAsync
Line StationWiDAL/CustomCode/LineStation/ILineStationDAL.csLineStationDAL.csGetCurrentByLineAsync, GetCurrentByWorkstationAsync, CloseCurrentAsync, InsertNewAsync
Line RosterWiDAL/CustomCode/LineRoster/ILineRosterDAL.csLineRosterDAL.csGetRosterHeaderAsync, InsertRosterAsync, GetStaffingAsync, InsertStaffingAsync, MarkAbsentAsync, GetPlannedVsActualAsync
Line MapWiDAL/CustomCode/LineMap/ILineMapDAL.csLineMapDAL.csGetCurrentMapAsync, GetStaffingGapAsync, CloseCurrentAsync, InsertNewAsync

1.5 BLL Layer (Business Logic) BE

Same structure as DAL but adds validation, orchestration, and cache invalidation.

FeatureInterfaceImplementationNotable Business Rules
WI MasterWiBLL/WiMaster/IWiMasterBLL.csWiMasterBLL.csStatus lifecycle (Draft → Review → Approved → Published → Archived); SaveVersionSnapshot on Publish
WI ExecutionWiBLL/WiExecution/IWiExecutionBLL.csWiExecutionBLL.csResolveForWorkstation uses specificity scoring; CompleteStep records actual duration
WI AnalyticsWiBLL/WiAnalytics/IWiAnalyticsBLL.csWiAnalyticsBLL.csPass-through; cache NOT_REQUIRED (always live)
WorkstationWiBLL/Workstation/IWorkstationBLL.csWorkstationBLL.csCache WiWorkstation at CLIENT_LEVEL; invalidate on Save
Line StationWiBLL/LineStation/ILineStationBLL.csLineStationBLL.csAppend-only: close old row + insert new in transaction
Line RosterWiBLL/LineRoster/ILineRosterBLL.csLineRosterBLL.csOnly one ISPRIMARY per workstation per roster; Draft → Confirmed → Closed only
Line MapWiBLL/LineMap/ILineMapBLL.csLineMapBLL.csWorkCenter match validation; append-only save

1.6 SL Layer (FastEndpoints — HTTP) BE API

Base path for all WI endpoints: /wi/{Group}/{Action}.

Endpoint FileHTTPRouteKey ParamsCache
GetWIListGET/WI/GetWIListWiProcessId, WiStatusCLIENT_LEVEL
GetWIByIdGET/WI/GetWIByIdWiIdCLIENT_LEVEL
GetWIFullDetailGET/WI/GetWIFullDetailWiIdCLIENT_LEVEL
SaveWIFullPOST/WI/SaveWIFull(body: WiSaveRequest)null
DeleteWIDELETE/WI/DeleteWIWiIdnull
SubmitForReviewPUT/WI/SubmitForReviewWiIdnull
ApproveWIPUT/WI/ApproveWIWiIdnull
PublishWIPUT/WI/PublishWIWiIdnull
ArchiveWIPUT/WI/ArchiveWIWiIdnull
GetVersionHistoryGET/WI/GetVersionHistoryWiIdCLIENT_LEVEL
GetWiStepsWithWorkstationGET/WI/GetWiStepsWithWorkstationWiIdCLIENT_LEVEL
GetSelectListWIGET/WI/GetSelectListWI—CLIENT_LEVEL
ResolveForWorkstationGET/WiExecution/ResolveForWorkstationWorkstationId, TriggerNOT_REQUIRED
StartExecutionPOST/WiExecution/StartExecution(body)null
CompleteStepPUT/WiExecution/CompleteStep(body)null
CompleteExecutionPUT/WiExecution/CompleteExecutionWiExecutionId, TotalActualSecsnull
CheckAcknowledgementGET/WiExecution/CheckAcknowledgementWiId, EmployeeId, WorkOrderIdNOT_REQUIRED
SaveAcknowledgementPOST/WiExecution/SaveAcknowledgement(body)null
GetExecutionHistoryGET/WiAnalytics/GetExecutionHistoryWiId=-1, WorkstationId=-1, EmployeeId=-1, FromDate, ToDatenull
GetTimeStudySummaryGET/WiAnalytics/GetTimeStudySummaryWiId, FromDate, ToDatenull
GetComplianceSummaryGET/WiAnalytics/GetComplianceSummaryWiId=-1, FromDate, ToDatenull
GetWorkstationListGET/Workstation/GetWorkstationList—CLIENT_LEVEL
GetWorkstationGET/Workstation/GetWorkstationWorkstationIdCLIENT_LEVEL
SaveWorkstationPOST/Workstation/SaveWorkstation(body)null
GetSelectListWorkstationGET/Workstation/GetSelectListWorkstation—CLIENT_LEVEL
GetLineStationByLineGET/LineStation/GetLineStationByLineLineIdCLIENT_LEVEL
SaveLineStationPOST/LineStation/SaveLineStation(body)null
GetLineShiftRosterGET/LineShiftRoster/GetLineShiftRosterLineId, ShiftId, DateNOT_REQUIRED
SaveLineShiftRosterPOST/LineShiftRoster/SaveLineShiftRoster(body)null
ConfirmLineShiftRosterPUT/LineShiftRoster/ConfirmLineShiftRosterRosterIdnull
CopyForwardRosterPOST/LineShiftRoster/CopyForwardRoster(body)null
GetPlannedVsActualGET/LineShiftRoster/GetPlannedVsActualLineId, ShiftId, DateNOT_REQUIRED
GetLineShiftStaffingGET/LineShiftStaffing/GetLineShiftStaffingRosterIdNOT_REQUIRED
SaveLineShiftStaffingPOST/LineShiftStaffing/SaveLineShiftStaffing(body)null
MarkAbsentPUT/LineShiftStaffing/MarkAbsent(body)null
GetLineOperationMapGET/LineOperationMap/GetLineOperationMapLineIdCLIENT_LEVEL
GetStaffingGapGET/LineOperationMap/GetStaffingGapLineId, RosterIdNOT_REQUIRED
SaveLineOperationMapPOST/LineOperationMap/SaveLineOperationMap(body)null

WI FE Section 2: WI Module — Frontend (Angular 20)

2.1 Key Services

ServiceFilePurposeKey Methods
WiDbService projects/wi/src/lib/services/wi-db.service.ts All HTTP API calls for WI getWiList(), getWiFullDetail(), saveWiFull(), resolveForWorkstation(), startExecution(), completeStep(), completeExecution(), saveAcknowledgement(), getWorkstationList(), saveWorkstation(), getRosterHeader(), getExecutionHistory(), etc.
WiPlayerService projects/wi/src/lib/services/wi-player.service.ts Manages player state machine: execution flow, current step, display config start(), advance(), goBack(), pause(), complete(), setConfig()
WiStepTimerService projects/wi/src/lib/player/wi-step-timer.service.ts Per-step countdown timer start(), pause(), reset(), elapsed()
WiLiveShiftPollingService projects/wi/src/lib/shift-roster/wi-live-shift-polling.service.ts Polls roster/staffing updates poll(), stop()

2.2 Models and Enums

FileKey InterfacesKey Enums
projects/wi/src/lib/models/wi.models.ts WiProcess, WiSubProcess, WiHeader, WiSection, WiStep, WiStepContent, WiStepContainer, WiAssignment, WiExecution, LineShiftRosterDTO, LineShiftStaffingDTO, StaffingGapDTO, WorkstationDTO, WiExecutionHistoryDTO, WiTimeStudyDTO, WiComplianceSummaryDTO —
projects/wi/src/lib/enums/wi.enums.ts — WiStatus, ActivityType, TriggerEvent, ContentType, WiContainerType, DisplayMode, FontScale, StepAdvanceMode, RosterType, RosterStatus, StaffingRole, WarningLevel, StepStatus, ExecStatus

2.3 Player Components

All under projects/wi/src/lib/player/.

SelectorClassFileKey InputsPurpose
wi-player-shellWiPlayerShellComponentwi-player-shell.component.ts—Root layout (responsive: kiosk / normal / fullscreen)
wi-player-headerWiPlayerHeaderComponentwi-player-header.component.ts—WI title, status, timer display
wi-player-step-listWiPlayerStepListComponentwi-player-step-list.component.ts—Left-panel step navigation list
wi-player-stepWiPlayerStepComponentwi-player-step.component.tsstep: WiStepContent area; delegates to ContentDocumentRendererComponent
wi-player-footerWiPlayerFooterComponentwi-player-footer.component.tspaused: booleanNavigation controls (Next / Back / Pause / Complete)
wi-printWiPrintComponentwi-print.component.tswiId: number (required)Print-optimized layout of full WI document
wi-acknowledgementWiAcknowledgementComponentwi-acknowledgement.component.tswiHeader, employeeId, workOrderId, workStationIdDigital acknowledgement capture
(dialog)WiDangerAckDialogComponentwi-danger-ack-dialog.component.tsMAT_DIALOG_DATA: {stepTitle}Warning confirmation before marking dangerous step done

2.4 Content Block Renderers

All under projects/wi/src/lib/player/content/.

SelectorClassContent TypeKey Features
wi-content-richtextWiContentRichtextComponentRichText (0)DOMPurify-sanitized HTML
wi-content-imageWiContentImageComponentImage (1)Zoom region support; pan on touch
wi-content-videoWiContentVideoComponentVideo (2)Controls based on DisplayMode
wi-content-pdfWiContentPdfComponentPDF (3)Inline or link based on screen size
wi-content-checklistWiContentChecklistComponentChecklist (4)Interactive; emits allChecked
wi-content-warningWiContentWarningComponentWarning (5)WarningLevel enum → CSS class
wi-content-decisionWiContentDecisionComponentDecisionBranch (6)Tree branches; emits branchSelected
wi-content-fileWiContentFileComponentFile (7)Download link
wi-content-tableWiContentTableComponentDataTable (9)Renders headers/rows from JSON
wi-content-bannerWiContentBannerComponentBannerFull-width background image + text

2.5 Renderer Components (Layout Layer)

All under projects/wi/src/lib/renderer/.

SelectorClassFileInputPurpose
content-document-rendererContentDocumentRendererComponentcontent-document-renderer.component.tscontainers: WiStepContainer[]Top-level step document, iterates containers
content-container-rendererContentContainerRendererComponentcontent-container-renderer.component.tscontainer: WiStepContainerApplies CSS layout (Single / TwoColumn / Banner / Accordion / Tab)
content-block-rendererContentBlockRendererComponentcontent-block-renderer.component.tsblock: WiStepContent@switch on ContentType → routes to block component
Container CSS strategy.
  • Single — flex-column
  • TwoColumn — CSS grid 1fr 1fr
  • Banner — position: relative, full-width
  • Accordion — CDK Accordion
  • Tab — tab strip using ContainerLabel per block
Print overrides: all accordion/tabs expand, Banner becomes bordered box, Video shows static text.

2.6 Authoring / Master Components

All under projects/wi/src/lib/master/.

SelectorClassFileKey InputsPurpose
wi-listWiListComponentmaster/wi/wi-list.component.ts—Browse all WIs (searchable)
wi-formWiFormComponentmaster/wi/wi-form.component.tsMAT_DIALOG_DATA: WiSaveRequestCreate/edit WI header + sections + assignments
wi-process-listWiProcessListComponentmaster/process/wi-process-list.component.ts—Browse processes
wi-process-formWiProcessFormComponentmaster/process/wi-process-form.component.tsMAT_DIALOG_DATA: WiProcessCreate/edit process
wi-subprocess-listWiSubProcessListComponentmaster/subprocess/wi-subprocess-list.component.tswiProcessId: numberBrowse subprocesses for a process
wi-subprocess-formWiSubProcessFormComponentmaster/subprocess/wi-subprocess-form.component.tsMAT_DIALOG_DATA: Partial<WiSubProcess>Create/edit subprocess
wi-section-editorWiSectionEditorComponentmaster/sections/wi-section-editor.component.tssections: WiSection[]; readOnly: booleanDrag-drop section list with embedded step forms
wi-step-formWiStepFormComponentmaster/steps/wi-step-form.component.tsstep: WiStep; readOnly: booleanEdit step properties (title, duration, workstation)
wi-step-content-editorWiStepContentEditorComponentmaster/step-content/wi-step-content-editor.component.tsstepId, contents, readOnlyDrag-drop content blocks per step
wi-assignment-listWiAssignmentListComponentassignment/wi-assignment-list.component.tswiId: numberList assignments with specificity scores
wi-assignment-formWiAssignmentFormComponentassignment/wi-assignment-form.component.tsMAT_DIALOG_DATA: Partial<WiAssignment>Create/edit assignment rule
wi-activity-schedule-formWiActivityScheduleFormComponentassignment/wi-activity-schedule-form.component.tswiAssignmentId, schedulesEdit activity schedules
wi-workstation-configWiWorkstationConfigComponentworkstation-config/wi-workstation-config.component.tsworkStationId: numberPer-workstation player settings
wi-workstation-config-formWiWorkstationConfigFormComponentassignment/wi-workstation-config-form.component.tsworkStationId: numberForm for player config

2.7 Shared UI Components

SelectorClassFileKey InputsPurpose
wi-status-badgeWiStatusBadgeComponentshared/wi-status-badge.component.tsstatus: WiStatusColored status chip
wi-activity-type-iconWiActivityTypeIconComponentshared/wi-activity-type-icon.component.tsactivityType: ActivityTypeIcon for activity schedule type
wi-specificity-scoreWiSpecificityScoreComponentshared/wi-specificity-score.component.tsassignment: Partial<WiAssignment>Shows scoring breakdown (7 dimensions, max 90)
wi-version-historyWiVersionHistoryComponentshared/wi-version-history.component.tshistory: WiVersionLog[]Table of version log entries

2.8 Line Setup Components

SelectorClassFileKey InputsPurpose
wi-line-masterWiLineMasterComponentline-setup/wi-line-master.component.ts—Production line selection; emits lineSelected
wi-workstation-masterWiWorkstationMasterComponentline-setup/wi-workstation-master.component.ts—Manage workstations (CRUD)
wi-line-operation-mapWiLineOperationMapComponentline-setup/wi-line-operation-map.component.tslineId, routingVersionIdShow/edit operation-to-workstation mapping

2.9 Shift Roster Components

SelectorClassFileKey InputsPurpose
wi-roster-planWiRosterPlanComponentshift-roster/wi-roster-plan.component.tstype, lineId, rosterDatePlan roster (Planned / Actual view)
wi-live-shiftWiLiveShiftComponentshift-roster/wi-live-shift.component.tslineId, shiftId, rosterDateLive shift view with polling
wi-staffing-gapWiStaffingGapComponentshift-roster/wi-staffing-gap.component.ts— (signals)Required vs assigned per workstation
wi-shift-confirmWiShiftConfirmComponentshift-roster/wi-shift-confirm.component.tslineId, shiftId, rosterDateConfirm/close roster

2.10 Analytics Components

SelectorClassFilePurpose
wi-analytics-shellWiAnalyticsShellComponentanalytics/wi-analytics-shell.component.tsShell containing compliance + time study
wi-complianceWiComplianceComponentanalytics/wi-compliance.component.tsAcknowledgement compliance rates; calls GET_COMPLIANCE_SUMMARY
wi-time-studyWiTimeStudyComponentanalytics/wi-time-study.component.tsStep actual vs standard timing; calls GET_TIME_STUDY

CMS BE Section 3: CMS Module — Backend (C#)

3.1 Database Schema DB

CMS tables live in the DBO. schema.

TablePurpose
TCONTENTContent document header (title, slug, status, DATAJSON, METADATAJSON)
MCONTENTTYPEContent type definition (field schema)
MSPACEContent space (workspace / namespace)
MBLOCKBlock type registry (code, name, SCHEMAJSON, DEFAULTPROPSJSON, CATEGORY)
MCONTENTCONTAINERTYPEContainer layout types (SINGLE, TWO_COL, BANNER, ACCORDION, TABS); ZONEDEFINITIONSJSON
TCONTENTCONTAINERContainer instances within a content document
TCONTENTBLOCKBlock instances within a container zone
TCONTENTVERSIONImmutable snapshot on each publish
MCMSCHANNELChannel (content feed) definition
TCMSSUBSCRIPTIONEmployee ↔ Channel subscriptions
TCMSCHANNELCONTENTContent items within a channel
MCMSCOLLECTIONDynamic or manual content collections
TCMSCOLLECTIONITEMItems in a manual collection
MCMSCAMPAIGNPush campaign header
TCMSASSIGNMENTPer-employee content assignment (opened/completed tracking)
MCMSLEARNINGPATHOrdered learning path definition
TCMSLEARNINGPATHITEMContent items within a learning path
MDESIGNSYSTEMBranding/design tokens (colors, fonts, spacing)
MRENDERINGPROFILEOutput profile (PDF / PPT / Email / Video; links to DesignSystem)
TCONTENTOUTPUTGenerated output tracking (Pending → Done)
MCONTENTCATEGORYContent category taxonomy
MTAXONOMYTaxonomy definition
MTAXONOMYTERMTerms within a taxonomy
MTAGContent tags
Migration Files.
  • DB/Migrations/20260610_CMS_ContentBlockContainer.sql — Container, Block, ContainerType tables
  • DB/Migrations/20260610_CMS_FullPlatform.sql — Channel, Collection, Campaign, LearningPath, DesignSystem, RenderingProfile, ContentVersion tables

3.2 Query Builders BE

QB FilePathKey Constants
ContentQBCMSDAL/Query/Content/ContentQB.csGET_CONTENT, SAVE_CONTENT, UPDATE_CONTENT, DELETE_CONTENT, GET_CONTENT_LIST, SEARCH_CONTENT, UPDATE_STATUS, UPDATE_STATUS_WITH_PUBLISH
ContentTypeQBCMSDAL/Query/ContentType/ContentTypeQB.csGET_LIST, GET_BY_ID, SAVE, DELETE
BlockQBCMSDAL/Query/Block/BlockQB.csGET_LIST, GET_BY_ID, SAVE, GET_SELECT_LIST
ContentContainerTypeQBCMSDAL/Query/ContentContainerType/ContentContainerTypeQB.csGET_LIST, GET_SELECT_LIST, GET_BY_ID, INSERT, UPDATE
ContentContainerQBCMSDAL/Query/ContentContainer/ContentContainerQB.csGET_BY_CONTENT, INSERT_CONTAINER, REORDER_CONTAINERS, SOFT_DELETE
ContentBlockQBCMSDAL/Query/ContentBlock/ContentBlockQB.csGET_BY_CONTAINER, GET_FULL_DOCUMENT, INSERT_BLOCK, UPDATE_PROPS, SOFT_DELETE
ContentVersionQBCMSDAL/Query/ContentVersion/ContentVersionQB.csGET_BY_CONTENT, INSERT, GET_SNAPSHOT, RESTORE_TO_DRAFT, GET_NEXT_VERSION
ChannelQBCMSDAL/Query/Channel/ChannelQB.csGET_LIST, SAVE_CHANNEL, GET_CHANNEL_CONTENT, ADD_CHANNEL_CONTENT
CollectionQBCMSDAL/Query/Collection/CollectionQB.csGET_LIST, SAVE_COLLECTION, GET_ITEMS (manual), RESOLVE_DYNAMIC
CampaignQBCMSDAL/Query/Campaign/CampaignQB.csGET_LIST, GET_BY_ID, INSERT, UPDATE, GET_ASSIGNMENTS, INSERT_ASSIGNMENT, UPDATE_ASSIGNMENT_STATUS
LearningPathQBCMSDAL/Query/LearningPath/LearningPathQB.csGET_LIST, GET_ITEMS, INSERT, UPDATE, INSERT_ITEM, DELETE_ITEMS
DesignSystemQBCMSDAL/Query/DesignSystem/DesignSystemQB.csGET_LIST, GET_SELECT_LIST, SAVE
RenderingProfileQBCMSDAL/Query/RenderingProfile/RenderingProfileQB.csGET_LIST, GET_SELECT_LIST, SAVE, INSERT_OUTPUT

3.3 DAL Layer BE

FeatureInterfaceImplementation
ContentCMSDAL/CustomCode/Content/IContentDAL.csContentDAL.cs
ContentTypeCMSDAL/CustomCode/ContentType/IContentTypeDAL.csContentTypeDAL.cs
ContentCategoryCMSDAL/CustomCode/ContentCategory/IContentCategoryDAL.csContentCategoryDAL.cs
BlockCMSDAL/CustomCode/Block/IBlockDAL.csBlockDAL.cs
ContentContainerTypeCMSDAL/CustomCode/ContentContainerType/IContentContainerTypeDAL.csContentContainerTypeDAL.cs
ContentContainerCMSDAL/CustomCode/ContentContainer/IContentContainerDAL.csContentContainerDAL.cs
ContentBlockCMSDAL/CustomCode/ContentBlock/IContentBlockDAL.csContentBlockDAL.cs
ContentVersionCMSDAL/CustomCode/ContentVersion/IContentVersionDAL.csContentVersionDAL.cs
ChannelCMSDAL/CustomCode/Channel/IChannelDAL.csChannelDAL.cs
CollectionCMSDAL/CustomCode/Collection/ICollectionDAL.csCollectionDAL.cs
CampaignCMSDAL/CustomCode/Campaign/ICampaignDAL.csCampaignDAL.cs
LearningPathCMSDAL/CustomCode/LearningPath/ILearningPathDAL.csLearningPathDAL.cs
DesignSystemCMSDAL/CustomCode/DesignSystem/IDesignSystemDAL.csDesignSystemDAL.cs
RenderingProfileCMSDAL/CustomCode/RenderingProfile/IRenderingProfileDAL.csRenderingProfileDAL.cs
TaxonomyCMSDAL/CustomCode/Taxonomy/ITaxonomyDAL.csTaxonomyDAL.cs
TagCMSDAL/CustomCode/Tag/ITagDAL.csTagDAL.cs
FieldComponentCMSDAL/CustomCode/FieldComponent/IFieldComponentDAL.csFieldComponentDAL.cs

3.4 BLL Layer BE

Same interface names with the CMSBLL namespace. Key business rules:

  • ContentBLL — Status workflow Draft(0) → InReview(1) → Approved(2) → Published(3) → Archived(4). No backward transitions.
  • ContentVersionBLL — SaveSnapshotAsync called by ContentBLL.PublishContentAsync; RestoreVersionAsync copies SNAPSHOTJSON back to TCONTENT.DATAJSON and resets STATUS=0.
  • CollectionBLL — Dynamic collections execute QUERYJSON filter at resolve-time; manual collections return TCMSCOLLECTIONITEM in order.
  • CampaignBLL — SendCampaignAsync creates TCMSASSIGNMENT rows for each employee; UpdateAssignmentStatusAsync sets OPENEDON / COMPLETEDON automatically.
  • LearningPathBLL — SaveAsync replaces all items (DELETE_ITEMS then re-INSERT).
  • RenderingProfileBLL — GenerateOutputAsync inserts TCONTENTOUTPUT row with Status=Pending; actual generation is async.

3.5 SL Layer (FastEndpoints) BE API

Base path: /cms/{Group}/{Action}.

Endpoint FileHTTPRouteCache
GetContentGET/Content/GetContentCLIENT_LEVEL
GetContentListGET/Content/GetContentListNOT_REQUIRED
SearchContentGET/Content/SearchContentnull
SaveContentPOST/Content/SaveContentnull
GetContentFullDocumentGET/Content/GetContentFullDocumentCLIENT_LEVEL
SubmitForReviewPUT/Content/SubmitForReviewnull
ApproveContentPUT/Content/ApproveContentnull
PublishContentPUT/Content/PublishContentnull
ArchiveContentPUT/Content/ArchiveContentnull
RestoreVersionPOST/Content/RestoreVersionnull
GetContentVersionHistoryGET/Content/GetContentVersionHistoryNOT_REQUIRED
GetContentContainersByContentGET/ContentContainer/GetContentContainersByContentCLIENT_LEVEL
SaveContentContainerPOST/ContentContainer/SaveContentContainernull
ReorderContentContainersPUT/ContentContainer/ReorderContentContainersnull
DeleteContentContainerDELETE/ContentContainer/DeleteContentContainernull
GetContentBlocksByContainerGET/ContentBlock/GetContentBlocksByContainerCLIENT_LEVEL
SaveContentBlockPOST/ContentBlock/SaveContentBlocknull
UpdateBlockPropsPUT/ContentBlock/UpdateBlockPropsnull
ReorderBlocksPUT/ContentBlock/ReorderBlocksnull
DeleteContentBlockDELETE/ContentBlock/DeleteContentBlocknull
GetChannelListGET/Channel/GetChannelListCLIENT_LEVEL
SaveChannelPOST/Channel/SaveChannelnull
GetChannelContentGET/Channel/GetChannelContentCLIENT_LEVEL
AddChannelContentPOST/Channel/AddChannelContentnull
GetCollectionListGET/Collection/GetCollectionListCLIENT_LEVEL
SaveCollectionPOST/Collection/SaveCollectionnull
ResolveCollectionGET/Collection/ResolveCollectionNOT_REQUIRED
GetCampaignListGET/Campaign/GetCampaignListNOT_REQUIRED
SaveCampaignPOST/Campaign/SaveCampaignnull
SendCampaignPOST/Campaign/SendCampaignnull
GetAssignmentListGET/Campaign/GetAssignmentListNOT_REQUIRED
UpdateAssignmentStatusPUT/Campaign/UpdateAssignmentStatusnull
GetLearningPathListGET/LearningPath/GetLearningPathListCLIENT_LEVEL
GetLearningPathItemsGET/LearningPath/GetLearningPathItemsCLIENT_LEVEL
SaveLearningPathPOST/LearningPath/SaveLearningPathnull
GetSelectListDesignSystemGET/DesignSystem/GetSelectListDesignSystemCLIENT_LEVEL
SaveDesignSystemPOST/DesignSystem/SaveDesignSystemnull
GetSelectListRenderingProfileGET/RenderingProfile/GetSelectListRenderingProfileCLIENT_LEVEL
SaveRenderingProfilePOST/RenderingProfile/SaveRenderingProfilenull
GenerateOutputPOST/RenderingProfile/GenerateOutputnull
GetContentContainerTypeListGET/ContentContainerType/GetContentContainerTypeListCLIENT_LEVEL
GetSelectListContentContainerTypeGET/ContentContainerType/GetSelectListContentContainerTypeCLIENT_LEVEL
SaveContentContainerTypePOST/ContentContainerType/SaveContentContainerTypenull

CMS FE Section 4: CMS Module — Frontend (Angular 20)

4.1 Services

ServiceFilePurpose
CmsDbServiceprojects/cms/dbservice/cms.db.service.tsCentral HTTP wrapper for all CMS endpoints; ~40 typed methods
CmsEditorServiceprojects/cms/service/cms-editor.service.tsSignals-based editor state (currentDocument, selectedContainerIdx, selectedBlockId, isDirty); auto-save debounce
ContentCreatorServiceprojects/cms/service/contentcreator.service.ts3-step wizard state: space → type → form
ContentspaceServiceprojects/cms/service/contentspace.service.tsContent space creation wizard
CreateContentTypeServiceprojects/cms/service/createcontenttype.service.tsContent type field builder wizard
CreatenewchannelServiceprojects/cms/service/createnewchannel.service.tsChannel creation/edit flow
FieldComponentServiceprojects/cms/service/fieldcomponent.service.tsField component type management
OntologyServiceprojects/cms/service/ontology.service.tsTaxonomy/ontology management

4.2 Components

SelectorClassFileDB Methods CalledPurpose
gb-contentcatalogueContentCatalogueComponentmaster/contentcatalogue/contentcatalogue.component.tsgetContentList(), searchContent()Main content browsing (filter, search, paginate)
gb-contenteditorContentEditorComponentmaster/contenteditor/contenteditor.component.tsgetSelectListContainerType()4-tab editor: Fields / Layout / Preview / Metadata
gb-contentcreatorContentCreatorComponentmaster/contentcreator/contentcreator.component.tsvia ContentCreatorService3-step wizard: space → type → form
gb-contentspaceContentspaceComponentmaster/contentspace/contentspace.component.tsvia ContentspaceServiceContent space creation wizard
gb-createcontenttypeCreateContentTypeComponentmaster/createcontenttype/createcontenttype.component.tsvia CreateContentTypeServiceContent type field builder
gb-blocklibraryBlockLibraryComponentmaster/blocklibrary/blocklibrary.component.tsgetContainerTypeList()Browse block types by category with preview
gb-createnewchannelCreatenewchannelComponentmaster/createnewchannel/createnewchannel.component.tsvia CreatenewchannelServiceChannel create/edit form
gb-collectionsCollectionsComponentmaster/collections/collections.component.tsgetCollectionList(), resolveCollection(), saveCollection()Dynamic + manual collection management
gb-campaignsCampaignsComponentmaster/campaigns/campaigns.component.tsgetCampaignList(), saveCampaign(), sendCampaign(), getAssignmentList()Campaign management + assignment tracking
gb-learningpathsLearningPathsComponentmaster/learningpaths/learningpaths.component.tsgetLearningPathList(), saveLearningPath()Learning path builder
gb-contentanalyticsContentAnalyticsComponentmaster/contentanalytics/contentanalytics.component.tsgetChannelList(), getContentList()CMS engagement metrics
gb-renderoutputRenderOutputComponentmaster/renderoutput/renderoutput.component.tsgetSelectListRenderingProfile(), getSelectListDesignSystem(), generateOutput()Multi-format content output generator
gb-ontologyOntologyComponentmaster/ontology/ontology.component.tsvia OntologyServiceTaxonomy/ontology management
gb-fieldcomponentFieldComponentComponentmaster/fieldcomponents/fieldcomponent.component.tsvia FieldComponentServiceField component type management
gb-portalPortalComponentmaster/portal/portal.component.tsgetContentList(), getContentFullDocument(), searchContent()Consumer portal (browse + view content)

4.3 CmsEditorService State Shape

// projects/cms/service/cms-editor.service.ts
currentDocument = signal<ContentFullDocumentDTO | null>(null);
selectedContainerIdx = signal<number>(-1);
selectedBlockId = signal<number>(-1);
isDirty = signal<boolean>(false);
// auto-save: debounce 2s after last edit → calls CmsDbService.saveContentBlock()

Section 5: Key Design Patterns & Conventions

5.1 Query Builder Pattern BE

// WiDAL/Query/Wi/WiMasterQB.cs
public static class WiMasterQB {
    public const string GET_WI_FULL_DETAIL = @"
        SELECT w.WIID, w.WICODE, ...
        FROM   WI.MWI w
        WHERE  w.WIID = @WiId AND w.TENANTID = @TenantId";
}

5.2 DAL via IQueryExecutor BE

// Never store IDbConnection; always use IQueryExecutor
var result = await _qe.QueryAsync<WiHeaderDTO>(login, WiMasterQB.GET_WI_LIST,
    new { TenantId = login.ClientId, WiProcessId = wiProcessId },
    cancellationToken: ct).ConfigureAwait(false);

5.3 FastEndpoint SL Template BE API

public class GetWIList : BaseEndpoint<GetWIList.Parameters, ResponseStandardDTO<object>> {
    public override void Configure() { Get("/WI/GetWIList"); AllowAnonymous(); }

    protected override string? GetCacheKey(Parameters req, LoginDTO login)
        => $"WiList:{login.ClientId}:{req.WiProcessId}:{req.WiStatus}";

    protected override async Task<ResponseStandardDTO<object>> ExecuteAsync(
        Parameters req, LoginDTO login, CancellationToken ct)
        => await _bll.GetWiList(req.WiProcessId, req.WiStatus, login, ct);
}

5.4 Angular Signal Pattern FE

// Reactive data with rxResource
readonly wiDetail = rxResource({
  request: () => ({ wiId: this.wiId() }),
  loader: ({ request }) => this.db.getWiFullDetail(request.wiId)
});

5.5 Specificity Scoring Algorithm (Assignment Resolution)

Score = RoutingDetailId match: +30
      + WorkstationId match:   +15
      + RoutingId match:       +20
      + WorkCenterId match:    +10
      + ModelId match:         +10
      + ProductFamilyId match: +5

Max = 90 points. Highest score wins.

5.6 Content Lifecycle (CMS)

Draft (0) → Submit → InReview (1) → Approve → Approved (2)
         → Publish → Published (3) → Archive → Archived (4)

No backward transitions.
TCONTENTVERSION snapshot created on each Publish.

5.7 Append-Only Tables DB

MPRODUCTIONLINESTATION, MLINEOPERATIONMAP:
  • When "updating": set EFFECTIVETO = today on old row, INSERT new row with EFFECTIVEFROM = today + 1.
  • Never UPDATE, never DELETE.
TLINESHIFTSTAFFING:
  • When marking absent: UPDATE ISABSENT = 1 + ABSENCEREASON.
  • Never DELETE.

GB5 WI & CMS Developer Reference · Generated for the GB5 build team · Anchors stable for deep linking · Last revised 2026-06-16