@c9up/ream
Rust-powered Node.js application framework. Convention over configuration with native performance.
@c9up/ream ships the TypeScript framework; its prebuilt Rust (NAPI) binaries come in one npm package per platform, so consumers never compile anything.
Installation
pnpm add @c9up/ream
Each platform's three binaries (HTTP server, scheduler, event bus) are one npm package, which @c9up/ream lists as an optional dependency at its exact version:
| Platform |
Package |
| Linux x64 (glibc) |
@c9up/ream-linux-x64-gnu |
| Linux arm64 (glibc) |
@c9up/ream-linux-arm64-gnu |
| macOS x64 |
@c9up/ream-darwin-x64 |
| macOS arm64 |
@c9up/ream-darwin-arm64 |
| Windows x64 |
@c9up/ream-win32-x64-msvc |
Your package manager installs only the one that matches the machine (os, cpu and libc fields), so an install downloads one platform's binaries and needs no Rust toolchain. Do not install with optional dependencies omitted (--no-optional, --omit=optional): that skips it. Linux binaries target glibc; musl (Alpine) is not supported.
When the binary is missing, loading it throws E_REAM_NAPI_NOT_FOUND. Its help names the package to install; the load error is the exception's cause.
In a checkout of this repository, pnpm build:napi builds index.<platform>.node, scheduler.<platform>.node and events.<platform>.node at the package root, and ream loads those files before looking for the platform package. After a version bump, node scripts/platform-packages.mjs rewrites the platform packages' manifests (npm/<platform>/package.json) and the optional dependencies; CI fails when they are stale.
Features
- IoC Container —
@Service(), @Inject(), auto-resolution, scopes
- Lifecycle — register → boot → start → ready → shutdown
- Router — fluent chaining, groups, params, guards, versioning, named routes +
urlFor() URL builder (namedManifest() exposes them to the client)
- Middleware pipeline — onion pattern, global + named, guard enforcement
- HTTP server — Rust Hyper via NAPI
- Static files —
public/ served with ETag, Last-Modified and byte ranges, guarded against escaping the directory (@c9up/ream/storage/provider)
- Event bus — in-process emitter with optional Redis store (
@c9up/ream/events)
- Scheduler — cron/interval tasks via the
@Schedule() decorator (Rust-backed)
- GraphQL & RPC — built-in GraphQL engine and typed RPC router
- Security primitives — signed cookies, HMAC, signed URLs, trusted-proxy config (request-filter security — XSS / CSRF / rate-limiting — lives in @c9up/blackhole)
- Error DX — structured errors, fuzzy matching, pipeline stage context
- Health check — Kubernetes-compatible
/health endpoint
- Graceful shutdown — SIGTERM/SIGINT with drain timeout
Quick Start
import { Ignitor } from '@c9up/ream'
const app = new Ignitor({ port: 3000 })
.httpServer()
.routes((router) => {
router.get('/hello/:name', async ({ params, response }) => {
response.status(200).send(`Hello, ${params.name}!`)
})
})
await app.start()
Testing
Declare your suites in the tests block of reamrc.ts, and ream test
runs them:
// reamrc.ts
export default defineConfig({
tests: {
timeout: 2_000,
forceExit: false,
suites: [
{ name: 'unit', files: ['tests/unit/**/*.spec.(js|ts)'] },
{
name: 'functional',
files: ['tests/functional/**/*.spec.ts'],
timeout: 30_000,
// The per-suite `configure`. Costs an import of this file in every
// worker — `configureSuite` in tests/bootstrap.ts does the same for free.
configure: (suite) => suite.setup(() => startHttpServer()),
},
],
},
})
ream test # every suite, in order
ream test functional # one suite
ream test --bail --threads=4
ream test sets NODE_ENV=test and loads the .env files itself, before
spawning anything: .env.test wins over .env, .env.local is skipped so
a developer's local overrides never decide what CI runs, and the shell keeps
the last word. The app writes no hook for this — the workers inherit the
environment of the process that spawned them.
forceExit: true makes the run call process.exit() once it ends instead
of waiting for the event loop to drain — the answer to a pool or a server the app left open. Without it the
process exits on its own, so a leaked handle surfaces as a diagnosable
hang rather than being swallowed.
The work is split in two: ream reads its rc file and hands the suites to the
runner (@c9up/helix), which runs them. helix knows nothing
about ream, and ream owns no test execution. tests/bootstrap.ts
— plugins, runnerHooks, configureSuite — is helix's, unchanged.
Driving it yourself (a bin/test.ts, a console command) is the same call:
import { runTestsFromRcFile } from '@c9up/helix-plugin-ream/runner'
process.exitCode = await runTestsFromRcFile('./reamrc.ts', {
suites: process.argv.slice(2),
})
Ecosystem
Every package is standalone and publishable on its own; they consume the Ream
universe through the container, never via a static import.
| Package |
Description |
| @c9up/archive |
File storage (Local + S3-compatible) |
| @c9up/atlas |
Data Mapper ORM |
| @c9up/atom |
Exact decimal arithmetic |
| @c9up/aurora |
Reactive UI runtime (SSR + hydration) |
| @c9up/bay |
Job queue (memory + Redis drivers) |
| @c9up/blackhole |
Security filter — XSS, CSRF, rate-limiting (Rust-native) |
| @c9up/chronos |
Date/time & recurrence engine |
| @c9up/comet |
JSON-RPC 2.0 protocol + isomorphic client |
| @c9up/echo |
Cache (memory + Redis drivers) |
| @c9up/eclipse |
Distributed locks (owner-checked leases, memory + Redis stores) |
| @c9up/eon |
Time-series data layer (TDengine-backed) |
| @c9up/ephemeris |
Structured data — schema.org JSON-LD, Google's rich-result requirements checked |
| @c9up/helix |
Framework-agnostic test runtime |
| @c9up/helix-plugin-ream |
The ream↔helix bridge (boots a Ream app under test) |
| @c9up/inker |
Server-side templating |
| @c9up/lumen |
Terminal UI — colours, tables, spinners, task lists (what the console prints with) |
| @c9up/nebula |
shadcn/ui ported to Aurora, as atomic design |
| @c9up/nova |
Web Push notifications (VAPID) |
| @c9up/orbit |
Aurora components as native views on Android (Rust host, UI-thread gestures and motion) |
| @c9up/parsec |
Metrics & telemetry (Prometheus exporter, optional OpenTelemetry) |
| @c9up/photon |
Frontend rendering engine |
| @c9up/prism |
Image processing — resize, convert, crop, composite, watermark (Rust-native) |
| @c9up/quasar |
Redis connections (named, pub/sub, health checks) |
| @c9up/ream-cli |
CLI & code generators (Rust binary, ream command) |
| @c9up/ream-mcp |
MCP server — agent-ready framework assistant |
| @c9up/relay |
Realtime transport (SSE; WebSocket Hub protocol implemented, no server upgrade point yet) |
| @c9up/robledo |
Over-the-air updates for the mobile app (signed, verified, rolled back) |
| @c9up/rosetta |
Internationalization (i18n) |
| @c9up/rover |
Mail (SMTP, SES, Mailgun, SendGrid, Brevo, Resend, SparkPost, log) |
| @c9up/rune |
Validation engine |
| @c9up/sigil |
Password hashing (argon2, bcrypt, scrypt) |
| @c9up/spectrum |
Structured logging |
| @c9up/station |
Admin scaffolding |
| @c9up/transit |
Federated sign-in (SAML 2.0, LDAP, OpenID Connect, OAuth1, OAuth2) |
| @c9up/vellum |
PDF (render, read, reshape, stamp, forms, signing, verification) |
| @c9up/visa |
OAuth 2.1 authorization server (PKCE, rotating refresh tokens, introspection) |
| @c9up/warden |
Authentication |
License
MIT