Skip to content
pitlane-toolsPublic

About

Composable packages to help you put your Remix app on the grid

Resources

Stars

17 stars

Watchers

0 watching

Forks

Latest commit

 

History

692 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pitlane

Portable platform integration for Remix 3.

Pitlane sits between Remix and the platforms you deploy to. Your server entry default-exports a standard fetch handler and hosting composes around it — platform plugins in the same Vite plugin array, or plain runtimes (Node, Bun) running the built output directly. Swap the deploy target; the app doesn't change. Composable hosting, not a hosting engine.

Packages

Package Status Description
@pitlane/vite-plugin-remix npm remix() — the Remix 3 Vite plugin: build orchestration, the clientEntry() hydration transform, a dev server with component and server-data HMR, SPA mode, build-time prerendering, and preview.
@pitlane/assets npm createAssetResolver() — the built script, stylesheet, and preload URLs a server-rendered document names, compatible with render({ assets }). Its Vite plugin works without Remix.
@pitlane/vite-plugin-fetch-server npm fetchServer() — serves a module's fetch handler through Vite's dev server.
@pitlane/theme npm Type-safe styling. A schema tree and the CSS values it describes compile to a typed token accessor and a <Theme /> component.
@pitlane/content npm createContent() — Markdown, MDX, JSON, and YAML read into schema-validated collections a controller queries like a database. A Vite plugin prebuilds them for hosts with no filesystem.
@pitlane/crawler npm crawl() — walks a Remix router in memory. What remix({ prerender }) runs, and what a sitemap, link check, or static export builds on.
@pitlane/data-table-d1 npm A Cloudflare D1 driver for remix/data-table: SQLite SQL over D1's async prepared-statement binding.

Every push to a branch also builds installable package previews, for example: npm i https://pkg.pr.new/pitlane-tools/pitlane/@pitlane/content@<sha>.

pitlane is the umbrella: one install that re-exports every package above as pitlane/<name>, such as pitlane/vite-plugin-remix and pitlane/theme/schema. Each release pins exact package versions and is cut by hand when enough package changes have accumulated, so the newest @pitlane/* release can be ahead of it. The first umbrella release, 1.0.0-alpha.1, pins @pitlane/dev@0.7.1, @pitlane/theme@0.5.0, @pitlane/content@0.3.1, @pitlane/crawler@0.3.0, and @pitlane/data-table-d1@0.3.0. Every package also installs and is documented on its own. Installing Pitlane covers subpaths, versions, and migration.

create-pitlane is on npm, but its planned API is not implemented. The CLI will replace the giget command below.

Quick start

npm add pitlane

pitlane goes in dependencies because app code imports runtime subpaths such as pitlane/assets and pitlane/theme. It needs remix@^3.0.0 and vite@>=8.1.0 as peers. For a lean production install, add the scoped packages instead (@pitlane/vite-plugin-remix as a dev dependency, runtime packages as dependencies) and import from @pitlane/<name>.

// vite.config.ts
import { remix } from "pitlane/vite-plugin-remix";
import { defineConfig } from "vite";

export default defineConfig({
    plugins: [remix()],
});

Everything the plugin does orbits four files you own:

  • vite.config.ts — plugins: [remix()]. Defaults cover the rest.
  • app/assets.ts — constructs the asset resolver with createAssetResolver(manifest) from pitlane/assets and pitlane/assets/manifest. The document reads script and stylesheet URLs from it, and render({ assets }) resolves islands through it.
  • app/entry.server.tsx — builds a router and default-exports it. The default export's .fetch(Request) is the contract every consumer reads: dev, preview, and whatever runs in production.
  • app/entry.browser.ts — calls run() from remix/component to hydrate clientEntry() components against server HTML, and in dev passes the runtime to revalidate from pitlane/vite-plugin-remix/hmr on server:update.

vite dev serves the app through your router, vite build produces dist/ssr and dist/client, and vite preview serves the production build through the same fetch handler production runs. Component HMR is on in dev, and server-data HMR follows once the browser entry listens for server updates.

Two options change the shape of the build: prerender renders paths to static HTML during vite build, and server: false drops the server entirely for a client-rendered app. See the Vite plugin guide for the clientEntry() transform and dev/preview semantics, and asset resolution for the resolver.

Templates

The pitlane-tools/templates monorepo ships the same Remix 3 guest book wired for six deploy targets — Cloudflare (D1), Netlify (Netlify Database), Vercel (Neon Postgres), Railway on Node or Bun, and GitHub Pages (in-browser with IndexedDB). Scaffold one with giget:

npx giget github:pitlane-tools/templates/<template> my-app

Because every template is the same app, diffing any two shows exactly what a platform swap touches — usually the database middleware, the deploy config, and nothing else.

Documentation

pitlane.tools hosts everything:

For AI agents and other LLM tools, the documentation is also published as Markdown. llms.txt indexes every page, llms-full.txt holds them all in one file, and every page has a Markdown twin at its URL plus .md, or plus index.md when the URL ends in /, such as https://pitlane.tools/guides/vite-plugin.md.

pitlane releases after 1.0.0-alpha.1 also install the guides, scoped package READMEs, and a generated INDEX.md. In an app, start with node_modules/pitlane/INDEX.md to find documentation for the installed version. The website remains useful without an installation; its pages track the latest deployed documentation.

Repository

packages/
├── assets/                   # @pitlane/assets — createAssetResolver() and the assets() Vite plugin
├── content/                  # @pitlane/content — createContent() and the contentLayer() Vite plugin
├── crawler/                  # @pitlane/crawler — crawl() and staticPaths()
├── create-pitlane/           # create-pitlane — reserved name, the future scaffolder
├── data-table-d1/            # @pitlane/data-table-d1 — Cloudflare D1 driver
├── pitlane/                  # pitlane — the umbrella, generated from manifest.json
├── theme/                    # @pitlane/theme — type-safe styling
├── vite-plugin-fetch-server/ # @pitlane/vite-plugin-fetch-server — the fetchServer() dev request bridge
└── vite-plugin-remix/        # @pitlane/vite-plugin-remix — the remix() Vite plugin
docs/                         # pitlane.tools — Remix + TypeDoc, deployed to Cloudflare Workers
demos/                        # example apps run by hand: content-vite, content-runtime, theme, tui

Development

The repo is a pnpm workspace whose toolchains and tasks are owned by mise. mise.toml and mise.lock pin Node, pnpm, and every other tool, and each task invokes Oxfmt, Oxlint, Vitest, tsdown, TypeDoc, Vale, and tsc directly — there is no wrapper and no scripts block. hk owns the git hooks, which mise run setup installs.

mise run setup                   # toolchains, dependencies, work tracker, git hooks

mise run docs:dev                # docs site (TypeDoc + Vite) on http://localhost:1337
mise run check                   # the full gate: formatting, lint, types, records, policies, docs
mise run docs:prose              # downloads Vale on first run, then lints the hand-written docs
mise tasks                       # list every task

mise run test:vite-plugin-remix  # one package's tests
mise run build:vite-plugin-remix # one package's build

License

MIT

About

Composable packages to help you put your Remix app on the grid

Resources

Stars

17 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages