A pnpm monorepo of the @celerity-sdk/* packages for building Celerity applications in Node.js.
Celerity's Node.js runtime images install them, the Celerity CLI runs the celerity-extract
tool from @celerity-sdk/cli and reads the handler manifest it writes, and celerity-docs
copies that manifest's schema.
This repo is one of NewStack's. NewStack's maintainers develop it alongside the others in a shared workspace, using the NewStack Claude Code plugin for how work is planned, reviewed, committed and coordinated across repos. The plugin isn't public, and nothing here depends on it: this file and the repo's own docs cover what a contribution needs.
Each package is in packages/<name> and published as @celerity-sdk/<name>.
| Package | Holds |
|---|---|
types, common |
Shared types and behavioural interfaces; shared runtime utilities. No internal dependencies |
config |
Configuration resolution, secret access, platform detection |
core |
Application factory, decorators, DI, layers, guards, handler adapters; uses the runtime binding @celerity-sdk/runtime |
bucket, queue, topic, datastore, sql-database, cache |
Resource abstractions, each with cloud provider SDKs as optional peer dependencies |
serverless-aws |
AWS Lambda adapter and event mapping |
telemetry |
pino logger, OpenTelemetry tracing and auto-instrumentation |
cli |
celerity-extract, which writes the handler manifest (schema in packages/cli/schemas/) |
testing |
Test harness for applications: test app, mocks, resource clients, and WebSocket testing through @celerity-sdk/ws-client |
docs/design/ is gitignored: maintainers' working notes, not present in every checkout.
Commands are in CONTRIBUTING.md; all run across every package from the root.
- Tools: Node 24 (
.node-version;enginesrequires >= 24), pnpm 9.15.4 (packageManager), docker for integration tests. Runpnpm installfirst; the git hooks need it. - Build first: packages import each other through their built
dist/, so tests andtypecheckrun against the lastpnpm run build. Rebuild after changing a package that another one's tests or types use. - Tests:
pnpm testis Vitest in watch mode and never exits; usepnpm run test:unit:no-cov(ortest:unitfor coverage).test:integrationandtest:allstartdocker-compose.yml(Valkey on 6399, LocalStack on 4566, Postgres on 5499), run withVITEST_INCLUDE_INTEGRATION=true, and stop the stack withdocker compose down -vafter. The AWS suites reach only LocalStack.- Run one stack at a time. The compose project name is fixed (
celerity-sdk-integration), so a run in another worktree shares the stack and its teardown removes it, and the ports clash with other stacks, such as the Go SDK's or Bluelink's LocalStack. If startup fails, the containers it started are left running.
- Lint and types:
pnpm run lint(all ofpackages/),pnpm run format:check(packagesrconly),pnpm run build,pnpm run typecheck. - Gates:
- With
git config core.hooksPath .githooks, pre-commit runslintandformat:checkover the repo when staged changes touchpackages/, and commit-msg runs commitlint. - CI (
ci.yml) runs format,pnpm audit --audit-level high, lint, build, typecheck,test:alland SonarQube on pull requests and pushes tomain.codeql.ymlruns CodeQL on the same triggers and weekly, andsecurity.ymlruns actionlint on pull requests.
- With
- Package APIs: pre-1.0; every package shares one version (release-please
linked-versions), and a breaking change bumps the minor version. Resource contracts are kept at parity with the Go and Python SDKs; a contract change says what each other SDK needs. - Handler manifest and
celerity-extract: the Celerity CLI depends on the extractor's command line and on handler-manifest.v1, and the Python SDK's extractor writes the same format. Additive only; anything else needs a matching change in the Celerity CLI first. Every object in the schema setsadditionalProperties: false, so a new field must also be declared inpackages/cli/schemas/handler-manifest.v1.schema.json, or the CLI package's schema-validation tests reject the output. - Runtime binding:
@celerity-sdk/runtimeis published from celerity'slibs/runtime/sdk/node; a change there reaches this repo by version bump. - Persisted state: none.
- Commits: conventional, with the types and scopes in
commitlint.config.js. - Releases: one release pull request for all packages. Merging it publishes every package to
npm with provenance;
release-please.ymlcan also publish chosen packages by hand. Don't editCHANGELOG.mdfiles, versions or.release-please-manifest.jsonby hand. - Dependency updates: Renovate (
renovate.json). .npmrcsetsauto-install-peers=false: a package's optional cloud SDK peers aren't installed for it, so add one to the package's dev dependencies to test against it.typefor data shapes, options and results;interfaceonly for behavioural contracts classes implement (CelerityLayer,ServerlessAdapter).- A layer that configures itself from environment variables reads them once, on first
initialisation, into a typed config object, and uses only that object afterwards, never
process.env.
- Don't publish packages, create tags or releases, or merge release pull requests.