What exo-kit is

@exo/kit is a TypeScript library of small, independent modules for self-hosted services. The package carries the MIT licence; its source repository is private for now. One package version covers every module, and each module is imported from its own subpath.

The rule#

A module is a factory with an explicit config. It never reads process.env, and it never knows the name of a product.

You call a factory once in a small wiring file, pass it the configuration, and export what it returns. The rest of your code imports that file.

Modules#

ImportWhat it gives you
@exo/kit/envdefineEnv, str, num, bool, url, enumOf, renderEnvExample: one validated, typed environment schema.
@exo/kit/healthcreateHealth: live() and ready() probes as Web Responses.
@exo/kit/logcreateLogger: JSON logs to stdout and an audit trail.
@exo/kit/telemetrycreateTelemetry: one place that receives "something went wrong".
@exo/kit/telemetry/sentrywireSentry, createScrubber, scrubEvent: Sentry on that seam, with secrets scrubbed.
@exo/kit/infracreateDb (Postgres), createRedis.
@exo/kit/signincreateExoSignIn, fromPg, fromPostgres: sign in with an exo account and keep your own sessions.
@exo/kit/gatecreateGateClient: ask the exo gate who a request belongs to.
@exo/kit/aicreateAiClient: ask the exo AI gateway for a model tier.
@exo/kit/mailercreateMailer: transactional email over Resend.
@exo/kit/botcreateBotRoute, fromExoUsers, botpark: the product side of a Telegram bot.
@exo/kit/connector-sdkcreateConnectorHandler: a signed route that lets a support desk read facts about your product.
@exo/kit/httpvalidateHost, isReservedAddress: a check against server-side request forgery.
@exo/kit/clientfetchJson, jsonBody, cn, createI18n, useLanguage and more: the browser half.
@exo/kit/migratesyncKitMigrations, checkKitMigrations and the exo-kit-migrations command.

The package also ships Dockerfile and compose templates. See Migrations and templates.

Dependencies#

Each module pulls in only what it needs, so importing a logger does not require a database driver. The peer dependencies pg, postgres, ioredis, pino, zod and react are all optional: install the ones your imported modules use.

ModuleNeeds
envzod
logpino
infrapostgres, ioredis
clientreact (only for createI18n and useLanguage)
health, telemetry, ai, mailer, http, gatenothing

The root import @exo/kit exports types only. Import the factories from their subpaths.

Start with Install and wire a module.