Type-safe, composable TypeScript utilities for Node.js, organized as a monorepo of focused packages.
LagomKit packages follow a consistent pattern: small service factories, typed contracts, and swappable drivers where it makes sense.
LagomKit is built around the idea of balanced tooling: not too abstract, not too low-level. Each package aims to provide just enough structure to keep code predictable and type-safe, without forcing a heavyweight framework or hiding core behavior.
- Strong TypeScript inference for safer APIs
- Small, focused packages that do one job well
- Consistent service-style architecture across packages
- Practical defaults with room for custom behavior
| Package | State | Purpose |
|---|---|---|
@lagomkit/bouncer |
✅ | Type-safe authorization with policy/action checks |
@lagomkit/encoder |
✅ | Encoding toolkit (base32, base64, base64url, hex) |
@lagomkit/hasher |
✅ | Hashing toolkit (Argon2, bcrypt, SHA-1, SHA-2, SHA-3) |
@lagomkit/limiter |
✅ | Rate-limiting service with an in-memory driver |
@lagomkit/mailer |
✅ | Mail delivery service with an SMTP driver |
@lagomkit/queue |
✅ | Typed job queue service built on pg-boss |
@lagomkit/random |
✅ | Random string/token/UUID generation |
@lagomkit/cache |
🤔 | Typed caching toolkit with TTL and pluggable drivers |
@lagomkit/encryptor |
🤔 | Typed encryption toolkit with composable drivers |
@lagomkit/env |
🤔 | Type-safe environment variable loader with validation |
@lagomkit/kv |
🤔 | Typed key-value storage with TTL and pluggable drivers |
@lagomkit/otp |
🤔 | Typed one-time password toolkit for generation and verification |
@lagomkit/secrets |
🤔 | Typed secrets management with pluggable providers |
@lagomkit/storage |
🤔 | Typed file storage toolkit with pluggable drivers |
@lagomkit/logger |
🤔 | Structured logging toolkit with pluggable transports |
@lagomkit/oauth |
🤔 | Typed OAuth toolkit for provider-based authentication flows |
Install only the package you need:
pnpm add @lagomkit/bouncer
pnpm add @lagomkit/encoder
pnpm add @lagomkit/hasher
pnpm add @lagomkit/limiter
pnpm add @lagomkit/mailer
pnpm add @lagomkit/queue
pnpm add @lagomkit/randomThen follow the package-specific docs in packages/*/README.md for usage details.
- Node.js 24+
- pnpm 10+
pnpm installpnpm -r build
pnpm -r test
pnpm -r coverage
pnpm -r checkRun a command for one package:
pnpm --filter @lagomkit/encoder testThis repository uses Changesets and a GitHub Actions release workflow.
- Configure npm Trusted Publishing (OIDC) for this repository/workflow on each package in npm.
- Ensure each publishable package has
"publishConfig": { "access": "public" }.
- Add your code changes.
- Create a changeset:
pnpm changeset. - Open a PR and get
CIgreen. - Merge to
main. Releaseruns automatically after successfulCIonmainand opens/updates achore: version packagesPR.- Merge the version PR to publish updated packages to npm.
pnpm changeset
pnpm changeset version
pnpm changeset publishMIT - see LICENSE.