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.
翻译准备中
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Drop-in multi-tenancy for Node.js. Tenant hierarchy, config inheritance, permissions, audit, and GDPR in one library.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 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.