Skip to content
LogoLogo

Zap Studio

CI License

Small, type-safe TypeScript packages for the infrastructure code every app needs — HTTP calls, retries, auth checks, validation, logging, webhooks. Done once, correctly, so you don't rebuild it per project.

npm install @zap-studio/fetch

Start with fetch

Quick Look

import { api } from "@zap-studio/fetch";
import { z } from "zod";
 
const UserSchema = z.object({
  id: z.number(),
  name: z.string(),
  email: z.email(),
});
 
// `user` is typed from UserSchema — no manual annotations, no `as` casts
const user = await api.get("https://api.example.com/users/1", UserSchema);

Packages

PackageWhat you get
@zap-studio/fetchTyped responses from any API — no manual casts
@zap-studio/loggerStructured logs anywhere — console today, any backend tomorrow
@zap-studio/monadsErrors as values you can't forget to handle
@zap-studio/oxfmtOne decided import/package.json order — no more per-repo debate
@zap-studio/oxlintA preset per stack, zero-config linting beyond oxlint's defaults
@zap-studio/permitEvery permission check in one auditable place
@zap-studio/react-hooksSmall, focused, tree-shakeable React hooks
@zap-studio/retryRetries done right — backoff, jitter, cancellation included
@zap-studio/validationOne validation error shape, whatever schema library you use
@zap-studio/webhooksVerified, routed webhooks without a hand-rolled signature check

Install only the packages you need — each one works standalone.

Why Zap Studio

Most teams solve these problems by hand, per project — and the hard parts get skipped:

  • Fragile by default. Hand-rolled retries and webhook checks quietly skip the parts that matter.
  • Scattered, not audited. Permission checks end up copy-pasted across the codebase instead of living in one place.
  • Node-only, until it isn't. Homegrown wrappers break the moment your code runs on an edge runtime or in the browser.

Every Package Follows the Same Rules

  • Type safety. Types come from your schema via Standard Schema, not hand-written annotations.
  • Framework-agnostic. Built on standard runtime APIs — fetch, Request/Response, AbortSignal.
  • Composable. Combine packages as needed — wrap a fetch call in a retry policy, validate a webhook with validation.
  • Tree-shakeable. Standalone functions, no shared state — unused exports drop out of your bundle.

Compared to Effect

If you know Effect: yes, there's overlap — typed errors, retries, schema validation. Effect is a full ecosystem built around its own runtime, and that investment pays off once you need that level of control.

Zap Studio stays in plain TypeScript — no new runtime, no new mental model, small packages you adopt one at a time. Reach for it when you don't need everything Effect brings.

Not For You If

  • You want one framework that owns your whole effect/error model — Effect is built for that.
  • You need every package to come from a single all-in-one SDK.
  • What you have today isn't costing you bugs.

Next Steps

Pick a package and follow its Getting Started guide: