Octomind
Same model as opencode, same endpoint, same prices — octomind solved 24/25 to its 19/25, at half the cost. Open-source agent runtime: one binary, any model, runs unattended in CI. Apache 2.0.
Drop-in multi-tenancy for Node.js and TypeScript. Hierarchical tenants, config inheritance, three isolation strategies (RLS, schema, database), GDPR compliance. Open source, MIT licensed.
Developer toolsTypeScript · MDXGitHub @stratum-hqOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Drop-in multi-tenancy for Node.js. Tenant hierarchy, config inheritance, permissions, audit, and GDPR in one library.
Taken from the repository README
Loading the full README.
Read the full README ↗Stratum gives you hierarchical multi-tenancy with config inheritance, permission delegation, three isolation strategies (RLS, schema-per-tenant, database-per-tenant), field-level encryption, audit logging, GDPR compliance, and multi-region support. Built for B2B SaaS, MSSP/MSP architectures, and any product that needs nested tenant boundaries.
tenant_id?Every SaaS team starts with tenant_id on every table. It works, until it doesn't:
Stratum gives you all of this from day one. Start with flat tenancy, grow into hierarchy, config inheritance, permissions, and isolation strategies as your product matures.
npm install @stratum-hq/lib pg
import { Pool } from "pg";
import { Stratum } from "@stratum-hq/lib";
const stratum = new Stratum({ pool: new Pool(), autoMigrate: true });
await stratum.initialize();
const org = await stratum.createOrganization({ name: "Acme Corp", slug: "acme" });
await stratum.setConfig(org.id, "seat_limit", { value: 25 });
const config = await stratum.resolveConfig(org.id);
console.log(config.seat_limit.value); // 25
That's it. autoMigrate: true creates all tables on first run. No CLI, no migrations, no Docker required (just a PostgreSQL connection string).
When you're ready for parent/child tenants, config inheritance, and permission delegation:
const msp = await stratum.createTenant({ name: "NorthStar MSP", slug: "northstar" });
const customer = await stratum.createTenant({ name: "Acme Corp", slug: "acme", parent_id: msp.id });
// Config flows root → leaf; children inherit automatically
await stratum.setConfig(msp.id, "max_seats", { value: 500, locked: true });
const config = await stratum.resolveConfig(customer.id);
// → { max_seats: { value: 500, inherited: true, locked: true } }
# Scaffold a new project (recommended)
npx @stratum-hq/create my-app
# Or add to an existing project
npm install @stratum-hq/lib pg
# HTTP SDK with Express/Fastify middleware
npm install @stratum-hq/sdk
# NestJS integration (guard, decorator, module)
npm install @stratum-hq/nestjs
# Hono middleware
npm install @stratum-hq/hono
# MongoDB tenant isolation
npm install @stratum-hq/mongodb mongodb
# MySQL tenant isolation
npm install @stratum-hq/mysql mysql2
# React admin components
npm install @stratum-hq/react
# CLI tools
npm install -g @stratum-hq/cli
| Package | What it does |
|---|---|
@stratum-hq/core | Shared types, Zod schemas, error classes |
@stratum-hq/lib | Direct library: tenants, config, permissions, ABAC, audit, GDPR |
@stratum-hq/control-plane | Fastify v5 REST API with auth, scopes, OTel, Redis rate limiting |
@stratum-hq/sdk | HTTP client with LRU cache, Express/Fastify middleware |
@stratum-hq/db-adapters | PostgreSQL adapters: raw pg, Prisma, Sequelize, Drizzle, RLS, schema/DB isolation |
@stratum-hq/mongodb | MongoDB tenant isolation: shared collection, collection-per-tenant, database-per-tenant |
@stratum-hq/mysql | MySQL tenant isolation: shared table, table-per-tenant, database-per-tenant, TypeORM/Knex/Sequelize integrations |
@stratum-hq/react | React components: tenant tree, config editor, permission editor |
@stratum-hq/cli | CLI: init, migrate, scaffold, doctor |
@stratum-hq/nestjs | NestJS integration: guard, @Tenant() decorator, module with DI |
@stratum-hq/hono | Hono middleware: tenant extraction, ALS context |
@stratum-hq/test-utils | Cross-tenant isolation test helpers |
@stratum-hq/create | Project scaffolding: npx @stratum-hq/create my-app |
docker compose --profile demo up --build
| Service | URL |
|---|---|
| Dashboard | http://localhost:3300 |
| API | http://localhost:3001 |
| Swagger | http://localhost:3001/api/docs |
The full documentation is at docs.stratum-hq.org. It covers getting started, guides (hierarchy, config, permissions, isolation, API keys, webhooks, GDPR, multi-region), the API reference, and a page for each package.
Contributors can run the docs site locally from website/ with cd website && npm install && npm run dev.
npm install # Install dependencies
npm run build # Build all packages
npm test # Run unit tests
npx @stratum-hq/cli doctor # Check your DB setup
Integration tests run against real PostgreSQL, MongoDB, and MySQL:
docker compose --profile test up -d test-db
cd packages/integration-tests
DATABASE_URL=postgresql://stratum_test:stratum_test@localhost:5433/stratum_test \
npx vitest run
| Variable | Description |
|---|---|
DATABASE_URL | PostgreSQL connection string |
JWT_SECRET | JWT signing secret (required whenever NODE_ENV is not development or test; at least 32 bytes, and not a placeholder) |
STRATUM_ENCRYPTION_KEY | AES-256-GCM key for field encryption (required, with STRATUM_HKDF_SALT in hex, whenever NODE_ENV is not development or test; at least 32 bytes there) |
REDIS_URL | Optional; enables distributed rate limiting |
STRATUM_API_KEY_HMAC_SECRET | HMAC secret for API key hashing |
See the installation guide for the full list.
@stratum-hq/lib (direct) ←→ @stratum-hq/control-plane (HTTP)
│ │
├── @stratum-hq/db-adapters ├── @stratum-hq/sdk
│ (pg, Prisma, Sequelize, │ (client, middleware)
│ Drizzle) │
│ ├── @stratum-hq/nestjs
├── @stratum-hq/mongodb │ (guard, decorator, DI)
│ (shared, collection, │
│ database isolation) ├── @stratum-hq/hono
│ │ (middleware, ALS context)
├── @stratum-hq/mysql │
│ (shared, table, database ├── @stratum-hq/react
│ isolation + ORM helpers) │ (UI components)
│ │
├── PostgreSQL 16 │
│ (ltree, RLS, AES) │
│ │
├── MongoDB 6/7 │
│ │
└── MySQL 8 │
└── @stratum-hq/cli
(init, doctor, migrate)
Stratum 1.x is on npm. Near-term focus:
@stratum-hq/control-plane docs: dedicated package page and deployment guideHave a use case we should prioritize? Open an issue.
MIT. See LICENSE.