Skip to content
Architecture-Backed Security

Enterprise-grade student data isolation & zero compromise

Every technical claim we make is implemented in the database and service source code. No marketing buzzwords — just cryptographic isolation and hardened microservice boundaries.

PostgreSQL RLS
SHA-256 Hashing
JWT Gateway
DLQ Fault Tolerance
Defense in Depth Mascot with Cyber Shield
Defense in Depth

Four layers of protection

Every request passes through multiple verified trust boundaries before touching student data.

Security Pillars

Six layers of data protection

Each security measure is verifiable in our open-source codebase. We show the exact file path as proof.

PostgreSQL FORCE ROW LEVEL SECURITY

Postgres RLS is forced on every tenant table. Queries execute inside transactional scopes using set_config('app.current_tenant'), guaranteeing that one institute can never read or mutate another institute's records — even if the application itself has a bug.

Code Proof: infra/postgres/init/002_rls.sql

Gateway Trust Boundary

The API gateway is the single JWT verifier. All client-supplied identity headers (x-tenant-id, x-user-role) are stripped on arrival and replaced with verified claims extracted from the access token before proxying to downstream services.

Code Proof: services/api-gateway/src/identityHeaders.js

Opaque Rotating Refresh Tokens

Refresh tokens are 64-character opaque strings hashed with SHA-256 at rest. Every token use revokes the previous token and issues a new pair, preventing replay attacks and making stolen tokens immediately useless.

Code Proof: services/iam-svc/src/tokens.js

Rate-Limited Edge Protection

Strict brute-force rate limiters (20 requests per 15 minutes) guard all authentication and checkout endpoints, protecting against automated credential stuffing and denial-of-service attempts.

Code Proof: services/api-gateway/src/server.js

RBAC + ABAC Policy Engine

The shared @nxtgen/authz package enforces both role-based and attribute-based access control. User permissions are gated by their role (SuperAdmin, TenantAdmin, Teacher, Student) and their tenant's subscription plan features.

Code Proof: packages/authz/index.ts

Event-Driven Fault Isolation

Failed event messages are dead-lettered to a dedicated exchange (nxtgen.events.dlx) instead of being dropped. No attendance scan or payment event is ever silently lost, even during downstream outages.

Code Proof: services/notify-worker/src/consumer.js

Compliance and Data Trust Network Grid
Compliance & Trust

Built with compliance in mind

From encryption to audit trails, every component is designed to protect student data at every stage.

Encryption at Rest

SHA-256 hashed tokens, bcrypt-salted passwords

Encryption in Transit

TLS 1.3 enforced on all API endpoints

PDPA Sri Lanka Aligned

Personal Data Protection Act compliant data handling

Audit Trail Logging

Every authentication, data mutation, and admin action is logged

Data Residency Transparency

Full disclosure on hosting region and data jurisdiction

Backup & Recovery

Automated PostgreSQL backups with point-in-time recovery

Data Lifecycle Orbital Pipeline
Data Lifecycle

Protected at every stage

Your student data is secured whether it is stored, transmitted, processed, or backed up.

At Rest

bcrypt-salted passwords, SHA-256 hashed tokens, RLS-isolated tenant data partitions.

In Transit

TLS 1.3 on all API endpoints. Internal service-to-service calls use shared-secret HMAC verification.

In Use

Transactional RLS scoping, JWT-verified identity headers, RBAC/ABAC policy enforcement on every request.

In Backup

Automated PostgreSQL backups with point-in-time recovery. Dead-letter queues preserve failed events for replay.

Space background
Security FAQ

Common security questions

Transparent answers about how we protect your institute's data.

NXTGEN uses a PostgreSQL multi-tenant shared-schema architecture enforced with strict Row-Level Security (FORCE ROW LEVEL SECURITY). Every database query is scoped to your tenant ID using set_config('app.current_tenant', tenantId, true) inside a transaction, making cross-tenant data access impossible — even if the application itself had a bug.

Ready to secure your student data?

Start your 14-day free trial. Enterprise-grade PostgreSQL RLS isolation, zero-hardware QR attendance, and automated LKR fee collection — all included.