On this page
Getting Started
This guide gets you from an empty folder to a working Frontbacked theme you can run locally, push to GitHub, and turn into a data-backed website. A theme is the reusable website package you ship: HTML pages, CSS, JavaScript, assets, optional skins, and optional FRL rules for the data and actions the site supports.
When you want copy-ready slices, keep Starter Examples open beside this page.
1. Set up your tools
Install Node.js 22.13 or newer on the 22.x line, or Node.js 24 or newer, with npm. Install the latest local server:
Install Frontbacked FQL and FRL for VS Code for highlighting, suggestions and diagnostics. Keep the local development guide open for accounts, simulated email and payments, and troubleshooting.
Open Frontbacked for developers and choose Start building to enable the theme tools. Sign in when prompted. Your dashboard then includes theme creation and management.
2. Create a Theme Folder
A complete reference theme is available in the Frontbacked repository as themes/example-theme-01. It shows image resizing, adaptive video, auth, uploads, forms, lists, and practical FQL patterns you can pull apart while building your own theme.
A small theme can start with this structure:
The HTML pages are normal pages. FQL is added through a {STATE} comment in <head> and f-* attributes in the DOM. backend/index.frl is the theme's single FRL file, where the theme developer declares the rules for the data. Add backend/paths.json when clean URLs such as /blog/:slug should map to an HTML file. Add skins/ when the theme should offer multiple CSS looks.
After creating the folder, open a terminal there and run frontbacked-server. Visit http://localhost:3000. Use frontbacked-server --port 3100 if the default port is occupied.
3. Add Frontend State with FQL
In a page, include a state declaration and initialize Frontbacked.
FQL keeps browser state and the DOM in sync. When your page references settings, posts, transactions, wallet balances, aggregates, or lists, Frontbacked loads the data your UI needs.
4. Protect Writes with FRL
In backend/index.frl, define the post types your theme accepts.
Rule input (JSON)
Use a complete version 2 rule file. Select a post with “postType” and “action”, or an “endpoint” by name. Saved data, jobs, payments and email need the local server. Dedupe replay protection also needs a site.
Check complete rules or run schemas, permissions, hooks and calculations against the input above. Add excerpts to a complete rule before running.
FRL runs before data is stored. It normalizes incoming data, validates the schema, checks permissions, and only then allows the action, giving your frontend theme a production-ready data layer.
5. Publish from GitHub
Commit the theme folder to GitHub, then connect the repository on the Frontbacked platform. When choosing a theme root path, select the folder that contains the HTML files and backend/index.frl.
Default branch commits become production versions. Commits from other branches can be processed as preview versions for testing before they are merged.
What to Read Next
Start with Starter Examples when you want a copy-ready page shape. Try the browser playground for isolated FQL and FRL examples. Read FQL Overview if you are building forms, pages, dynamic lists, or data-driven UI. Read Theme Routing when you want clean URLs and route params. Move to FRL Overview when you are ready to protect the data those pages create and update.
When using AI to generate theme code, open /llms.txt and include it as project context. It keeps generated FQL, FRL, and helper calls aligned with the public Frontbacked API.
Choose another release or copy a script tag from Library versions.