Documentation
Getting Started
Data Grid
Modeling
Business Rules
Approvals
Users, Roles & Security
Administration
Integration & API
Installation
Migrating from MDS
System Architecture
The diagram above shows the four layers a Primentra request passes through. Click any layer to expand its details.
What the diagram shows
The stack is read top to bottom. Each box is one layer, and the label between two boxes is the protocol that connects them.
- Frontend — a React + Vite single-page application in the browser, reached over port 443. It renders the data grid, the admin panel and the settings screens. It fetches every value through the REST API using the
api.jshelper. It stores no credentials and no secrets. - Reverse proxy — IIS with Application Request Routing. It terminates TLS 1.2 or later, serves the static SPA files, and forwards
/api/*to the API server. - API server — Express on Node.js, listening on port 3001. It validates every input, then calls a stored procedure through the
mssqldriver. It contains no raw SQL. - SQL Server — the database on port 1433. Every business rule, transaction and permission check lives in a stored procedure with the
usp_prefix.
The EAV store
Attributes are not columns. The database keeps one row per record in EntityRows and one row per attribute value in EntityValues. Adding an attribute to an entity inserts a definition row, not a schema change. This is why you can model new fields at run time without a migration.
Cross-cutting concerns
Four chips under the layer stack mark the concerns that apply at every level: the audit log, the error log, RBAC permissions and input validation.
What the diagram leaves out
Two features sit beside this path rather than inside it:
- Integration views are SQL views generated per entity. External systems read master data straight from the database, without going through the API.
- Staging tables live in a separate
stgschema. A source system inserts rows there, and a batch process promotes them into the EAV tables.
The key principle: all business logic lives in stored procedures. The API is a validation and routing layer only. That keeps the logic centralized, auditable, and safe from SQL injection.
Related
- Three-Tier Design & Security — the request flow and the security controls at each tier
- Database Schema — every table, grouped by purpose
- Integration Views — how external systems read the data directly
- Production Deployment (IIS) — how to set up the reverse proxy layer