How it works · TM-04

The Brain Backend and the Business Backend.

How a flff site does what a WordPress or Drupal site does, without a backend of its own, and what the Business Backend adds when you need more structure.

Why this is a new paradigm → · What the Business Backend is for →

The brain at a switchboard, plugging cables into Payments (Stripe) and Merch (Printful), with a third socket for your site's own database

Overview

PartBrain Backend
every plan
Business Backend
add-on
DataCSV and JSON files in your private areaA SQL database (SQLite), with snapshots
CommandsCheck what's sent, add a row, read rows, notify you, call other services, write pagesAlso SQL, with rules
Scheduled tasksUp to fourAs many as you need, and commands on a schedule without the brain
SecretsKeys for other services, which the brain never seesThe same
PaymentsStripe payment linksCheckout with server-checked prices, paid orders and refunds
Webhooks—Stripe, Shopify, Square, GitHub, Printful and Twilio call your site, verified
AdminThe Data tab and the brainAdmin pages for each table, and roles for your staff
Email and textsNotices to you and your team; customers through your own SendGrid, Postmark or Twilio, connected by the brainAlso texts back from customers, through Twilio's webhook
Sign-inflff sign-in for you and collaboratorsTwo-step sign-in, required of everyone if you like
HistoryUndo and history is a $5 add-onIncluded

Data in files

On every site, the brain keeps records as plain files in your private area (/_u/data/, never shown to visitors): sign-ups, orders, readings, price lists. CSV for rows, JSON for anything with more shape. The brain reads them, sorts and sums them, and turns them into pages. You see them in the shell's Data tab, and you can download them into a spreadsheet.

Commands

A command is a few steps the brain writes for a form, a button or a device on your pages: check the email address, add a row to sign-ups.csv, tell me in the Inbox. Commands can also read rows back, call another service with one of your secrets, or answer the visitor. You can read every command in the Data tab, and the brain asks before it changes one.

A brain link goes one step further: a form or button whose requests the brain itself handles, within the tools and limits you approve. It uses brain credit on each request.

Pages from data: the brain as template engine

WordPress builds each page at each visit. On flff, the brain writes the finished pages: one per product, event or listing, from a list, all in the same layout. Change the layout, and it rewrites them all. A command can also write pages by itself as new rows arrive, from a template the brain made, with no brain credit.

Scheduled tasks

A scheduled task is a request the brain runs on its own: "Every Monday morning, put last week's sign-ups on the team page." Every site has up to four. With the Business Backend there's no limit, and commands can run on a schedule without the brain at all. Setting one up is an approval: the brain asks first.

Secrets and connectors

Other services need keys: Stripe, HubSpot, Twilio. You paste them in as your site's secrets, and a command uses them by name. The brain never sees the value, and it never appears in an answer, a log or your data. That's how connectors work: a command, a key, and a service's API.

Database (Business Backend)

A real SQL database for your site: orders, bookings and stock in tables with rules, searched and joined. The brain designs it with you, and forms on your pages can save straight into it. Before any statement that deletes or changes rows, the brain copies the database (a snapshot), so a mistake can be put back. Database changes aren't part of the file history, so the brain asks first (see Approvals).

Admin pages and roles (Business Backend)

The brain builds admin pages for each table: lists, edit forms and buttons, for how your business works. When someone helps you run the site, give them a role rather than your login: the brain proposes one (an editor, the kitchen, the front desk), you approve it, and people with that role see only their own admin pages, commands and tables.

Payments and webhooks

ServiceWhat it does
StripePayment links on any site; with the Business Backend, checkout with prices checked by the server, paid orders and refunds
PrintfulA merch shop where Printful prints and ships the orders
Shopify, Square, GitHubCall your site when something happens; each request is verified before your command runs (Business Backend)
TwilioTexts from your site through your own Twilio number, on any plan; texts back arrive in your Inbox with the Business Backend
SendGrid, PostmarkEmail to customers from your own domain, through your own account, on any plan

More are in design: HubSpot, NetSuite, QuickBooks and others. See Connectors.

Recipes

A recipe is a ready-made setup the brain builds for you and adapts to your site: a pizza shop, a blog, a merch shop, sensors and switches, a webinar. Most work on the Brain Backend, and get better with the Business Backend. See the catalog and Run your business from your site.