Tech stack for an enterprise SaaS with SSO and audit logs (2026)
HR analytics platform for large companies, designed by StackPrism from one sentence: 14 components, a reason for each, and the live checks that watch them.
The stack
Microsoft Entra ID
Okta
Next.js
Amazon ECS
Node.js
Amazon S3
Amazon ElastiCache
Amazon SQS
- Amazon OpenSearch Service
Amazon RDS
AWS Secrets Manager
Amazon CloudWatch
Sentry
“An HR analytics platform sold to large companies. Each customer is its own tenant with isolated data, their IT team connects Okta or Azure AD for SAML single sign-on and SCIM user provisioning, and every admin action lands in an audit log they can export.”
Their answers on the constraints step
- Expected scale
- 10k+ users
- Already uses
- AWS
Make it yours. Open this stack in the editor to check its health, harden it and hand it to your coding agent. No sign-up, nothing to generate.
Start from this stackSelect a component to see what it does and what it connects to, or pick one above to see what breaks if it goes down. Pinch or use the buttons to zoom.
Why this stack
Everything runs in the company’s existing AWS account. A Next.js frontend talks to a Node.js API that keeps each tenant’s data in Amazon RDS for PostgreSQL, caches sessions in ElastiCache for Redis, reads credentials from Secrets Manager and encrypts sensitive fields with KMS. Customers’ IT teams sign their people in through their own Okta or Azure AD over SAML. Slow work such as exports goes onto SQS, and workers on ECS Fargate write the export files to S3 and index admin actions in OpenSearch, so the audit log can be searched and exported. CloudWatch watches the services and Sentry reports errors.
Why each piece
All 14 components on the diagram: what each one does, what it talks to, and what stops if it goes down.
Azure AD
SAML IdP. Calls Node.js API (saml).
Nothing else on the diagram depends on it.
Okta
SAML IdP. Calls Node.js API (saml).
Nothing else on the diagram depends on it.
Next.js Frontend
In AWS
Analytics UI. Calls Node.js API. Called by Sentry (tracks).
Nothing else on the diagram depends on it.
ECS Fargate Workers
In Core Services
Async job workers. Calls Amazon S3 (writes) and Amazon OpenSearch Service (indexes).
Nothing else on the diagram depends on it.
Node.js API
In Core Services
Main backend. Calls Amazon RDS PostgreSQL (queries), Amazon ElastiCache for Redis, AWS SQS (enqueues), AWS Secrets Manager (reads) and AWS KMS (encrypts). Called by Next.js Frontend, Okta (saml), Azure AD (saml) and Sentry (tracks).
If it goes down, 3 of 13 components stop working.
Amazon S3
In AWS
Export artifacts. Called by ECS Fargate Workers (writes).
If it goes down, 1 of 13 components degrades.
Amazon ElastiCache for Redis
In AWS
Session cache. Called by Node.js API.
If it goes down, 1 of 13 components degrades.
AWS SQS
In AWS
Job queue. Called by Node.js API (enqueues).
If it goes down, 1 of 13 components degrades.
Amazon OpenSearch Service
In Databases
Audit log search. Called by ECS Fargate Workers (indexes).
If it goes down, 1 of 13 components degrades.
Amazon RDS PostgreSQL
In Databases
Tenant data store. Called by Node.js API (queries).
If it goes down, 4 of 13 components stop working.
AWS Secrets Manager
In Security
Secrets store. Called by Node.js API (reads).
If it goes down, 1 of 13 components degrades.
AWS KMS
In Security
Key management. Called by Node.js API (encrypts).
If it goes down, 1 of 13 components degrades.
Amazon CloudWatch
In AWS
Logs and metrics. Calls Core Services (monitors).
If it goes down, 2 of 13 components degrade.
Sentry
Error tracking. Calls Node.js API (tracks) and Next.js Frontend (tracks).
If it goes down, 2 of 13 components degrade.
When this stack fits
- Buyers are large companies whose security reviews ask for SAML SSO, an audit log and isolated data.
- You already run on AWS and want everything in one account, under one set of access controls.
- Exports and indexing are heavy enough to need their own workers.
When to pick something else
- You’d rather not build SAML and SCIM yourself: a service such as WorkOS handles both and plugs into the same API.
- Customers want a database of their own: this diagram has one RDS database, so per-customer databases need a different data layer.
- Customers are small teams: the B2B SaaS example on managed services goes live much sooner.
What you need to build this
14 components across 8 areas of the stack.
Build it with your AI agent
Hand the stack to Claude Code, Codex, Cursor or any coding agent as a brief: how it connects, install steps and a build plan.
Frontend1
- Docs
Next.js Frontend
Analytics UI
npm install next
Data1
- Docs
Amazon RDS PostgreSQL
Tenant data store
Search1
- Docs
Amazon OpenSearch Service
Audit log search
Storage & CDN1
- Docs
Amazon S3
Export artifacts
Hosting & infra4
Observability2
Install
npm install next @sentry/nextjs
SDKs only. Pick your own database driver or ORM.