On this page
Getting started
Overview
Root.js is a web development tool capable of static site generation (SSG) or server side rendering (SSR) using TSX to render components to HTML. Under the hood, Root.js is powered by Vite and comes with all of the modern features that Vite provides. TSX templates are rendered by Preact and, by default, does not output any client-side JavaScript to the resulting HTML.
Root.js optionally comes with Root CMS which can be installed via a plugin. Root CMS is powered by Firebase and its suite of cloud-based products, so you get a complete web development experience right from the start. Learn more about setting up Root CMS in the CMS Setup Guide.
Scaffolding a Root.js project
Root.js requires Node.js 18+ to run. You are welcome to use any package manager, but we generally recommend pnpm for new projects, which is shipped with Node.js and can be enabled by running the command "corepack enable".
To scaffold a project using the Root.js starter package:
pnpm create @blinkk/root myproject
cd myproject
pnpm install
You can also scaffold a template from one of our many examples by adding the "--template" flag, for example:
pnpm create @blinkk/root --template=<template> myproject
Running the dev server
After scaffolding a project and installing dependencies via "pnpm install", you can start a dev server by running:
pnpm dev
The dev server should be running at http://localhost:4007