sdxc

Type to search, or start from one of these:

Small TypeScript packages built on web standards.

Take one, or take the set. There are 60 of them, written for Remix on Cloudflare Workers: Request and Response in, typed values out. 37 of them need neither.

npm add @sdxc/result
pnpm add @sdxc/result
yarn add @sdxc/result
bun add @sdxc/result

Failure is a value, not a control flow

A handler that composes three of them, and never throws.

import { Markdown } from "@sdxc/markdown";
import { badRequest, ok } from "@sdxc/response";
import { isFailure } from "@sdxc/result";

export async function handler(request: Request) {
	let result = Markdown.parse(await request.text(), { frontmatter: Frontmatter });
	if (isFailure(result)) return badRequest({ line: result.error.position?.start.line });
	return ok(result.data.frontmatter);
}

What holds the set together

Web standards first

Request, Response, Web Crypto, Intl and Standard Schema — the platform, not a shim over it.

Errors are values

Every fallible entry point answers with a Result, so nothing throws past you and the failure carries where it happened.

Nothing you didn't ask for

Subpath exports keep what you skip out of your bundle, and 31 packages pull in nothing from outside the collection at all.

Built for Remix, not bound to it

23 target Remix directly, because that is what they are written for. The other 37 depend on no framework and run anywhere fetch does.

The packages, by the problem they solve

HTTP & responses

  • @sdxc/http

    Response builders, content negotiation, and HTTP caching for the Fetch API

  • @sdxc/response

    Semantic helpers that build Response objects for JSON APIs and redirects

  • @sdxc/api-client

    Base class for clients of a remote HTTP API: one origin, path-relative verb methods, shared hooks

  • @sdxc/pagination

    Offset and keyset pagination with parameter parsing and Link headers

  • @sdxc/server-timing

    Server-Timing measurements collected per request and written to a response header

  • @sdxc/catch-response-middleware

    Router middleware that turns a thrown Response into the request's response

  • @sdxc/get-client-ip

    Read the client IP from a Cloudflare Workers request

  • @sdxc/user-agent

    Read a User-Agent string into its browser, engine, operating system and device

Identity & security

  • @sdxc/auth

    OAuth 2.0 and OpenID Connect client for any runtime that speaks Request and Response

  • @sdxc/jwt

    JWT payload classes and the keys that sign them

  • @sdxc/passkey

    Passkeys on both sides: a one-call WebAuthn browser API and a relying party that verifies the ceremonies

  • @sdxc/saml

    SAML 2.0 service provider: verify a signed assertion, build the requests and metadata around it

  • @sdxc/crypto

    Web Crypto primitives — hashing, HMAC, tokens, TOTP, AES-GCM — plus scrypt passwords

  • @sdxc/webhooks

    Sign and verify Standard Webhooks deliveries, reporting every failure as a typed value

  • @sdxc/uuid

    Validate, assert and generate UUIDs behind a branded UUID type

  • @sdxc/typeid

    Type-safe TypeID values: a UUID and the prefix that names what it identifies

Content & formats

  • @sdxc/markdown

    GitHub Flavored Markdown: parse to a typed AST, transform it, write it back

  • @sdxc/yaml

    YAML reading and writing over a documented subset, shaped after the built-in JSON object

  • @sdxc/xml

    XML parser and serializer for RSS-style feeds

  • @sdxc/html

    Read a served page: fetch or parse HTML, then query it by role and accessible name

  • @sdxc/rss

    RSS 2.0 feed builder and parser

  • @sdxc/atom

    Atom 1.0 feed parser and builder

  • @sdxc/json-feed

    JSON Feed 1.1 builder and parser

  • @sdxc/feed

    One feed API over RSS, Atom and JSON Feed, with conditional fetching and autodiscovery

  • @sdxc/opml

    Read and write OPML subscription lists

  • @sdxc/sitemap

    Read and write the sitemap protocol: collect URLs, or fetch a published sitemap

  • @sdxc/distill

    Distill the article out of a web page: fetch under bounds, score the candidates, sanitize what is left

Data & storage

  • @sdxc/cache

    Cache contract with adapters for memory and Cloudflare KV

  • @sdxc/workers-cache

    Cache tags, purging and cache-status reads for Cloudflare Workers Cache

  • @sdxc/session-storage-kv

    A remix/session SessionStorage backed by a Cloudflare Workers KV store

  • @sdxc/data-table-d1

    A remix/data-table DatabaseDriver backed by Cloudflare D1

  • @sdxc/data-table-sqlstorage

    A remix/data-table database driver backed by a Cloudflare Durable Object's SQL storage

Interface

  • @sdxc/ui

    Styled, accessible remix/ui components rendered as server HTML

  • @sdxc/u

    Utility-first styling for remix/ui, composed from small, terse mixins

  • @sdxc/icons

    Lucide icons as remix/ui components, one tree-shakeable export per icon

  • @sdxc/i18n

    Language detection, i18next instances and translated-markup components

  • @sdxc/seo

    Canonical URLs, typed schema.org structured data and head metadata

  • @sdxc/highlight

    Syntax highlighting that returns tokens rather than markup, with a markdown walk visitor and a stylesheet keyed to the token types

  • @sdxc/lazy-route

    Maps a route to a module imported on the first request that reaches it

Operations

  • @sdxc/jobs

    Declared background jobs dispatched over a pluggable queue backend

  • @sdxc/cron

    Cron schedules with zone-aware occurrences and descriptors

  • @sdxc/logger

    One wide event per Worker invocation, attached at the router and the job dispatcher

  • @sdxc/rate-limit

    Adapter-based rate limiting with standard response headers

  • @sdxc/flags

    Feature flag evaluation implementing the OpenFeature specification

  • @sdxc/flags-engine

    Flag evaluation engine: typed targeting rules, percentage splits and pluggable stores

  • @sdxc/billing

    Vendor-neutral billing: one provider contract every payment platform is reached through, plus a webhook endpoint that verifies and deduplicates deliveries

  • @sdxc/mail

    Transport-agnostic transactional email with pluggable transports and remix/ui rendering

  • @sdxc/hostname

    Cloudflare for SaaS custom-hostname client: register, poll and delete customer domains

  • @sdxc/mcp

    Model Context Protocol servers as remix/router actions, served over stateless Streamable HTTP

Language & values

  • @sdxc/result

    Result type for error handling

  • @sdxc/types

    Shared TypeScript types

  • @sdxc/dates

    Zone-aware date operations with Intl-only formatting

  • @sdxc/duration

    Typed duration strings converted to milliseconds or seconds

  • @sdxc/strings

    English inflection, Chicago title case, slugs and grapheme-safe text

  • @sdxc/semver

    SemVer 2.0.0 parsing, precedence ordering and range-free version comparisons

  • @sdxc/location

    URL-like Location class for URL paths without an origin

  • @sdxc/validate

    Standard Schema validation utilities

Testing

  • @sdxc/spec

    Executable specification runner for .spec files

  • @sdxc/sample

    Seeded generation of believable people, places, prose, numbers and identifiers

  • @sdxc/cloudflare-mocks

    In-memory, behavior-accurate Cloudflare binding mocks for tests

Three worth the detour

Each of these does something you cannot get by reaching for another package.

Executable specifications, written in a language with no if and no loops, run in a fresh workspace under permissions you grant by name.

grant fs.write to "build/"
run "bun run build"
expect file "build/index.js" to exist

Accessible components built on <dialog>, the Popover API and Invoker Commands, rendered as server HTML that works before any JavaScript loads.

<Dialog>
	<Dialog.Trigger>Open</Dialog.Trigger>
	<Dialog.Content>
		<Dialog.Title>Delete this monitor?</Dialog.Title>
	</Dialog.Content>
</Dialog>

GitHub Flavored Markdown to a typed AST you can walk, transform and write back. This page is one: the copy you are reading is a markdown file, and the sections are tags with attribute schemas.

let painted = Markdown.walk(document, highlight);

Install and pin

Versions are dates. A release published on the 21st of September 2026 is 2026.9.21, there is at most one a day, and a later date means a later release and nothing more — it promises no compatibility with the one before it.

So pin exactly, and move when you are ready to read what changed.

{
	"dependencies": {
		"@sdxc/result": "2026.9.21"
	}
}

Where to go next

Learning

Start with the guides — what these are, how to install them, and your first handler.

Browsing

Every package, filterable by name and by what it does.

Watching

What shipped, and when, one entry per release date, with the commits that went into it.

MIT licensed, and written by Sergio Xalambrí.