How it works
october is a hosted backend for client-side apps. You describe your entities, their fields and who may read or change what in one EDN file. october makes a Datomic database and a GraphQL API from it, and holds every read and every write to it. This page walks through one app, from its schema to the terminal.
The forum demo runs in demo mode: there, identities aren't verified, anyone can sign in as any email, and its data is wiped nightly at 04:00 UTC. Apps you build here aren't in demo mode unless you turn it on.
The whole app, in one file
A shared shopping list: people own lists, share them, and everyone on a list can edit its items. This file is all the server needs. Push it as it is.
{:entities
{:$users
{:attrs {:display-name {:type :string :optional? true :max 40}}}
Users are built in, with sign-in by one-time code. Apps can add fields to them.
:lists
{:attrs {:title {:type :string :min 1 :max 100 :trim? true}
:owner {:type :ref :to :$users :required? true
:default :auth/user :reverse :owned-lists}
:members {:type :ref :to :$users :many? true
:reverse :shared-lists}}
Each field is a Datomic attribute and a GraphQL field, and :min, :max, :trim? validate it. A ref is a relationship, readable from both ends; :default :auth/user fills in the caller when a create leaves the owner out, and refuses anyone naming someone else; the owner? clause in :create below says so again.
:permissions {:view [(on-list? ?e ?user)]
:create [(authenticated? ?user) (owner? ?e ?user)]
:update [(owner? ?e ?user)]
:delete [(owner? ?e ?user)]}}
Rules are Datalog over ?e, the record, and ?user, the caller. To anyone but its owner and members, a list doesn't exist.
:items
{:attrs {:text {:type :string :min 1 :max 500 :trim? true}
:done {:type :boolean :optional? true}
:list {:type :ref :to :lists :required? true :reverse :items}}
:permissions {:view [(on-item-list? ?e ?user)]
:create [(on-item-list? ?e ?user)]
:update [(on-item-list? ?e ?user)]
:delete [(on-item-list? ?e ?user)]}}}
An item is open to whoever can see its list. :reverse :items gives every list an items field.
:rules
[[(owner? ?l ?u) [?l :lists/owner ?u]]
[(on-list? ?l ?u) [?l :lists/owner ?u]]
[(on-list? ?l ?u) [?l :lists/members ?u]]
[(on-item-list? ?i ?u) [?i :items/list ?l] (on-list? ?l ?u)]]}
Named rules, shared between entities. Two with one name mean either. A rule that can't run is refused at push, and one that matches nothing denies: rules fail closed.
What the server makes of it
- The database
- A Datomic database per app. Pushing a schema adds what is new; a change that would lose data, such as a new type for a field, is refused until you migrate.
- A GraphQL API
- Queries with filters, ordering and cursor pagination; create, update and delete mutations; live queries over server-sent events. The SDL is served at
/t/<slug>/schema.graphql(the forum's), JSON Schema at/t/<slug>/schema.json(the forum's). - Validation
- Lengths, ranges, patterns, formats, enums, required fields and unique values, checked on the server for every write, with a message per field.
- Permissions as data
- Datalog rules per entity and per field, checked on every read and every write. A record the caller may not see is reported missing, not forbidden. Roles are declared in the schema, and
canandviewertell a client what the caller may do, so a page can leave out what the server would refuse. - Attribution and history
- Every write records the user who made it, so every type has
createdByandcreatedAt. Datomic keeps past values: an update is a new fact, not an overwrite. So every type hashistory, each change with who made it and when, and an entity can be read as it was withasOf. A past value is shown only to someone allowed to see it now and at the time. A deleted entity leaves the API, its past included, and erasing a user takes their email and profile out of history too.
Ask for data
Every list is paginated and every type carries its author. These are real answers from that schema, signed in as Ada.
Query
{ lists(first: 10) {
items {
title
owner { displayName }
createdAt
items(first: 50) {
items { text done createdBy { email } }
}
}
} }
Answer
{"data": {"lists": {"items": [{
"title": "Groceries",
"owner": {"displayName": "Ada"},
"createdAt": "2026-10-18T20:53:20.558Z",
"items": {"items": [
{"text": "Oat milk", "done": null,
"createdBy": {"email": "ada@example.com"}}
]}}]}},
"extensions": {"cost": {"requested": 2561, ...}}}
Bo isn't on Ada's list. When Bo tries to add an item to it, the list isn't there:
mutation {
createItem(input: {listId: "65786540-…",
text: "Oat milk"}) { id }
}
{"message": "List not found",
"extensions": {"code": "NOT_FOUND",
"field": "listId"}}
Watch it change
Any query can be a live query. The first result is the current one; another arrives whenever a write changes it, with mine saying whether the caller made the change. The client, @october1/client on npm, signs in, retries writes safely and reconnects streams for you.
import {init} from '@october1/client';
const db = init({tenant: 'shop', url: 'https://<server>'});
const q = '{ lists(first: 10) { items { title } } }';
const stop = db.subscribe(q, {}, ({data, mine}) => {
render(data); // mine === false: someone else changed it
});
Set it up from a terminal
An app is a tenant on an october server, with its own data, users and schema, served under /t/<slug>/. The october CLI creates tenants and pushes their schemas. It needs Babashka, and an invite for your email address: join the waitlist to get one.
-
Install the CLI. This server serves it.
$ curl -fsSL https://<server>/cli/october -o october && chmod +x october -
Log in with a code sent to that address.
$ october login --url https://<server> --email you@example.com -
Create the tenant from
schema.edn. Demo mode hands sign-in codes back to the page, so you can sign in straight away, and anyone can sign in as anyone: turn it off before you have real users.$ october init shop --demo Created tenant shop with schema.edn; its API is /t/shop/graphql (in demo mode) -
Allow your page's origin. Your app can run on
localhostagainst the server from the start.$ october origins shop --add http://localhost:5173 -
Edit the schema, then see what pushing it would change.
$ october plan shop Plan 84f7ef917ba0 -> c2eae3486723 Add: items/note -
Apply it. The plan is shown again first.
$ october push shop --yes Applied c2eae3486723 to shop
For apps written by agents
When an agent writes an app, the rules it has to keep are easy to lose in handler code. Here they live in the schema, which the agent reads and changes like any other file. It can plan a change and see exactly what it does before pushing it, and the server refuses a write that breaks a rule whatever the client sends.
The API describes itself: the SDL carries constraints and rules as directives. Errors come with a code (VALIDATION_FAILED, FORBIDDEN, NOT_FOUND, CONFLICT) and a message per field, and every answer reports the query's cost (the work it did, which per-query limits and a rate limit bound), so an agent can correct itself rather than guess.
Where it fits
A good fit
Multi-user apps where who may see and change what is the hard part:
- team tools and internal tools
- a CRM for a small team
- workflows and approvals
- shared lists, boards and forums
Not a fit
Apps whose hard part is somewhere else:
- media-heavy or search-heavy apps
- analytics
- high write throughput
- offline-first mobile
Try it
The forum is an app built on october: boards, threads and posts, a locked thread you can't reply to, and updates arriving live. Read it anonymously, or sign in to post. Then build your own with the guide.