Design Principles
Remix follows six core principles that guide every architectural decision:Model-First Development
Model-First Development
AI fundamentally shifts the human-computer interaction model. Remix optimizes source code, documentation, tooling, and abstractions for LLMs while providing abstractions for applications to use models in the product itself.
Build on Web APIs
Build on Web APIs
Sharing abstractions across the stack reduces context switching for both humans and machines. Remix builds on Web APIs and JavaScript as the only true full-stack ecosystem.
Religiously Runtime
Religiously Runtime
All packages are designed with no expectation of static analysis. Remix avoids the API pollution that comes from designing for bundlers, compilers, and typegen. All tests run without bundling.
Avoid Dependencies
Avoid Dependencies
Dependencies lock you into someone else’s roadmap. Remix chooses dependencies wisely, wraps them completely, and expects to replace most with its own packages. The goal is zero external dependencies.
Demand Composition
Demand Composition
Every abstraction is single-purpose and replaceable. Composable abstractions are easy to add and remove from existing programs. Every package is documented and useful independent of any other context.
Distribute Cohesively
Distribute Cohesively
While extremely composable ecosystems can be difficult to learn, Remix is distributed as a single
remix package for ease of use. However, all individual packages can also be used standalone.Package Architecture
Remix is organized as a pnpm monorepo with packages in thepackages/ directory. Each package has a single responsibility and prioritizes web standards for maximum interoperability.
Core Package Categories
Routing & Server
fetch-router- Composable router for the Fetch APInode-fetch-server- Node.js server with Fetch APIroute-pattern- URL pattern matching with strong typing
Data Handling
multipart-parser- Streaming multipart parsingform-data-parser- FormData parsing with file uploadsdata-schema- Standards-aligned schema validationdata-table- Typed, relational query toolkit
Storage & Files
file-storage- Key/value storage for File objectslazy-file- Lazy, streaming file implementationfs- Filesystem utilities using Web File API
HTTP Utilities
headers- HTTP headers toolkitcookie- Cookie managementresponse- Response helperssession- Session management
Module Boundaries
Remix maintains strict boundaries between packages:- All
exportsinpackage.jsonmap to dedicated files insrc/ - Files in
src/lib/are implementation files (not public API) - Top-level
src/files define public API by re-exporting fromsrc/lib/ - No barrel-style re-exports between
src/libfiles
Composability in Practice
Remix packages are designed to be composed incrementally. You can start with a single package and add more as needed.Example: Building a Server
Start with just the router:Example: Standalone Package Usage
Every package works independently:Distribution Strategy
Remix provides two ways to install and use packages:- Single Package (Recommended)
- Individual Packages
Install the unified Import from subpath exports:
remix package for the best developer experience:The unified
remix package re-exports all individual @remix-run/* packages through TypeScript’s subpath exports. This provides a cohesive experience while maintaining strict internal boundaries.Testing Philosophy
All Remix tests run from source with no build step required:Every package must be testable without static analysis, bundling, or compilation beyond TypeScript and JSX transforms.
Benefits of This Architecture
Incremental Adoption
Incremental Adoption
Start with a single package and add more as needed. No need to commit to an entire framework upfront.
Clear Boundaries
Clear Boundaries
Each package has a well-defined responsibility, making it easier to understand and maintain.
Future-Proof
Future-Proof
Built on web standards means your code works everywhere and doesn’t depend on framework-specific APIs.
Replace Anything
Replace Anything
Don’t like a package? Replace it with your own or a third-party alternative. Composition makes it easy.
Portable by Default
Portable by Default
Every package works across Node.js, Bun, Deno, and Cloudflare Workers without modification.
Next Steps
Web Standards
Learn how Remix leverages web standards for maximum portability
Composability
Explore patterns for composing Remix packages
Runtime Agnostic
See how Remix runs everywhere without modification
API Reference
Browse the complete API documentation