back to projects
preview coming soon
full-stackmulti-tenant RLS

Kairos

Multi-tenant OKR platform with Postgres RLS, partitioned audit logs, and real-time SSE dashboards.

The problem

Building multi-tenant SaaS is easy until you need proper data isolation, audit logging, and real-time updates. Most solutions either sacrifice security for convenience or become unmaintainable.

Architecture

Next.js (App Router) → Spring Boot API → Postgres (RLS)
                                    ↓
                              Redis (sessions, cache)
                                    ↓
                              SSE endpoint (real-time)
                                    ↓
                              OpenTelemetry → Grafana

Key decisions

DecisionChoiceWhy
Multi-tenancyPostgres RLSRow-level security at the database layer. Can't accidentally leak data.
Audit logsPartitioned tablesTime-based partitioning for efficient queries and retention policies.
Real-timeSSE over WebSocketSimpler, works through proxies, sufficient for dashboard updates.

Results

TENANTS
50+
isolated workspaces
LATENCY
<100ms
p99 API response
UPTIME
99.9%
over 6 months