Skip to content

http-status-lite

packageLast commit

Tiny, standards-backed, type-safe HTTP status codes for Node.js and browsers.

Role
Library design and package engineering
Scope
Typed APIs, compatibility, and package distribution
Status
Published npm package
http-status-lite interface preview

Problem

Developers need status-code names, categories, and lifecycle metadata without memorized numeric checks, stale hand-written lists, or a heavy dependency.

Constraints

  1. C1

    IANA registry state changes over time.

  2. C2

    Obsolete, temporary, and unused codes must remain distinguishable.

  3. C3

    API typing and ESM/CommonJS compatibility must not depend on live network access.

Architecture

Committed IANA-derived registry and generated typed library; independently importable constants/predicates/metadata entry points; workspace-linked interactive reference and automated registry/release workflows.

01

Core library

Committed IANA-derived registry and generated typed library.

02

Package builds

Independently importable constants/predicates/metadata entry points.

03

Documentation app

Workspace-linked interactive reference and automated registry/release workflows.

Decisions

D1

Commit the registry snapshot

Commit the registry snapshot instead of fetching at runtime, trading periodic maintenance for deterministic builds.

D2

Preserve lifecycle metadata

Preserve lifecycle metadata rather than flattening every number to "valid".

D3

Expose separate entry points

Expose separate entry points to support focused imports while retaining a complete main API.

Contribution

  • Built the typed registry, lookups, parsers, and status-class predicates.
  • Modeled permanent/temporary/obsolete/unused entries.
  • Added generator/drift and package publishing gates.
  • Implemented an interactive status reference that consumes the local library.

Outcomes

  • Consumers can retrieve status metadata.
  • Classify success/client/server categories.
  • Parse and validate codes.
  • Use a reviewable standards snapshot without runtime network access.

Product screenshot

http-status-lite interface preview
http-status-lite presents tiny, standards-backed, type-safe HTTP status codes for Node.js and browsers.

Verified stack

  • TypeScript
  • Node.js
  • ESM
  • CommonJS
  • tsup
  • TanStack Start
  • React
  • Tailwind CSS
  • Vite
  • Netlify
  • GitHub Actions
  • CI/CD
  • System Design

Working through something similar?

Share your challenge, scope, and timeline to start a focused conversation.