Public Wiki32,248View on GitHub
Want remix-run/remix knowledge in your AI?

docs

The Remix framework's next-generation modular monorepo — a collection of composable, web-standard packages that together form a full-stack web framework built entirely on the Fetch API (Request/Response). It provides a custom JSX component framework with SSR and hydration, a fetch-based router with middleware, HTTP primitives (headers, cookies, sessions, multipart parsing), file storage, and Node.js server adapters, all published as individual @remix-run/* scoped packages and re-exported through a unified 'remix' umbrella package.

Tech Stack

FastifyReactExpress.jsTypeScriptVitest

Key Features

  • Custom JSX Component Framework
  • Fetch-Based Router with Middleware
  • Typed HTTP Headers
  • Streaming Multipart Parser
  • Session Management
  • Node.js Fetch Server Adapter
  • File Storage Abstraction
  • Compression Middleware
  • DOM Interaction Primitives
  • HTML Template Literals
  • Automated Release Pipeline
  • Demo Applications

Entry Points

Start here when working with this codebase

server.ts
docs/server.ts

Application entry point

Start here to understand how the application initializes

Coding Conventions

Standards and patterns used in this codebase

Linting

Use ESLint with TypeScript support configured at the monorepo root, enforcing consistent code style across all packages

eslint.config.js at root level configuring TypeScript-aware linting rules for the entire monorepo
eslint.config.js
Project Structure

Organize code as a PNPM monorepo with each package in its own directory under packages/, each with independent package.json and focused responsibility

packages/cookie, packages/session, packages/headers, packages/mime - each a self-contained package with a single concern
scripts/generate-remix.tsscripts/publish.ts
Scripting

Write build/release/CI scripts in TypeScript (*.ts files in scripts/ directory) rather than shell scripts or JavaScript

scripts/changes-preview.ts, scripts/changes-validate.ts, scripts/changes-version.ts, scripts/publish.ts, scripts/release-pr.ts
scripts/changes-preview.tsscripts/changes-validate.tsscripts/changes-version.tsscripts/publish.tsscripts/release-pr.ts
Release Management

Use a change-file based versioning workflow: validate change files, preview changes, bump versions, update changelogs, create release PRs, and publish - all as separate scripted steps

changes-validate.ts validates change files, changes-version.ts updates versions and changelogs, release-pr.ts creates GitHub PRs, publish.ts handles npm publishing and GitHub releases
scripts/changes-validate.tsscripts/changes-version.tsscripts/release-pr.tsscripts/publish.ts
API Design

Build on web-standard APIs (fetch, Request, Response, ReadableStream) rather than Node.js-specific APIs, with Node.js adapters provided separately

fetch-router uses web-standard fetch Request/Response; node-fetch-server adapts these to Node.js HTTP servers; multipart-parser supports both web and Node.js streams
docs/generate.ts
Documentation

Auto-generate API documentation from TypeScript source using TypeDoc, producing markdown files served through a custom documentation server

docs/generate.ts parses TypeScript with TypeDoc and generates markdown; docs/server.ts serves the generated docs with navigation
docs/generate.tsdocs/server.ts
Code Generation

Use automated code generation scripts to create umbrella/re-export packages by scanning constituent packages and generating source files with exports configuration

scripts/generate-remix.ts scans @remix-run/* packages and auto-generates re-export source files with corresponding package.json exports
scripts/generate-remix.ts
Package Design

Follow a layered architecture where higher-level packages compose lower-level primitives (e.g., form-data-parser uses multipart-parser, session uses cookie, fetch-router uses route-pattern)

form-data-parser depends on multipart-parser for streaming parsing; session depends on cookie for cookie handling; fetch-router depends on route-pattern for URL matching
scripts/generate-remix.ts