npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tempest-express-sdk

v0.20.1

Published

Shared Express/Zod/tempest-db-js building blocks: base schemas, repository, exceptions, pagination, settings and native Swagger + Redoc — the conventions used across Tempest projects, ported from tempest-fastapi-sdk.

Readme

tempest-express-sdk

Shared Express + Zod + tempest-db-js building blocks — a Node.js/TypeScript port of the conventions in tempest-fastapi-sdk.

📖 Documentation: Português (BR) · English (US)

Strict TypeScript, @-alias imports (no .js suffixes), native Swagger UI + Redoc generated straight from your Zod schemas, and a layered router → controller → service → repository → model stack built on tempest-db-js.

⚠️ Status: pre-alpha (v0.1.0). Foundation layer is built and tested; many tempest-fastapi-sdk feature modules are not yet ported (see Roadmap).

Install

npm install tempest-express-sdk tempest-db-js express zod

tempest-db-js is a required peer dependency.

What's inside

| Area | Exports | | --- | --- | | core | JSONLogger, configureLogging, request-id context (getRequestId, runWithRequestContext), defineEnum | | exceptions | AppException + ConflictException / NotFoundException / UnauthorizedException / ForbiddenException / ValidationException / TooManyRequestsException / InvalidTokenException / ExpiredTokenException, MessageCatalog (i18n) | | schemas | z (OpenAPI-augmented), baseResponseSchema, toDict, paginationFilterSchema / paginationSchema, cursor + delta-sync pagination, buildPaginationLinkHeader, validated field types (centsField/priceField/slugField/…), logEntrySchema | | settings | loadSettings, baseAppSettingsShape (server / database / CORS) + domain fragments (jwtSettingsShape, authSettingsShape, emailSettingsShape, redisSettingsShape, sessionSettingsShape, uploadSettingsShape, minioSettingsShape, …), envBoolean / envList | | db | re-exports tempest-db-js + BaseModel, tableNameFor, soft-delete / audit column helpers; TenantScopedRepository, BaseOutboxModel + OutboxRelay, BaseAuditLogModel + snapshot/diffSnapshots, BaseUserModel / BaseUserTokenModel / BaseUserRefreshTokenModel, wrapWithSlowQueryLog, backupDatabase | | services / controllers | BaseService, BaseController over a typed repository | | utils | CPF/CNPJ/CEP/phone/UF + cities, PasswordUtils, JWTUtils, opaque tokens, AttemptThrottle, sendFileDownload/sendBytesDownload (Range), configureFileLogging (per-level + 500.log) | | auth | UserAuthService, JWT middleware + role guards, makeAuthRouter; MFA (MfaService), email activation, password reset; optional HTML pages (renderAuthResultPage, renderPasswordResetFormPage) | | cache / queue / tasks | CacheManager (+cached), BrokerManager (memory/RabbitMQ), TaskManager | | sse / websockets | SSEBroker/sseResponse (+ RedisSSEBroker), transport-agnostic WebSocketHub + attachWebSocketHub | | flags / storage | FeatureFlags (+ guard), UploadStorage/LocalUploadStorage/S3UploadStorage (MinIO/S3) | | webpush / email | WebPushDispatcher (VAPID), EmailUtils (SMTP) | | server utils | TOTPHelper (MFA), HTTPClient (retry + circuit breaker), MetricsUtils (+ Prometheus, GPU), makeMetricsRouter, getClientIp | | integrations | MessagingProvider contract; WhatsAppProvider (zap-api), TelegramProvider (Bot API), TwilioSmsProvider (SMS), EmailProvider, MessagingHub + broadcastText, webhook receivers | | admin | AdminSite + makeAdminRouter — JSON admin with auto-derived CRUD + introspection | | api | createApp, runServer, registerExceptionHandlers, createOpenApiRegistry, generateOpenApiDocument, mountSwaggerUi, mountRedoc, makeHealthRouter | | api/middlewares | rateLimitMiddleware (memory/Redis stores, IP/header/JWT keys), bodySizeLimitMiddleware, csrfMiddleware, idempotencyMiddleware (memory/Redis), GracefulShutdown, requestTracingMiddleware, prometheusMiddleware / HttpMetrics | | api/oauth | GoogleOAuthClient, GitHubOAuthClient, OIDCProvider, generateOAuthState; WebhookSignatureVerifier; makeToolSpecRouter | | testing | createTestDatabase, withTestDatabase — in-memory SQLite engine with tables reflected from your models |

Quick start

import { createApp, createOpenApiRegistry, runServer, z } from "tempest-express-sdk";

const registry = createOpenApiRegistry();
const Item = registry.register("Item", z.object({ id: z.string().uuid(), name: z.string() }));

const app = await createApp({
  corsOrigins: "*",
  openapi: { registry, info: { title: "My API", version: "1.0.0" } },
  configure: (app) => {
    app.get("/api/items", (_req, res) => res.json([]));
  },
});

await runServer(app, { host: "127.0.0.1", port: 8000 });
// Swagger UI → /docs   ·   Redoc → /redoc   ·   spec → /openapi.json   ·   health → /health

CLI

npx tempest-express new my-service   # scaffold a runnable layered service
cd my-service && npm install && npm run dev

The generated project is a complete vertical slice (model → repository → service → controller → router → app) pre-wired with createApp, Swagger/Redoc and Zod.

Develop

npm install
npm run test:types   # tsc --noEmit
npm test             # vitest
npm run build        # tsup → dual ESM + CJS + .d.ts (+ CLI bin)
npm run lint         # biome

Roadmap

Ported: core, exceptions (+ i18n), schemas, pagination, settings, BaseModel, BaseRepository/BaseService/BaseController, createApp + Swagger/Redoc, health, CLI new.

Also ported: BR utils (CPF/CNPJ/CEP/phone/UF + cities), PasswordUtils, JWTUtils, opaque tokens, AttemptThrottle, the auth module (signup/login/ refresh + JWT guards), cache, sessions, queue (RabbitMQ), background tasks, SSE, WebSockets, feature flags, object storage, CLI generate/secret/docker-compose, and the bilingual MkDocs docs site.

Also shipped: the integrations/ module — a typed WhatsApp client over zap-api behind a shared MessagingProvider contract.

Planned (see ROADMAP.md): additional MessagingProvider channels (more SMS vendors, a transactional-email provider) under the shared contract.

License

MIT