Skip to main content

7. Architecture / Technical Design

This document summarizes the technical design of the MoH Helpdesk platform for handover, maintenance, and future enhancement.


7.1 System Context

The MoH Helpdesk is a centralized support and ticket management platform used by facility users, regional users, national users, service desk teams, and administrators.

Core capabilities include:

  • Ticket creation from public portal, email, and internal form.
  • Ticket routing by category and team mapping.
  • Role-based visibility for facility, regional, national, and administrator users.
  • Ticket assignment, communication, attachments, and closure.
  • Reporting, SLA monitoring, and overdue tracking.
  • Email notification and event-driven workflow support.

7.2 Logical Architecture

LayerResponsibility
PresentationReact frontend and public portal.
API Gateway / Reverse ProxyRoutes requests, terminates HTTPS, forwards API calls.
Backend Services.NET API services implementing business rules.
Data LayerPostgreSQL databases split by service domain.
Event LayerKafka event bus for asynchronous communication.
Storage LayerObject storage for attachments.
Notification LayerSMTP and optional messaging gateway integrations.

7.3 Deployment Architecture

100%
50%300%
TeraSupport deployment architecture diagram

This diagram uses the same Docusaurus zoomable format as the Installation Manual so technical reviewers can inspect the service boundaries and infrastructure routing.

AreaArchitecture Detail
Entry PointUsers access the platform through public HTTPS, terminated by IIS, Nginx, or an external load balancer.
FrontendReact/Vite web app serves the user interface and calls backend APIs through the gateway route.
API GatewayOcelot API Gateway exposes stable public API routes and forwards requests to internal microservices.
ServicesUser, Ticketing, CRM, Call Center, Device Management, Mail, and Meta services run as .NET 9 CQRS/MediatR services.
DataPostgreSQL databases are separated by service domain to reduce coupling and simplify ownership.
EventsKafka handles asynchronous ticket, mail, user request, notification, and CRM/deal events.
OperationsKafdrop, logs, IIS/Portainer, and database tools are used for deployment verification and support.

Supported deployment models:

ModelDescription
Windows Server / IISIIS hosts frontend and proxies or hosts .NET services.
Linux / Docker / PortainerPortainer manages Docker containers and persistent volumes.

7.4 Application Components

ComponentDescription
Frontend Web AppProvides admin, service desk, reporting, and facility portal user interfaces.
User ServiceHandles authentication, users, roles, and permissions.
Ticket ServiceHandles tickets, categories, assignments, messages, attachments, and lifecycle actions.
Device ServiceMaintains facility/device reference data where applicable.
Notification WorkerProcesses notification events and dispatches emails or external messages.
API GatewayProvides a stable public API routing layer.

7.5 Data Architecture

100%
50%300%
Entity Relationship Diagram

The platform uses PostgreSQL with service-oriented database ownership.

DatabaseMain Data
User databaseUsers, roles, organizations, access control.
Ticket databaseTickets, categories, assignments, messages, attachments, audit activity.
Device databaseDevices, facilities, external sync flags, device metadata.

See Data Architecture for detailed table definitions and schema references.


7.6 Ticket Lifecycle Design

The main ticket workflow is:

  1. Ticket is created from portal, email, or internal form.
  2. Ticket category is selected or identified.
  3. Service Desk assigns the ticket to an expert or responsible person.
  4. Users communicate through ticket messages and attachments.
  5. SLA and overdue rules are monitored.
  6. Ticket is closed after resolution.
  7. Notifications and audit history are retained.

See Ticket Lifecycle and Journey and Process Workflows for visual flows.


7.7 Security Design

Security AreaDesign
AuthenticationJWT-based user authentication.
AuthorizationRole and permission checks in frontend and backend service policies.
Transport securityHTTPS for public access.
Service-to-service securitymTLS recommended between internal services.
Event securityKafka SSL/TLS and SASL/SCRAM where enabled.
Attachment securityObject storage with time-limited download links.
Audit integrityActivity records retained for accountability.

See Security Architecture for additional security notes.


7.8 Integration Design

The platform can integrate with:

  • SMTP / MoH Mail Gateway for email alerts.
  • Kafka for asynchronous events.
  • Object storage such as MinIO or S3 for attachments.
  • Twilio WhatsApp Gateway if enabled in the deployed environment.
  • External device or facility systems if synchronization is configured.

See Integration Documentation.


7.9 Operational Design

ConcernDesign Guidance
LoggingApplication, IIS/container, database, and reverse proxy logs should be retained.
BackupPostgreSQL and object storage backups are required.
MonitoringMonitor API health, disk, memory, database, Kafka, and SMTP delivery.
RecoveryRestore database, attachments, and configuration together.
ScalingScale frontend and stateless API services horizontally where supported.
HandoverTransfer deployment scripts, environment values, credentials, and operational runbooks securely.

7.10 Key Technical Risks

RiskMitigation
SMTP outageQueue notification events and retry delivery.
Kafka outageUse retry and outbox pattern where supported.
Database growthApply indexing, archiving, and backup retention policies.
Incorrect role mappingVerify role matrix before go-live.
Wrong category mappingTest each category route with sample tickets.
Attachment storage failureMonitor object storage capacity and backup attachments.