Toshfa OptimaX
A layered, secure, deploy-anywhere architecture for the complete medical-insurance lifecycle — prepared for Amana's technical and infrastructure review.
Executive Summary
One platform, whole lifecycle — architected for isolation, security and multi-cloud portability.
Modular
Each domain owns its procedures, services and API surface.
Dedicated per insurer
Own instance, own database — hard data isolation, not row-level tenancy.
Secure by default
JWT + refresh + OTP, form-level RBAC, immutable audit.
Deploy anywhere
IIS-hosted — on-prem or Amazon EC2 (IaaS).
Deployment Model — Standalone Per Insurer
No tenant concept in the system: each insurer runs a completely separate, standalone application and its own database.
Data isolation
Physical separation — the strongest boundary for compliance.
Independent ops
Scale, patch or upgrade one insurer without touching another.
Regulatory fit
Simplifies data-residency and CCHI/NPHIES audit obligations.
Layered Architecture
Client → API → Data → Services, wrapped in a hosting/runtime layer. Control flows one direction.
Technology Stack
Mainstream, enterprise-proven components — easy to hire for, easy to support, no exotic dependencies.
API Request Lifecycle
Every request follows the same governed path from the edge to the database and back.
Data Architecture
Stored-procedure-first access to a dedicated database per insurer.
Governed data contract
- All reads & writes pass through stored procedures — none inline or ORM-generated
- Consistent naming: SPME_<Module>_<Action>
- Every procedure independently reviewable by a DBA
- No shared registry — each insurer's application is entirely standalone
Core domain data groups
- Identity & access — users, roles, permissions, tokens
- Quotation → Policy → Endorsement
- Provider network — profiles, contracts, price lists
- Claims — intake, adjudication, denial reasons
- Finance — double-entry ledger
- Workflow engine, Documents, HDF underwriting
- Regulatory — CHI/IA tables
Integration Architecture
A dedicated integration layer — external calls never sit inside domain business logic.
Regulatory (ships with core)
- NPHIES eligibility & pre-auth adjudication, denial codes
- CCHI policy registration & member upload
- SFDA-aligned medicine master
Identity & partner systems
- Yakeen/Absher, Muqeem, GOSI verification
- TPA & provider RCM/HIS systems
- PBM for medication decisioning
- ERP payables & general ledger
Messaging & search
- WhatsApp Business, SMTP, SMS
- OCR intake for scanned documents
- Elasticsearch party search
- AI natural-language query engine
Security Architecture
Defence in depth — from the network edge to the row of data.
Perimeter
- WAF, reverse proxy, load balancer — single hardened ingress
- HTTPS-only external traffic
Identity & access
- JWT + hashed refresh tokens, OTP where configured
- RBAC enforced to individual forms & permissions
Data protection & audit
- Immutable audit trail on financial & identity changes
- Per-insurer database isolation as a security control
Application-layer
- Stored-procedure-only access removes SQL-injection surface
- Middleware centralises every authZ/authN check
Background Processing & Workflow Engine
Scheduled execution and configurable business process orchestration.
Hangfire background jobs
- Recurring reports & batch-style processing
- Reminder & escalation jobs
- Job/queue/state history — retries tracked, not fire-and-forget
Configurable workflow engine
- Approval chains as data, not hard-coded logic
- Case assignment, escalation, status transitions
- Business users change rules — no code deployment
Deployment Topology
Single secure ingress, isolated application core per insurer — the same shape on any infrastructure.
Deployment Targets
Same IIS-hosted deployment, two infrastructure choices — no code changes between them.
On-Premises primary
Inside Amana's own data centre, behind existing perimeter controls, IIS on Amana-managed Windows Server infrastructure. Best fit where data residency demands the platform stay fully within Amana's environment.
Amazon EC2 IaaS
IIS on Windows Server virtual machines running on Amazon EC2 — infrastructure-as-a-service, so Amana trades infrastructure ownership for elasticity and managed operations without any change to application code. Elasticsearch runs on Amazon EKS alongside it.
Scalability, HA & Disaster Recovery
Designed to scale horizontally; HA/DR posture finalised with Amana's infrastructure standards.
Scalability
- Stateless API tier — add IIS server instances behind the load balancer
- Elasticsearch offloads search/read load from SQL Server
- Hangfire moves heavy/batch work off the request path
HA & DR
- Windows Server / IIS health monitoring restarts failed instances; Kubernetes does the same for Elasticsearch
- SQL clustering/replication and DR RPO/RTO configured per deployment
- Finalised jointly with Amana's infrastructure team during solution design
DevOps & Delivery Model
Standard CI/CD to IIS — one build, any target.
Platform Snapshot
The profile behind the architecture.
| Metric | Value |
|---|---|
| Business domains | 15+ |
| Data access | Stored-procedure-first via Dapper (SPME_<Module>_<Action>) |
| Deployment model | Standalone application & database per insurer — no tenant concept |
| Frontend | Angular · PrimeNG · Tailwind CSS |
| Backend | ASP.NET Core REST · Dapper |
| Database | SQL Server, one per insurer |
| Search | Elasticsearch |
| Background processing | Hangfire |
| Messaging | WhatsApp Business · SMTP · SMS |
| Application hosting | IIS (Windows Server) |
| Search infrastructure | Elasticsearch — containerised via Docker · Kubernetes |
| Deployment targets | On-Premises (primary) · Amazon EC2 (IaaS) |
Why This Architecture
Six commitments, every one demonstrated in this deck.
Modular & Proven
15+ domains, governed procedures throughout.
True Isolation
Dedicated instance & database per insurer.
Secure & Audited
JWT + RBAC + immutable audit trail.
Performance-First
Dapper + governed SQL, ES offload, async jobs.
Deploy Anywhere
IIS-hosted — on-prem or Amazon EC2 (IaaS).
AI-Ready
Live NL query today; a foundation for more.
Questions &
Discussion
Happy to deep-dive any layer — security & identity, isolation model, data, deployment, or delivery.