Skip to content

Packages

Basalt is a set of small, focused packages under the @basaltkit/* scope. Each works on its own; together they form the framework. Versions move in lockstep (currently 0.31.0, 69 packages).

Foundation

PackagePurpose
@basaltkit/coreDI container, plugin lifecycle, AsyncLocalStorage context, hooks
@basaltkit/configNamespaced, typed configuration with dot-path access
@basaltkit/envZod-validated environment variables with an aggregated report
@basaltkit/eventsTyped domain event bus with wildcards and priorities; transactional outbox
@basaltkit/events-sqlite · @basaltkit/events-prismaDurable backends for the @basaltkit/events OutboxStore — crash-safe transactional outbox; SQLite (zero-dep) and Prisma (Postgres/MySQL)
@basaltkit/loggerPino logger, auto-enriched with request/tenant context, redaction

HTTP

PackagePurpose
@basaltkit/httpFramework-neutral core — typed routes, pipeline, error mapping, edge plugins
@basaltkit/fastify · @basaltkit/express · @basaltkit/honoAdapters — the same routes run on any of them
@basaltkit/sdkType-safe client inferred from Zod endpoint definitions

Data & infrastructure

PackagePurpose
@basaltkit/prismaTenant-scoping client extension, per-tenant LRU client pool, ctx().db
@basaltkit/cacheRedis/Memory drivers, tags, TTL, stampede protection, per-tenant keys
@basaltkit/cache-tieredMulti-level cache driver — in-process near cache in front of Redis
@basaltkit/storageLocal/S3/MinIO under one contract, tenant isolation, signed URLs
@basaltkit/storage-gcs · @basaltkit/storage-azureGoogle Cloud Storage & Azure Blob drivers
@basaltkit/mailerTyped declarative mails, SMTP/log/memory drivers, tenant sender
@basaltkit/schedulerFluent cron: schedule.job(X).daily().at('03:00')

Queues

PackagePurpose
@basaltkit/queueDeclarative jobs, context propagation, pluggable driver + capability checks
@basaltkit/queue-rabbitmqRabbitMQ driver — retries, backoff, delay, priority via DLX
@basaltkit/queue-kafkaKafka driver — produce/consume with retry + dead-letter topics
@basaltkit/queue-sqsAmazon SQS driver — native delay, retries with backoff, DLQ

SaaS domain

PackagePurpose
@basaltkit/tenancyResolvers, per-request tenant context, lifecycle hooks
@basaltkit/tenancy-sqlite · @basaltkit/tenancy-prismaDurable backends for the @basaltkit/tenancy TenantSource — persist the tenant registry and custom domains; SQLite (zero-dep) and Prisma (Postgres/MySQL)
@basaltkit/authPassword hashing, JWT + refresh rotation, sessions, email verification, password reset, API keys, MFA (TOTP)
@basaltkit/auth-sqliteDurable SQLite (node:sqlite) backend for every @basaltkit/auth store — survives restarts, zero deps
@basaltkit/auth-prismaPrisma backend for every @basaltkit/auth store — Postgres/MySQL, ships a reference schema, pass your PrismaClient
@basaltkit/permissionsRoles, wildcard permissions, policies, tenant scoping, super admin
@basaltkit/permissions-sqlite · @basaltkit/permissions-prismaDurable backends for the @basaltkit/permissions AccessStore — SQLite (zero-dep) and Prisma (Postgres/MySQL)
@basaltkit/teamsMulti-user tenants — roles, email invitations, membership, teamRole guard
@basaltkit/teams-sqlite · @basaltkit/teams-prismaDurable backends for the @basaltkit/teams stores — SQLite (node:sqlite, zero-dep) and Prisma (Postgres/MySQL)
@basaltkit/subscriptionsPlans, trials, feature limits, gateway drivers, hosted Checkout & Portal, proration
@basaltkit/subscriptions-sqlite · @basaltkit/subscriptions-prismaDurable backends for the subscription, usage (atomic consume) and webhook stores — SQLite (zero-dep) and Prisma (Postgres/MySQL)
@basaltkit/flagsFeature flags — per-tenant/user targeting, deterministic rollouts
@basaltkit/webhooksOutbound webhooks — signed delivery, retries, per-tenant subscriptions
@basaltkit/webhooks-sqlite · @basaltkit/webhooks-prismaDurable backends for the @basaltkit/webhooks WebhookStore — persist endpoint subscriptions across restarts; SQLite (zero-dep) and Prisma (Postgres/MySQL)
@basaltkit/audit · @basaltkit/activity · @basaltkit/notificationsAudit trail, activity feed, multi-channel notifications
@basaltkit/comments-sqlite · @basaltkit/comments-prismaDurable backends for the @basaltkit/comments CommentStore
@basaltkit/audit-sqlite · @basaltkit/audit-prisma · @basaltkit/activity-sqlite · @basaltkit/activity-prisma · @basaltkit/notifications-sqlite · @basaltkit/notifications-prismaDurable SQLite/Prisma backends for the audit, activity and in-app notification stores

Capabilities

PackagePurpose
@basaltkit/realtimeServer→client push (WebSocket/SSE), per-tenant channels, presence, events bridge, Redis backplane
@basaltkit/realtime-clientZero-dep browser client for @basaltkit/realtime — subscribe channels, auto-reconnect
@basaltkit/searchTenant-scoped full-text search — in-memory (dev) & Meilisearch drivers, auto-sync from events
@basaltkit/search-postgresPostgreSQL full-text driver (tsvector/ts_rank) for @basaltkit/search
@basaltkit/filesUpload pipeline over storage — type/size validation, per-tenant quota, metadata, scan hooks
@basaltkit/commentsPer-resource comment threads — @mentions, resolve/reopen, events for realtime & notifications
@basaltkit/i18nInternationalization — context-resolved locale, typed catalogs with plurals, Intl formatting
@basaltkit/exports · @basaltkit/exports-xlsxTyped data exports → CSV/TSV/JSON/NDJSON and a zero-dep XLSX formatter

Self-contained UIs

Dependency-free HTML pages served over your existing JSON routes.

PackagePage
@basaltkit/audit-viewer/audit/view — browse the audit trail (filters, stats)
@basaltkit/api-keys-ui/apikeys/ui — create/list/revoke API keys
@basaltkit/teams-ui/team/ui — invitations & members
@basaltkit/billing-ui/billing/ui — plans, Checkout, Customer Portal

Developer experience & product

PackagePurpose
create-basaltProject scaffolder
@basaltkit/cli · @basaltkit/generatorThe basalt command framework and basalt make scaffolding
@basaltkit/testingcreateTestApp, mail/queue fakes, time travel
@basaltkit/admin · @basaltkit/dashboard · @basaltkit/admin-react · @basaltkit/admin-shadcnHeadless admin/dashboard engines + React and shadcn/ui bindings

The dependency rule

A package may only depend on packages in a lower layer (foundation → infrastructure → domain → capabilities). Same-layer packages communicate through events and core contracts, never direct imports — which is why any package can be adopted on its own, and why drivers (queue, storage, search, cache) plug in behind a stable contract.

Released under the MIT License.