Back to templates

Template details

React Router Boilerplate

A production-ready React Router template for full-stack React apps with SSR, HMR, TypeScript, Tailwind CSS, and Docker deploy configs.

About this template

React Router Boilerplate is a production-ready starter template for full-stack React applications built on React Router, combining file-based routing, server-side rendering, data loading, and asset bundling in a single Node project.

What is the React Router Boilerplate?

The React Router Boilerplate is the default template published in the remix-run/react-router-templates repository for scaffolding a full-stack React app with React Router. You install it with npm install, start a development server with npm run dev at http://localhost:5173, and compile it with npm run build into a build/client/ folder of static assets plus a build/server/ folder of server-side code. It is written in TypeScript by default and renders pages on the server rather than shipping an empty HTML shell to the browser.

Key Features

  • Server-side rendering — pages are rendered on the server by the built-in app server, which the template describes as production-ready for Node deployments.
  • Hot Module Replacement — the dev server at port 5173 updates modules in the browser without a full reload.
  • Data loading and mutations — route-level data loading and write operations are handled through React Router's own APIs rather than a separate data layer.
  • Asset bundling and optimization — the build step emits separate static client assets and server code under the build/ directory.
  • TypeScript by default — the project scaffolding is typed out of the box.
  • Tailwind CSS preconfigured — styling is wired up as a default starting point, and the docs note you can swap in any CSS framework you prefer.
  • Three Dockerfiles — Dockerfile for npm, Dockerfile.pnpm for pnpm, and Dockerfile.bun for bun, with the container listening on port 3000.
  • StackBlitz launch link — the readme opens the template directly in StackBlitz for browser-based experimentation without a local install.

Who is it for?

  • React developers starting a new full-stack project: scaffold a routed, server-rendered app in one command instead of wiring bundler, server, and routing config by hand.
  • Teams that want SSR without adopting a heavier meta-framework: use React Router's server rendering and data APIs as the app foundation.
  • Platform engineers deploying to containers: use the npm, pnpm, or bun Dockerfile to ship the built client and server output to any Docker host.
  • Developers learning React Router framework mode: read a small, working reference for loaders, actions, and server rendering before adding their own code.

How does the React Router Boilerplate work?

The workflow is a standard Node project loop: install dependencies with npm install, run npm run dev to get a hot-reloading dev server on port 5173, then run npm run build to produce the deployable build/client/ and build/server/ output. Deployment then means either shipping that build directory to your own Node host or building a container image from one of the three included Dockerfiles and running it on port 3000.

Where can you deploy it?

The readme lists Docker-compatible targets including AWS ECS, Google Cloud Run, Azure Container Apps, Digital Ocean App Platform, Fly.io, and Railway, and states that any platform supporting Docker will work. For DIY deployments, the built-in app server is described as production-ready, provided you ship package.json, the matching lockfile, and the build/ folder containing both client and server output.

FAQ

Is the React Router Boilerplate free?

Yes. It is an open-source template published in the remix-run/react-router-templates GitHub repository (the repo shows 5,156 stars) and is distributed as source code you install and modify locally.

What stack does it use?

React Router handles routing, server rendering, and data loading, TypeScript is the default language, Tailwind CSS is preconfigured for styling, and the output is a Node server plus static client assets.

What port does the dev server use?

The development server with HMR runs at http://localhost:5173. The Docker production container, by contrast, exposes port 3000.

Which package managers are supported?

The template ships Dockerfiles for npm, pnpm, and bun, and the lockfile in the build output can be package-lock.json, pnpm-lock.yaml, or bun.lockb.

Can I replace Tailwind CSS?

Yes. Tailwind CSS is configured for a simple default starting experience, but the documentation explicitly states you can use whatever CSS framework you prefer.