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 →
Overview
| Part | Brain Backend every plan | Business Backend add-on |
|---|---|---|
| Data | CSV and JSON files in your private area | A SQL database (SQLite), with snapshots |
| Commands | Check what's sent, add a row, read rows, notify you, call other services, write pages | Also SQL, with rules |
| Scheduled tasks | Up to four | As many as you need, and commands on a schedule without the brain |
| Secrets | Keys for other services, which the brain never sees | The same |
| Payments | Stripe payment links | Checkout with server-checked prices, paid orders and refunds |
| Webhooks | — | Stripe, Shopify, Square, GitHub, Printful and Twilio call your site, verified |
| Admin | The Data tab and the brain | Admin pages for each table, and roles for your staff |
| Email and texts | Notices to you and your team; customers through your own SendGrid, Postmark or Twilio, connected by the brain | Also texts back from customers, through Twilio's webhook |
| Sign-in | flff sign-in for you and collaborators | Two-step sign-in, required of everyone if you like |
| History | Undo and history is a $5 add-on | Included |
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
| Service | What it does |
|---|---|
| Stripe | Payment links on any site; with the Business Backend, checkout with prices checked by the server, paid orders and refunds |
| Printful | A merch shop where Printful prints and ships the orders |
| Shopify, Square, GitHub | Call your site when something happens; each request is verified before your command runs (Business Backend) |
| Twilio | Texts from your site through your own Twilio number, on any plan; texts back arrive in your Inbox with the Business Backend |
| SendGrid, Postmark | Email 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.