Learn Brim.js

Everything you need to build an editable site, from the first command to content types and the site MCP.

npm create @brimsites/brim@latest my-site

Then npm install, npx brim user add you@example.com and npm run dev. The editor is at /admin/edit.

Start

  • Getting started

    Create a Brim.js site, sign in to its editor and change your first text.

  • Project structure

    A Brim.js site is your own Astro code plus a few declaration files and one database file.

  • Editing and handover

    How the owner edits, with drafts, roles the API enforces and 90 days of history to take anything back.

Build

  • Components and nodeId

    Brim components make one piece of a page editable. The nodeId is the contract between your code and the owner's content.

  • Blocks

    Blocks are richer components. You set their starting content in code and style them in your CSS; the owner changes the content in the side panel.

  • Galleries and carousels

    Gallery and Carousel keep a list of images the owner manages. Your markup and CSS decide what they look like.

  • Navigation

    Navbar and Footer hold the site's logo, name and links, saved once for the whole site, and hand them to your markup.

  • Forms

    Form and Newsletter keep what visitors send in the site's database and email it to the people who run the site.

  • Media

    Pictures of the design live in public/, pictures of the content are uploads in the media library, and videos go through a video host.

  • Site settings and identity

    Contact details the owner keeps up to date, and who the site is, its colors and icons, set once in code.

  • Server code

    A Brim.js site runs as a server, so it can have endpoints of its own next to the pages.

Content

  • Content types

    Repeatable content, such as articles, projects or products, is declared in code and filled in by the owner.

  • Vocabularies

    Lists the owner keeps, such as categories, brands or rooms, that other items point at.

  • Listings and search

    Listing shows the items of a content type, with filters, search and pages for visitors. Search searches the whole site.

  • Starting content

    Keep a site's starting items in git as a seed, and add them to any copy of the site without touching what the owner wrote.

  • Page templates

    The pages an owner adds later, like one per service or event, are content made from templates you write.

  • Languages

    A site has several languages when its Astro config says so. The editor then switches, copies and translates pages and items.

  • SEO, pages and feeds

    Page Settings, redirects, the sitemap and RSS feeds, managed by the owner and written by Seo.

Run

  • Users and tokens

    Users and access tokens are managed from the command line in the site's folder, where its database is.

  • Site MCP

    Every Brim.js site serves its own MCP at /admin/mcp, so AI agents can read and change content with the same checks as the editor.

  • Command line

    The brim command, in every site's folder, checks the code, seeds content, reads what the owner saved and opens the editor.

  • Deploy

    A Brim.js site is one Node server and one database file. Run it on your own server, as static files, or on Brimsites.

  • Versions and license

    How Brim.js versions change, how a site's database moves forward, and what the license allows.

Guides

  • Convert an Astro site

    Make an Astro site you already have editable, one element at a time, by hand or with your coding agent.

These pages are the docs folder of the Brim.js repository, shown as they are on main.