Your own React app, served next to the work it starts.
When a screen needs more than widgets, write it in React. It lives in your repository, deploys with everything else, and reads rows and runs scripts as the person signed in. Your tooling builds it; the instance hosts it and signs people in.
- React
- typed rows
- live run updates
- no second host
Rows, runs and the session, in one import.
@volvel/app gives a page your workspace's tables, typed from their definitions, and the scripts and flows it may start. It reads the page's context, so there's no URL or key to configure.
- Types come from your table definitions. Importing them as types keeps every line of server code out of the browser.
- The table's rules decide which rows come back, not the app.
@volvel/uigives it the console's own components: tables, forms drawn from a JSON Schema, charts, tabs and notices, all on the tenant's theme.
import { runScript, table, useQuery, useSession } from "@volvel/app";
import { Form, PageShell, Table } from "@volvel/ui";
// Types only: none of the repository's server code reaches the browser.
import type { orders } from "../../src/index.ts";
function Orders() {
const found = useQuery(() =>
table<typeof orders>("orders").find({ sort: ["-created_at"], limit: 200 }),
);
const request = (values) => runScript("orders/request", values);
// …
} Shortened from the Acme example.
What a page can call.
The same public API the console uses, with the permissions of whoever is looking.
| Call | What it does |
|---|---|
table() | Find, page through, get, insert, update and delete rows, up to a thousand inserted at once, all or none. Filter, sort, and follow a cursor through many. |
.aggregate() | Counts, sums, averages, least and most, grouped by up to three columns or by day, week, month or year. Each person gets the totals of their own rows. |
runScript(), runFlow() | Start a script or a flow and wait for its result, or start it and follow it. |
useRun(), useFlowRun() | Follow a run as it happens over one stream per page, falling back to polling where a stream can't be had. |
useSession() | Who is signed in, and links to sign in or out, for end users and for staff. |
<HelpPanel> | A Help button that opens a page of your documentation beside the app, and draws nothing until that page exists. |
From your editor to the people using it.
-
1Write
volvel devserves the app from its source with reload, against a workspace's real tables and scripts, as you. -
2Build
volvel buildcompiles it with your repository's own tooling. The instance never runs your build. -
3Deploy
Files are uploaded once, by checksum, and named in the bundle. Promotion switches the same files on in production and copies nothing.
Served by the instance, on its terms.
An app is code your team wrote, so the platform serves it as if it could be wrong, and keeps the data rules out of its reach.
- Every response carries a content security policy: scripts and connections from the same address only, no inline script, no framing by other sites.
- End users hold only the kinds of permission apps use, whatever they're bound to. A binding made too wide can't hand them the tenant's settings or secrets.
- An app can list the tables it reads, so whoever shares it can see what it reaches.
Where it lives, and who gets in.
- Three kinds of address
- A path on the instance, a second address for every app, or a hostname the tenant proves it owns with a DNS record.
- Who may open it
- Staff, the tenant's end users, a group of either, or anyone. Said in a binding, in code, and reviewed like code.
- Sign-in that stays in its lane
- End users sign in to one tenant's apps. Staff arriving at another address are carried over with a one-time code, limited to what apps use.
- The tenant's brand
- Theme tokens in light and dark, a logo and its icons, on the app and on the sign-in pages.
- Routing in the browser
- Addresses under the app that name no file answer with the app's page, so a client-side router works as written.
- Cached well
- Files with a hash in their name are kept by the browser for a year, and the rest are checked each time.
Code app or App Builder?
Both read the same tables under the same rules and start the same scripts. Both carry the same bindings and branding. The difference is who builds the screen and how much it has to do.
| App Builder | Code app | |
|---|---|---|
| Built by | Anyone given the app maintainer role | A developer |
| Made from | Eight widgets, set up from menus | React, or other JavaScript, with libraries that fit the security policy |
| Kept as | A YAML file | Source in your repository, built by your tooling |
| Good for | Lists, records, totals and buttons over your tables | Booking flows, boards, portals, anything with its own logic on screen |
Related
Ship the screen you actually want.
Write it in React, deploy it with the rest, and let the platform serve it.