@protobase/cli 0.40.8 → 0.40.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/package.js +1 -1
- package/package.json +6 -6
- package/skills/protobase/SKILL.md +1 -0
- package/skills/protobase/references/features/access.md +16 -0
- package/skills/protobase/references/features/actions.md +11 -0
- package/skills/protobase/references/features/ai.md +14 -0
- package/skills/protobase/references/features/api-functions.md +13 -0
- package/skills/protobase/references/features/build-and-run.md +19 -0
- package/skills/protobase/references/features/compatibility.md +14 -0
- package/skills/protobase/references/features/composed-pages.md +18 -0
- package/skills/protobase/references/features/data-model.md +19 -0
- package/skills/protobase/references/features/email-and-public-forms.md +12 -0
- package/skills/protobase/references/features/events-webhooks-and-jobs.md +18 -0
- package/skills/protobase/references/features/files-and-images.md +16 -0
- package/skills/protobase/references/features/history-comments-and-live-updates.md +14 -0
- package/skills/protobase/references/features/list-displays.md +18 -0
- package/skills/protobase/references/features/lists.md +28 -0
- package/skills/protobase/references/features/look-and-language.md +13 -0
- package/skills/protobase/references/features/navigation.md +14 -0
- package/skills/protobase/references/features/record-pages.md +20 -0
- package/skills/protobase/references/features/releases.md +11 -0
- package/skills/protobase/references/features/rest-api.md +24 -0
- package/skills/protobase/references/features/several-apps.md +8 -0
- package/skills/protobase/references/features/sign-in-and-accounts.md +27 -0
- package/skills/protobase/references/features/start-a-project.md +14 -0
- package/skills/protobase/references/features/your-own-code.md +19 -0
- package/skills/protobase/references/features.md +39 -0
- package/skills/protobase/references/getting-started.md +8 -8
- package/skills/protobase/references/guides/api-functions.md +12 -12
- package/skills/protobase/references/guides/billing-page.md +2 -2
- package/skills/protobase/references/guides/create-page.md +5 -5
- package/skills/protobase/references/guides/deploy.md +6 -6
- package/skills/protobase/references/guides/export-a-list.md +2 -2
- package/skills/protobase/references/guides/field-type.md +2 -2
- package/skills/protobase/references/guides/first-composed-page.md +4 -4
- package/skills/protobase/references/guides/first-plugin.md +3 -3
- package/skills/protobase/references/guides/import-records.md +1 -1
- package/skills/protobase/references/guides/mobile-app.md +14 -3
- package/skills/protobase/references/guides/plugin-build.md +5 -5
- package/skills/protobase/references/guides/record-card.md +3 -3
- package/skills/protobase/references/guides/remote-resources.md +10 -10
- package/skills/protobase/references/guides/table-to-admin.md +5 -5
- package/skills/protobase/references/guides/theme-an-app.md +4 -4
- package/skills/protobase/references/reference/access.md +9 -9
- package/skills/protobase/references/reference/ai.md +6 -6
- package/skills/protobase/references/reference/api.md +25 -25
- package/skills/protobase/references/reference/app-identity.md +4 -4
- package/skills/protobase/references/reference/architecture.md +1 -1
- package/skills/protobase/references/reference/assistant.md +6 -6
- package/skills/protobase/references/reference/auth.md +20 -20
- package/skills/protobase/references/reference/blocks.md +13 -13
- package/skills/protobase/references/reference/bottom-bar.md +5 -5
- package/skills/protobase/references/reference/cli.md +63 -63
- package/skills/protobase/references/reference/client.md +5 -5
- package/skills/protobase/references/reference/comments.md +8 -8
- package/skills/protobase/references/reference/custom-components.md +18 -18
- package/skills/protobase/references/reference/data-config.md +30 -26
- package/skills/protobase/references/reference/email.md +8 -8
- package/skills/protobase/references/reference/events.md +5 -5
- package/skills/protobase/references/reference/files.md +11 -7
- package/skills/protobase/references/reference/forms.md +6 -6
- package/skills/protobase/references/reference/history.md +7 -7
- package/skills/protobase/references/reference/installable-app.md +1 -1
- package/skills/protobase/references/reference/jobs.md +5 -5
- package/skills/protobase/references/reference/layouts.md +11 -11
- package/skills/protobase/references/reference/live.md +4 -4
- package/skills/protobase/references/reference/mcp.md +15 -7
- package/skills/protobase/references/reference/plugins.md +20 -20
- package/skills/protobase/references/reference/remote-resources.md +15 -15
- package/skills/protobase/references/reference/sidebar.md +1 -1
- package/skills/protobase/references/reference/supabase-realtime.md +2 -2
- package/skills/protobase/references/reference/supabase-rest.md +2 -2
- package/skills/protobase/references/reference/supabase-storage.md +1 -1
- package/skills/protobase/references/reference/theme.md +5 -5
- package/skills/protobase/references/reference/ui-config.md +60 -60
- package/skills/protobase/references/reference/user-menu.md +3 -3
- package/skills/protobase/references/reference/versioning.md +5 -5
- package/skills/protobase/references/reference/webhooks.md +7 -7
package/dist/cli/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.10",
|
|
4
4
|
"description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"@better-auth/core": "^1.7.12",
|
|
37
37
|
"@hono/node-server": "^2.1.3",
|
|
38
38
|
"@hono/vite-dev-server": "^0.26.1",
|
|
39
|
-
"@protobase/layout": "0.40.
|
|
40
|
-
"@protobase/query": "0.40.
|
|
41
|
-
"@protobase/schema": "0.40.
|
|
42
|
-
"@protobase/server": "0.40.
|
|
43
|
-
"@protobase/ui": "0.40.
|
|
39
|
+
"@protobase/layout": "0.40.10",
|
|
40
|
+
"@protobase/query": "0.40.10",
|
|
41
|
+
"@protobase/schema": "0.40.10",
|
|
42
|
+
"@protobase/server": "0.40.10",
|
|
43
|
+
"@protobase/ui": "0.40.10",
|
|
44
44
|
"@react-email/render": "^2.1.0",
|
|
45
45
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
46
46
|
"@tailwindcss/vite": "^4.3.3",
|
|
@@ -41,6 +41,7 @@ A project moved from Supabase with `protobase import supabase` has what the impo
|
|
|
41
41
|
Guides:
|
|
42
42
|
|
|
43
43
|
- When setting up or running a project for the first time → read [Getting started](references/getting-started.md)
|
|
44
|
+
- When you need to know whether Protobase has a feature, what it is called or how stable it is → read [Features](references/features.md), which links a page per area
|
|
44
45
|
- When shipping a project as a bundle and running it with the serve runtime → read [Deploy](references/guides/deploy.md)
|
|
45
46
|
- When turning a table into an admin with fields, views and filters → read [From a table to an admin](references/guides/table-to-admin.md)
|
|
46
47
|
- When building a page from layouts and blocks → read [Your first composed page](references/guides/first-composed-page.md)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/access.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Access
|
|
4
|
+
|
|
5
|
+
Decide who may read and change which records and fields.
|
|
6
|
+
|
|
7
|
+
- [Roles and capabilities](../reference/access.md#capabilities): Roles defined in code grant capabilities per resource and action. A project with roles denies anything not granted.
|
|
8
|
+
- [Field and row limits](../reference/access.md#capabilities): A role can be limited to listed fields and to rows that match a filter. A field added later stays hidden from that role until it is listed.
|
|
9
|
+
- [Field rules](../reference/access.md#field-rules-or-field-lists): Single fields, such as a cost price, can be hidden from every role that lacks a given capability.
|
|
10
|
+
- [Owned records](../reference/data-config.md#access): Users can be limited to the records they own, through an owner field.
|
|
11
|
+
- [Rules on the stored record](../reference/data-config.md#access): A rule can read the record as it is stored, such as one that refuses changes to a locked invoice.
|
|
12
|
+
- [Write-only fields](../reference/access.md#write-only-fields): A role can set a field it can never read back, such as a secret only a worker reads.
|
|
13
|
+
- [Access through a parent record](../reference/access.md#records-that-belong-to-another): Writing a child record can require access to the record it belongs to.
|
|
14
|
+
- [Anonymous access](../reference/access.md#anonymous-access): Visitors without an account can read listed fields of chosen records, such as a public product catalog.
|
|
15
|
+
- [Public browsing](../reference/access.md#browsing-the-admin-app): With anonymous access on, visitors browse what they may read in the admin app without signing in, read-only, with a Sign in button.
|
|
16
|
+
- [Checked on every request](../reference/api.md#access): The server applies the caller's operations, fields and rows to every request, on lists, record pages, composed pages and the API alike.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/actions.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Actions
|
|
4
|
+
|
|
5
|
+
Buttons that change records, ask for input or run your own code, per role.
|
|
6
|
+
|
|
7
|
+
- [Record actions](../reference/ui-config.md#actions-and-views-per-role): Buttons that update fields, delete, open a link, run an AI action or call your own code.
|
|
8
|
+
- [Actions that ask for input](../reference/ui-config.md#actions-that-ask-for-input): An action opens a dialog for text, numbers, dates, choices or records before it runs.
|
|
9
|
+
- [Conditional and bulk actions](../reference/ui-config.md#where-an-action-applies): Actions show, or show disabled with a reason, only where a condition holds, and run on several selected rows at once.
|
|
10
|
+
- [Views per role](../reference/ui-config.md#actions-and-views-per-role): Each role can get its own view of a resource, with other columns, filters, layout and actions.
|
|
11
|
+
- [Named actions](../reference/layouts.md#named-actions): An action is declared once in a view and used as a button on lists, record pages and composed pages.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/ai.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# AI
|
|
4
|
+
|
|
5
|
+
Fields and actions filled by a model, the assistant beside the admin, and MCP.
|
|
6
|
+
|
|
7
|
+
- [AI fields](../reference/ai.md#ai-fields): A model fills a field from a prompt that uses the record's other fields, after each change.
|
|
8
|
+
- [AI actions](../reference/ai.md#ai-actions): A button asks a model to write a field now, such as a suggested priority or a translation.
|
|
9
|
+
- [Assistant](../reference/assistant.md): A chat beside the admin that answers questions about the app, reads its data and proposes changes for approval.
|
|
10
|
+
- [Choice of model](../reference/assistant.md#which-backend): The assistant runs on OpenRouter or any OpenAI-compatible endpoint, also a local one.
|
|
11
|
+
- [Assistant tools](../reference/assistant.md#the-apps-own-tools): Your own tools for the assistant, acting on records as the user.
|
|
12
|
+
- [MCP server](../reference/mcp.md#the-tools): AI clients connect to the app over MCP as the signed-in person, and list, find and read records within that person's access.
|
|
13
|
+
- [MCP writes](../reference/mcp.md#writes): When turned on, for every resource or only those you list, AI clients create and update records after the person approves each write.
|
|
14
|
+
- [Connected apps](../reference/auth.md#oauth-for-mcp-clients): People allow an AI client to sign in, and disconnect it later.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/api-functions.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# API functions
|
|
4
|
+
|
|
5
|
+
Endpoints of your own beside the REST API.
|
|
6
|
+
|
|
7
|
+
- [API functions](../guides/api-functions.md#a-first-function): Each file in `functions/` becomes an endpoint for signed-in callers, reloaded while you work.
|
|
8
|
+
- [Records as the caller](../guides/api-functions.md#reading-and-writing-records-as-the-caller): Functions read and write records with the caller's access, validation and hooks.
|
|
9
|
+
- [Input checks](../guides/api-functions.md#checking-input): Request bodies are checked with zod, Valibot or another Standard Schema validator.
|
|
10
|
+
- [Roles for functions](../guides/api-functions.md#roles): A function can be limited to roles or a capability.
|
|
11
|
+
- [Public functions and webhooks](../guides/api-functions.md#public-functions-and-webhooks): A function can be open to anyone, with helpers that check webhook signatures.
|
|
12
|
+
- [WebSockets](../guides/api-functions.md#websockets): A function can accept a WebSocket, and the caller is checked again every minute.
|
|
13
|
+
- [Hono apps](../guides/api-functions.md#hono-apps): A function with several routes can be a Hono app.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/build-and-run.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Build and run
|
|
4
|
+
|
|
5
|
+
Develop, build and run an app, on servers, in containers and on phones.
|
|
6
|
+
|
|
7
|
+
- [Dev server](../reference/cli.md#dev): The admin app and the API on one port, with changes shown without a restart.
|
|
8
|
+
- [Migrations from config](../reference/cli.md#migration): Writes the SQL migrations for what the config turns on, as files of the project.
|
|
9
|
+
- [User and organization commands](../reference/cli.md#users): Create users, set roles and manage organizations from the terminal.
|
|
10
|
+
- [Encryption commands](../reference/cli.md#encryption-status): Report and fix plaintext or old-key values of encrypted fields.
|
|
11
|
+
- [One bundle](../reference/cli.md#build): `protobase build` writes one folder with everything the app needs, without a database or secrets.
|
|
12
|
+
- [Extensions](../reference/cli.md#extensions): A host adds its own tools and widgets to every app it builds.
|
|
13
|
+
- [Native packages](../reference/cli.md#native-packages): npm packages with native add-ons are bundled for Linux.
|
|
14
|
+
- [Serve runtime](../reference/cli.md#serve): Runs a bundle, with a health check, startup checks, jobs and a clean shutdown.
|
|
15
|
+
- [Single-file runtime](../reference/cli.md#build-serve): The runtime as one file, so a host needs only Bun and that file.
|
|
16
|
+
- [Separate worker](../reference/cli.md#worker): Jobs and event delivery in their own process.
|
|
17
|
+
- [Container images](../guides/deploy.md#images): A runtime image for each release, for amd64 and arm64.
|
|
18
|
+
- [Self-hosted image](../guides/deploy.md#a-self-hosted-image): One image with the app inside that serves, migrates and creates the first admin.
|
|
19
|
+
- [Mobile apps](../guides/mobile-app.md) (beta): Runs an app on iOS and Android, with sign-in, and builds signed store releases from a section in its config.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/compatibility.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Compatibility and moving from other systems
|
|
4
|
+
|
|
5
|
+
Apps written for other systems that keep working on Protobase, and moving their data and code over.
|
|
6
|
+
|
|
7
|
+
## Supabase
|
|
8
|
+
|
|
9
|
+
- [Supabase import](../reference/cli.md#import-supabase): Moves a Supabase project into Protobase, with schema, data, users, functions, storage and scheduled jobs.
|
|
10
|
+
- [Supabase client API](../reference/supabase-rest.md): supabase-js `from()` and `rpc()` calls keep working, under the tables' RLS policies.
|
|
11
|
+
- [Supabase Auth](../reference/auth.md#supabase-js-and-supabasessr): `supabase.auth` and `@supabase/ssr` calls keep working.
|
|
12
|
+
- [Supabase Storage](../reference/supabase-storage.md): supabase-js storage calls keep working, over the app's file storage.
|
|
13
|
+
- [Supabase Realtime](../reference/supabase-realtime.md): Database changes, broadcast and presence through supabase-js channels.
|
|
14
|
+
- [Edge Functions](../guides/api-functions.md#functions-moved-from-supabase): Functions moved from Supabase answer at their old addresses.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/composed-pages.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Composed pages
|
|
4
|
+
|
|
5
|
+
Pages of your own, built from blocks in a JSX layout.
|
|
6
|
+
|
|
7
|
+
- [Composed pages](../reference/layouts.md#setup): Pages built from a JSX layout, with their own address, sidebar entry and role limits, reading the API under the same access rules as the lists.
|
|
8
|
+
- [Layout checks](../reference/layouts.md#what-a-layout-may-hold): The build refuses a layout with code, unknown props or unknown fields, and names the file and place.
|
|
9
|
+
- [Conditions](../reference/layouts.md#conditions): Part of a page shows only while a condition on a record or a count holds.
|
|
10
|
+
- [App addresses](../reference/layouts.md#addresses): Links to lists, records, create forms and pages are typed addresses that can carry filters and prefilled values.
|
|
11
|
+
- [Per-user pages](../reference/layouts.md#access): Each user gets the page without the parts, fields and actions they cannot use.
|
|
12
|
+
- [Layout blocks](../reference/blocks.md#layout): Pages, responsive grids, cards and links.
|
|
13
|
+
- [Data blocks](../reference/blocks.md#data): Counts, tables, single records, rows of cards, field values and progress bars.
|
|
14
|
+
- [Record rows](../reference/blocks.md#recordrow): A sideways row of cards for a filter, favorites or saved searches, with a count and new-record marks.
|
|
15
|
+
- [Record cards](../reference/blocks.md#recordcards): Full-width cards with fields and buttons, stacked or in a carousel.
|
|
16
|
+
- [Chart block](../reference/blocks.md#chart): Counts, sums or averages by value or by date, as bars, lines or a donut.
|
|
17
|
+
- [Buttons and forms](../reference/blocks.md#behaviour): Buttons for named actions, and create or edit forms in a dialog.
|
|
18
|
+
- [Users block](../reference/blocks.md#users): User management on any page: find users, set roles, block them and invite by email.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/data-model.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Data model
|
|
4
|
+
|
|
5
|
+
Describe the tables of an existing Postgres database as resources, with their fields, keys and rules.
|
|
6
|
+
|
|
7
|
+
- [Resources](../reference/data-config.md#resource): Each table of an existing Postgres database is described as a resource in TypeScript, with its fields, key and rules. Nothing in the database changes.
|
|
8
|
+
- [Field types](../reference/data-config.md#field-types): Text, numbers, exact decimals, dates, timestamps, enums, JSON, relations, currencies, countries and files, each mapped to Postgres column types and checked.
|
|
9
|
+
- [Composite keys and relations](../reference/data-config.md#keys-and-relations): Records can have keys of several columns, and relations can point at them. The admin shows a related record by its name and links to it.
|
|
10
|
+
- [Soft delete](../reference/data-config.md#resource): Deleting a record marks it with a timestamp instead of removing it. Lists leave it out, and it can be restored.
|
|
11
|
+
- [Tenants](../reference/data-config.md#resource): A tenant column keeps each organization's records apart. Every query is limited to the caller's tenant, and new records get it set.
|
|
12
|
+
- [Record search](../reference/data-config.md#resource): You choose which fields text search and the global search look in. Partial words match, and phone numbers match by their last digits.
|
|
13
|
+
- [Manual order](../reference/data-config.md#resource): Records can be kept in an order set by hand, also per parent record, such as the lines of an invoice.
|
|
14
|
+
- [Record validation](../reference/data-config.md#resource): A rule over the whole record runs on every create and update and reports each problem on the field it concerns.
|
|
15
|
+
- [Rollups and formulas](../reference/data-config.md#rollups-and-formulas) (beta): Fields that hold counts, sums, averages, minimums or maximums of related records, or values calculated from the record's own numbers, kept current by the database.
|
|
16
|
+
- [Sensitive fields](../reference/data-config.md#sensitive-fields): Values such as bank account numbers are left out of every response and shown masked. A permitted user reveals one value at a time, and each reveal is audited.
|
|
17
|
+
- [Encrypted fields](../reference/data-config.md#encrypted-fields): A sensitive text field is encrypted with the app's own key before it is stored, so dumps, backups and SQL readers see only ciphertext.
|
|
18
|
+
- [Encryption key rotation](../reference/data-config.md#the-key): The encryption key can be replaced without downtime. CLI commands re-encrypt stored values and report what is left.
|
|
19
|
+
- [Extending a config](../reference/cli.md#extending-a-config): A project can merge other configs and UI configs into its own. A name defined twice is an error, never a silent override.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/email-and-public-forms.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Email and public forms
|
|
4
|
+
|
|
5
|
+
Mail the app sends, and forms for people without an account.
|
|
6
|
+
|
|
7
|
+
- [Email](../reference/email.md#configuration): The app sends mail through one SMTP server or a mailer you supply.
|
|
8
|
+
- [Built-in emails](../reference/email.md#protobases-own-mail): Sign-in codes, password resets, invitations and mentions are sent in the app's name.
|
|
9
|
+
- [Email templates](../reference/email.md#templates): Your own emails are React components with typed data, sent from jobs, hooks or functions.
|
|
10
|
+
- [Public forms](../reference/forms.md#what-the-visitor-sees): A form at its own address lets people without an account create a record, such as a contact request.
|
|
11
|
+
- [Bot check](../reference/forms.md#bot-check): Each submission passes a check in the browser, without a third-party service or a puzzle.
|
|
12
|
+
- [Form rate limit](../reference/forms.md#rate-limit): Each client sends only a set number of submissions per minute.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/events-webhooks-and-jobs.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Events, webhooks and jobs
|
|
4
|
+
|
|
5
|
+
React to changes, deliver them to other systems, and run work in the background.
|
|
6
|
+
|
|
7
|
+
- [Events](../reference/events.md#declaring-events): A resource declares named events, such as an order that was created or a status that changed.
|
|
8
|
+
- [Change capture](../reference/events.md#how-changes-are-captured): Every change is captured in the database, in the same transaction, whoever made it.
|
|
9
|
+
- [Webhooks](../reference/webhooks.md#subscription): Events are sent to a URL, an API function or your own code, filtered by event, condition and tenant.
|
|
10
|
+
- [Signed webhooks](../reference/webhooks.md#what-a-receiver-gets): Deliveries are signed under the Standard Webhooks spec.
|
|
11
|
+
- [Delivery retries](../reference/webhooks.md#delivery-and-retries): Failed deliveries are retried for about three days.
|
|
12
|
+
- [Webhooks in the admin app](../reference/webhooks.md#subscriptions-in-the-admin-app): Users create subscriptions, send test events and resend failures in the app.
|
|
13
|
+
- [Background jobs](../reference/jobs.md#enqueueing): Jobs are kept in the app's own Postgres and can be queued in the same transaction as a write, also from SQL.
|
|
14
|
+
- [Retries](../reference/jobs.md#failures): Failed jobs are retried with growing waits, and duplicates can be prevented with a key.
|
|
15
|
+
- [Ordered groups](../reference/jobs.md#ordered-groups): Jobs in one group run one at a time, in order.
|
|
16
|
+
- [Recurring jobs](../reference/jobs.md#recurring-jobs): Jobs run on a cron schedule in a chosen time zone.
|
|
17
|
+
- [Failed jobs page](../reference/jobs.md#failed-jobs-page): Admins see jobs that failed for good and retry or delete them.
|
|
18
|
+
- [Jobs on hosts that sleep](../reference/jobs.md#hosts-that-sleep): A host that stops idle apps can wake them when a job is due.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/files-and-images.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Files and images
|
|
4
|
+
|
|
5
|
+
Uploaded files and images, where they are kept and how they are served.
|
|
6
|
+
|
|
7
|
+
- [File fields](../reference/files.md#what-the-column-holds): A text column holds an uploaded file, with limits on type and size.
|
|
8
|
+
- [File storage](../reference/files.md#providers): Files are kept on disk, or in a bucket of your own.
|
|
9
|
+
- [S3-compatible buckets](../reference/files.md#s3-compatible-buckets) (beta): Files are kept in any bucket that speaks the S3 API, when the app runs on Bun.
|
|
10
|
+
- [Type detection](../reference/files.md#how-the-type-is-decided): An upload's type is decided from its content, and a disguised file is refused.
|
|
11
|
+
- [Signed downloads](../reference/files.md#downloads): Private files open through short-lived links that stop working once the record no longer holds the file.
|
|
12
|
+
- [Derived fields](../reference/files.md#derived-fields): Width, height, size and type of each upload are written to other fields.
|
|
13
|
+
- [Image variants and placeholders](../reference/files.md#image-variants-and-placeholders): Resized copies of uploaded images, and a blurred placeholder while they load.
|
|
14
|
+
- [External URLs](../reference/files.md#external-urls): A file field can hold a link to a file on another site.
|
|
15
|
+
- [Image referrers](../reference/files.md#image-referrers): Images from other sites load without telling them which page showed them.
|
|
16
|
+
- [File cleanup](../reference/files.md#deleting-files): Replaced and cleared files are deleted later on a schedule, so a database restore still finds its files.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/history-comments-and-live-updates.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# History, comments and live updates
|
|
4
|
+
|
|
5
|
+
The changes of each record, comments on it, and pages that refresh as records change.
|
|
6
|
+
|
|
7
|
+
- [Record history](../reference/history.md#on-the-record-page): Every change to a record is kept with who made it and when, including changes made outside the API.
|
|
8
|
+
- [Activity](../reference/history.md#activity): Admins see all changes across resources in one list.
|
|
9
|
+
- [History retention](../reference/history.md#keeping-it): Changes older than a set number of days are removed by a daily job.
|
|
10
|
+
- [Comments](../reference/comments.md#on-the-record-page): Anyone who can read a record can read and add comments on it.
|
|
11
|
+
- [Mentions](../reference/comments.md#mentions): Mentioning a colleague in a comment sends them an email with a link to the record.
|
|
12
|
+
- [Comment moderation](../reference/comments.md#moderation): Admins find and delete comments across the app.
|
|
13
|
+
- [Live updates](../reference/live.md#what-a-page-hears): Open lists and record pages refresh within seconds when a record changes, including changes made outside the API.
|
|
14
|
+
- [Change stream](../reference/live.md#the-stream): Apps follow record changes over a stream that catches up after a reconnect.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/list-displays.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# List displays
|
|
4
|
+
|
|
5
|
+
Show a list as cards, a map, a board, a calendar or a timeline, and reorder records by hand.
|
|
6
|
+
|
|
7
|
+
- [List displays](../reference/ui-config.md#list-displays): Besides a table, a list shows as cards, a map, a board, a calendar, a timeline or your own component, picked with a switch.
|
|
8
|
+
- [Cards](../reference/ui-config.md#list-displays): Records as cards with an image, title, subtitle, amount, badge and meta icons.
|
|
9
|
+
- [Card photos](../reference/ui-config.md#card-photos): Cards step through a record's photos by swiping or with arrows.
|
|
10
|
+
- [Boards](../reference/ui-config.md#boards): Records in columns by status, with counts. Cards are dragged between columns by mouse, touch or keyboard.
|
|
11
|
+
- [Calendars](../reference/ui-config.md#calendars): Records by date in a month or week grid. Dragging an event to another day reschedules it.
|
|
12
|
+
- [Timelines](../reference/ui-config.md#timelines): Each record is a bar from start to end over a week, month or quarter, optionally in lanes. Dragging a bar moves its dates.
|
|
13
|
+
- [Maps](../reference/ui-config.md#maps): Records on a map with clustered counts, and a pin on the record page. Rough locations show as an area, and extra layers such as aerial photos can be switched on.
|
|
14
|
+
- [Phone layout](../reference/ui-config.md#list-displays): On phones a list opens as cards or as one row per record, with filters and sort in a sheet.
|
|
15
|
+
- [Reordering by hand](../reference/ui-config.md#reordering-by-hand): Records with their own order are reordered by dragging, by touch or by keyboard. Each drop saves at once, and Undo puts it back.
|
|
16
|
+
- [Drop rules](../reference/ui-config.md#drop-rules): Rules for where a dragged record may land, such as never above a task it waits for.
|
|
17
|
+
- [Ranked after dependencies](../reference/ui-config.md#ranked-after-what-they-depend-on): Ranked records stay below the records they depend on while those are pending.
|
|
18
|
+
- [Board drops](../reference/ui-config.md#board-drops): Dropping a card on a board column can run your own write, such as creating an approval.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/lists.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Lists
|
|
4
|
+
|
|
5
|
+
The list page of each resource, with its columns, filters, charts, search, exports and imports.
|
|
6
|
+
|
|
7
|
+
- [Names and columns](../reference/ui-config.md#names-and-columns): Each resource gets singular and plural names and a title field, and a list shows the columns you choose, with a starting sort and search.
|
|
8
|
+
- [Field display hints](../reference/ui-config.md#names-and-columns): Labels, help lines, badges, codes, percentages, currencies, units, decimals and relative times such as "5 minutes ago".
|
|
9
|
+
- [Email, phone and web links](../reference/ui-config.md#names-and-columns): Fields marked as email, phone or URL show as links and are edited with the matching phone keyboard and browser autofill.
|
|
10
|
+
- [Markdown and long text](../reference/ui-config.md#names-and-columns): Long text is edited in a box that grows with it. Markdown fields have Write and Preview and show rendered on the record page.
|
|
11
|
+
- [Enum labels and colours](../reference/ui-config.md#names-and-columns): Enum values get readable labels and badge colours that show everywhere the value appears.
|
|
12
|
+
- [Pinned title column](../reference/ui-config.md#names-and-columns): Columns size to their content, and on desktop the title column stays in place while the table scrolls sideways.
|
|
13
|
+
- Pinned columns: A column's menu pins it to the left edge of the table, and each user's pins are kept.
|
|
14
|
+
- [Related records as dots](../reference/ui-config.md#related-records-in-a-list): A list column or card shows linked records as coloured status dots, with the record's card on hover.
|
|
15
|
+
- [Editing in the list](../reference/ui-config.md#editing-in-the-list): Chosen columns are edited in their cells, as in a spreadsheet, with keyboard navigation. Each change saves at once and is refused if someone else changed the record first.
|
|
16
|
+
- [Filters](../reference/ui-config.md#filters-and-the-chart): Value menus with counts, date presets, range sliders with histograms, toggles and flags. Less used filters wait under More filters.
|
|
17
|
+
- [Filters beside the list](../reference/client.md#the-admin-app): A list can show its filters in a panel beside the table instead of a bar above it.
|
|
18
|
+
- [Default filter](../reference/ui-config.md#a-filter-the-list-opens-with): A list can open with a filter applied, shown as chips users can clear or change.
|
|
19
|
+
- [More than one list](../reference/ui-config.md#more-than-one-list): One resource can have several lists, each with its own sidebar entry, columns, filters and chart.
|
|
20
|
+
- [List charts](../reference/ui-config.md#filters-and-the-chart): A chart above a list shows records over time or per value, follows the list's filters, and filters the list when a value is clicked.
|
|
21
|
+
- [Shareable list addresses](../reference/client.md#the-admin-app): Filters, sort, display and saved search are kept in the address, so a list can be bookmarked and shared.
|
|
22
|
+
- [Empty states](../reference/ui-config.md#filters-and-the-chart): An empty list says why it is empty and offers Clear search, Clear filters or New.
|
|
23
|
+
- [Long lists](../reference/ui-config.md#list-displays): Lists of any length scroll at once, drawing only the rows in view, and Back returns to the same place.
|
|
24
|
+
- [Saved searches](../reference/ui-config.md#saved-searches): Users save a filtered list as a named search and see which records are new since they last looked.
|
|
25
|
+
- [Favorites](../reference/ui-config.md#favorites): A heart on each card saves the record to the user's favorites, which a list page can show.
|
|
26
|
+
- [Sign-in prompts](../reference/ui-config.md#sign-in-prompts): Visitors who are not signed in see what signing in gives them, in place of a list or when they press favorite or save search.
|
|
27
|
+
- [Export to Excel and CSV](../reference/ui-config.md#exports): Any list, or the selected rows, is saved as an Excel or CSV file with the columns the user picks.
|
|
28
|
+
- [Import from a spreadsheet](../reference/ui-config.md#importing-records): Records are created or updated from Excel or CSV. Every row is checked before anything is saved, and refused rows can be downloaded with the reasons.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/look-and-language.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Look and language
|
|
4
|
+
|
|
5
|
+
The app's colours, name, icon, language and installation.
|
|
6
|
+
|
|
7
|
+
- [Theme](../reference/theme.md): One CSS file sets the app's colours, corners and fonts for light and dark, and keeps working on every release.
|
|
8
|
+
- [Dark mode](../reference/theme.md#light-dark-or-the-system): Each user picks light, dark or the system setting.
|
|
9
|
+
- [App name, icon and colours](../reference/app-identity.md): The app's own name, icon and colours in the sidebar, browser tabs, home-screen icon and mail.
|
|
10
|
+
- [Logo and favicon](../reference/theme.md#logo-and-favicon): Your own favicon or logo replaces Protobase's.
|
|
11
|
+
- [English and Dutch](../reference/languages.md): The built-in screens come in English and Dutch, with numbers and dates written to match.
|
|
12
|
+
- [Installable app](../reference/installable-app.md): The admin installs as an app on phones and computers, and says when the server cannot be reached.
|
|
13
|
+
- Reduced motion: When the system asks for less motion, animations and pulsing dots stop.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/navigation.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Navigation
|
|
4
|
+
|
|
5
|
+
The sidebar, the user menu, the bottom bar on phones and the global search.
|
|
6
|
+
|
|
7
|
+
- [Sidebar](../reference/sidebar.md): Resources and pages in groups, in the order you set.
|
|
8
|
+
- [Recent records](../reference/sidebar.md#recent-records): A sidebar entry lists a few records under it with status dots.
|
|
9
|
+
- [User menu](../reference/user-menu.md): Account pages, help links, security settings, the theme switch and Sign out.
|
|
10
|
+
- [Bottom bar](../reference/bottom-bar.md): On phones, tabs along the bottom for each role's main screens.
|
|
11
|
+
- [Global search](../reference/client.md#global-search): A search box, also on Cmd+K or Ctrl+K, finds records in every resource and jumps to pages and New forms.
|
|
12
|
+
- Breadcrumbs: The top bar shows the group, list and record you are on, each a link back.
|
|
13
|
+
- Update notice: When the server runs a newer Protobase version, open pages offer a reload so the user can save their work first.
|
|
14
|
+
- Config refresh: When the config or the user's roles change, open pages load the new menus, columns and permissions without a reload.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/record-pages.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Record pages
|
|
4
|
+
|
|
5
|
+
The page of one record, with its sections, related records, galleries, charts and editing.
|
|
6
|
+
|
|
7
|
+
- [Record page layout](../reference/ui-config.md#the-record-page): Sections, a summary sidebar, related tables, maps, charts, galleries, history, comments and your own components.
|
|
8
|
+
- [Read view and edit](../reference/ui-config.md#read-view-and-edit): A record opens as a read-only fact sheet or a form, and Edit opens the form at its own address.
|
|
9
|
+
- [Unsaved edits](../reference/ui-config.md#read-view-and-edit): Unsaved changes stay in the browser and can be resumed, and leaving a form with changes asks first.
|
|
10
|
+
- [Save feedback](../reference/ui-config.md#the-record-page): A view shows saving on the Save button instead of in a toast.
|
|
11
|
+
- Save conflicts: When someone else changed a record while you edited it, Save shows their value beside yours for each field you both changed, and you keep yours or take theirs.
|
|
12
|
+
- [Groups and tabs](../reference/ui-config.md#groups): Parts of a record page sit under headings that open on click, or in tabs, and the open ones are kept in the address.
|
|
13
|
+
- [Key facts](../reference/ui-config.md#key-facts): A section shows its values side by side with icons.
|
|
14
|
+
- [Conditional sections](../reference/ui-config.md#form-and-read-view): Sections and fields show only while editing, only while reading, or only when a condition on the record holds.
|
|
15
|
+
- [Galleries](../reference/ui-config.md#galleries): A record's photos show as tiles that open a full-screen lightbox, with keyboard and swipe navigation.
|
|
16
|
+
- [Related records](../reference/ui-config.md#related-records): Every record page shows how many records point at it, and can list related records as a table, another display or cards with buttons.
|
|
17
|
+
- Record lines: Lines that belong to a record, with a position and a quantity, such as those of an invoice, show as a table with totals on its page. You drag them into a new order, and Save writes the record and the order together.
|
|
18
|
+
- [Charts of samples](../reference/ui-config.md#charts-of-related-records): A record page graphs numeric samples over the last hour, day or week, such as a server's CPU use.
|
|
19
|
+
- [Fresh data on return](../reference/ui-config.md#the-record-page): Records and lists reload when the browser tab is focused again, keeping unsaved edits.
|
|
20
|
+
- Safe deletes: Deleting asks first, offers a review when the record changed since it was opened, and a soft delete shows Undo.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/releases.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Releases
|
|
4
|
+
|
|
5
|
+
How Protobase is released and versioned, and what a release keeps working.
|
|
6
|
+
|
|
7
|
+
- [Releases](../reference/versioning.md#releases): Every fix and feature is released when it lands, as packages and images of one version.
|
|
8
|
+
- [Version rules](../reference/versioning.md#versions-below-10): Semantic versioning. Below 1.0 a minor version may break.
|
|
9
|
+
- [Bundles and runtimes](../reference/versioning.md#bundles-and-runtimes): A runtime serves only bundles of a compatible version, and says why when it refuses one.
|
|
10
|
+
- [Plugins keep working](../reference/versioning.md#plugins): Plugins target a plugin API that releases keep.
|
|
11
|
+
- [Runtime updates](../reference/versioning.md#runtime-updates): Admins see whether the runtime has an update and start it from the app, when the host offers one.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/rest-api.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# REST API
|
|
4
|
+
|
|
5
|
+
The API every resource gets, with filters, writes, errors and the typed client.
|
|
6
|
+
|
|
7
|
+
- [Generated REST API](../reference/api.md#routes): List, get, create, update and delete endpoints for every resource, following the AIP API design guidelines.
|
|
8
|
+
- [OpenAPI and reference](../reference/api.md#meta-and-openapi-per-caller): An OpenAPI 3.1 document and an API reference page, each showing only what the caller may see and do.
|
|
9
|
+
- [Filters](../reference/api.md#filters): AIP-160 filters and ordering, with full-text search, lists of values and relative dates.
|
|
10
|
+
- [Counts, facets and charts](../reference/api.md#routes): Endpoints for value counts, grouped sums and averages, records over time, histograms and paging to any row.
|
|
11
|
+
- [Map queries](../reference/api.md#maps): The records inside a map's view, or counts per area when there are many.
|
|
12
|
+
- [Related names and photos](../reference/api.md#related-names): A list response can carry the names of related records and each record's first photos.
|
|
13
|
+
- [ETags](../reference/api.md#writes): Every record has a version, and a write based on an old version is refused.
|
|
14
|
+
- [Minimal responses](../reference/api.md#writes): A create or update can answer without the record, to save the transfer.
|
|
15
|
+
- [Batch writes](../reference/api.md#batch-writes): Up to 500 creates, updates, deletes and reorders across resources in one transaction.
|
|
16
|
+
- [Record permissions](../reference/api.md#record-permissions): Responses say which records and fields the caller may change.
|
|
17
|
+
- [Scan guard](../reference/api.md#safety): Reads that would scan a large table without an index are refused, with the index to create.
|
|
18
|
+
- [Statement timeouts](../reference/api.md#safety): Every request runs with a time limit, and reads run read-only.
|
|
19
|
+
- [Errors](../reference/api.md#errors): Every error is a problem document with a stable type and per-field details.
|
|
20
|
+
- [Audit events](../reference/api.md#audit-events): Reveals of sensitive values and organization changes are published as audit events.
|
|
21
|
+
- [Error reporting](../reference/api.md#error-reporting): Server and admin app errors go to a Sentry-compatible error tracker when a DSN is set.
|
|
22
|
+
- [JWT authentication](../reference/api.md#authentication): The API accepts tokens from another identity provider, or a check of your own.
|
|
23
|
+
- [CORS](../reference/api.md#cors): Websites on other origins can call the API once their origins are listed.
|
|
24
|
+
- [Typed client](../reference/client.md): A typed fetch client and React hooks for the API.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/several-apps.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Several apps
|
|
4
|
+
|
|
5
|
+
Show another Protobase app's records and accept its users.
|
|
6
|
+
|
|
7
|
+
- [Remote resources](../reference/remote-resources.md): An app shows another Protobase app's records with its own lists, record pages and sidebar.
|
|
8
|
+
- [Sign-in across apps](../reference/auth.md#users-of-another-app): An app accepts the signed-in users of another Protobase app and maps their roles.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/sign-in-and-accounts.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Sign-in and accounts
|
|
4
|
+
|
|
5
|
+
Sign-in methods, users, roles, organizations and tokens.
|
|
6
|
+
|
|
7
|
+
- [Built-in sign-in](../reference/auth.md): Password sign-in, sessions and short-lived tokens, with no separate identity service.
|
|
8
|
+
- [First admin](../reference/auth.md#first-run): No account can be made over the web while the app has no users. You create the first admin from the terminal, and the last active admin cannot be deleted, demoted or blocked.
|
|
9
|
+
- [Existing users table](../reference/auth.md#an-existing-users-table): Sign-in can use the users table another system keeps in the same database.
|
|
10
|
+
- [Users page](../reference/auth.md#users-page): Admins find people, set roles, block them, add accounts and invite people by email.
|
|
11
|
+
- [Password reset](../reference/auth.md#password-reset): People reset a forgotten password through an emailed link.
|
|
12
|
+
- [Emailed sign-in codes](../reference/auth.md#emailed-sign-in-codes): People sign in with a code sent to their email.
|
|
13
|
+
- [Open sign-up](../reference/auth.md#open-sign-up): Anyone can create an account after confirming an emailed code.
|
|
14
|
+
- [Passkeys](../reference/auth.md#passkeys): People sign in with their device's face or fingerprint unlock, or with a security key.
|
|
15
|
+
- [Two-factor authentication](../reference/auth.md#two-factor-authentication): A second step with an authenticator app, backup codes or emailed codes.
|
|
16
|
+
- [Sign-in policy](../reference/auth.md#sign-in-policy): Admins choose which sign-in methods are on, off or required, and the server refuses a policy that would lock people out.
|
|
17
|
+
- [GitHub and social sign-in](../reference/auth.md#sign-in-with-github): People sign in with GitHub or another social provider.
|
|
18
|
+
- [SAML sign-in](../reference/auth.md#sign-in-with-saml): People sign in through any SAML provider.
|
|
19
|
+
- [OpenID Connect provider](../reference/auth.md#platform-sign-in-provider): A host adds an OpenID Connect provider for people who already have an account.
|
|
20
|
+
- [Staff sign-in](../reference/auth.md#staff-sign-in): The team that runs an app signs in as a person to help them, with a reason and a log entry.
|
|
21
|
+
- [Roles](../reference/auth.md#roles): A user holds one or more roles and switches between them without signing in again.
|
|
22
|
+
- [Organizations](../reference/auth.md#organizations): People work in one organization at a time, see only its records, and are invited with their own roles.
|
|
23
|
+
- [API tokens](../reference/auth.md#tokens-and-roles): A signed-in session gets short-lived tokens for the API.
|
|
24
|
+
- [Immediate revocation](../reference/auth.md#when-a-token-stops-working): A ban, removed role or ended session takes effect on the next request.
|
|
25
|
+
- [Tokens for scripts](../reference/auth.md#tokens-for-scripts-and-curl): A token for an existing user, for scripts and curl.
|
|
26
|
+
- [Several origins](../reference/auth.md#several-origins): One app works on several domains, such as its own address and a custom domain.
|
|
27
|
+
- [Sign-in rate limits](../reference/auth.md#client-addresses): Sign-in and code requests are limited per client address, also behind a proxy.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/start-a-project.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Start a project
|
|
4
|
+
|
|
5
|
+
Start a new app, or an admin over an existing Postgres database, and keep the config in step with it.
|
|
6
|
+
|
|
7
|
+
- [Project starter](../getting-started.md#start-an-app): `npm create protobase` starts a new app from the scratch, ERP or real estate preset and prints the next steps.
|
|
8
|
+
- [Example apps](../getting-started.md#run-the-erp-example): Seeded example apps on Postgres: an ERP, real estate property management and a public property portal.
|
|
9
|
+
- [Scaffold from a database](../reference/cli.md#scaffold): Reads your Postgres tables and writes the data config for them, with field types, keys, relations, enums, soft delete, tenants and search filled in.
|
|
10
|
+
- [Safe re-scaffolding](../reference/cli.md#re-running): Running scaffold again adds only the columns that are not declared yet and leaves your own config code as it is.
|
|
11
|
+
- [Schema drift report](../reference/cli.md#drift-report): After each scaffold, lists declared fields whose column is gone, whose type changed or whose enum values differ, with a suggested fix.
|
|
12
|
+
- [Doctor](../reference/cli.md#doctor): Checks every resource and view against the database, including reads that lack an index, and prints the fix for each problem.
|
|
13
|
+
- [Admin without a view](../guides/table-to-admin.md#1-the-table-as-it-is): A table with an empty view already gives a working admin with every column, sorting, paging, a record page and a New button.
|
|
14
|
+
- [Agent skills](../reference/cli.md#skill): `protobase skill install` writes agent skills that match the installed version into the project, for the coding agents that work on it.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features/your-own-code.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Your own code
|
|
4
|
+
|
|
5
|
+
React components, field types, pages and handlers of your own, loaded as plugins.
|
|
6
|
+
|
|
7
|
+
- [Custom components](../reference/custom-components.md#components): Your own React components used by name in layouts, reading data under the user's access.
|
|
8
|
+
- [Custom list displays](../reference/custom-components.md#list-displays): Draw a list with your own component while the list page keeps loading, filters, search and paging.
|
|
9
|
+
- [Custom record sections](../reference/custom-components.md#record-sections): Your own component on a record page, beside its sections.
|
|
10
|
+
- [Custom record cards](../reference/custom-components.md#record-cards): Draw each card with your own component, with the built-in card as the fallback.
|
|
11
|
+
- [Custom field types](../reference/plugins.md#field-types): Register how a kind of value is shown and edited, and pick it per field in a view.
|
|
12
|
+
- [Custom create pages](../reference/custom-components.md#create-pages): Replace a resource's create form with your own page, such as a booking flow.
|
|
13
|
+
- [Form parts](../reference/custom-components.md#form-parts): Build your own forms from the app's fields, pickers, switches, buttons and dialogs.
|
|
14
|
+
- [Action handlers](../reference/custom-components.md#action-handlers): Your own code for a named action, with the record, the API client and the action's inputs.
|
|
15
|
+
- [Shell slots](../reference/custom-components.md#shell-slots): Your own components in the top bar, in a panel beside every page, or as the sidebar logo.
|
|
16
|
+
- [Plugins](../reference/plugins.md#how-a-plugin-stays-working): Your React code is a plugin that the app loads at start and that keeps working across Protobase releases without changes.
|
|
17
|
+
- [Plugin settings](../reference/plugins.md#loading): Plugins are loaded from the config, limited to roles and given settings.
|
|
18
|
+
- [Plugin fallbacks](../reference/plugins.md#when-a-plugin-is-off): A plugin that fails or does not fit the version is turned off alone, and admins see why.
|
|
19
|
+
- [Before sign-in](../reference/plugins.md#before-sign-in): A plugin can run around the sign-in page, for example to sign someone in from a link.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/features.md: run `bun run docs:skill`, do not edit. -->
|
|
2
|
+
|
|
3
|
+
# Features
|
|
4
|
+
|
|
5
|
+
Every feature of Protobase, grouped by area, with whether it is stable.
|
|
6
|
+
|
|
7
|
+
Every feature of Protobase is listed on the page of its area, one line per feature: its name and what it gives you. A linked name leads to the page that explains it in full.
|
|
8
|
+
|
|
9
|
+
A feature without a mark is stable. The others say so after their name:
|
|
10
|
+
|
|
11
|
+
- **beta**: built, released and usable, with the limits its page lists. It may change more than a stable feature.
|
|
12
|
+
- **in development**: partly released, not usable on its own yet.
|
|
13
|
+
- **coming soon**: documented, not built yet.
|
|
14
|
+
|
|
15
|
+
## Areas
|
|
16
|
+
|
|
17
|
+
- [Start a project](features/start-a-project.md): Start a new app, or an admin over an existing Postgres database, and keep the config in step with it.
|
|
18
|
+
- [Data model](features/data-model.md): Describe the tables of an existing Postgres database as resources, with their fields, keys and rules.
|
|
19
|
+
- [Access](features/access.md): Decide who may read and change which records and fields.
|
|
20
|
+
- [Lists](features/lists.md): The list page of each resource, with its columns, filters, charts, search, exports and imports.
|
|
21
|
+
- [List displays](features/list-displays.md): Show a list as cards, a map, a board, a calendar or a timeline, and reorder records by hand.
|
|
22
|
+
- [Record pages](features/record-pages.md): The page of one record, with its sections, related records, galleries, charts and editing.
|
|
23
|
+
- [Actions](features/actions.md): Buttons that change records, ask for input or run your own code, per role.
|
|
24
|
+
- [Composed pages](features/composed-pages.md): Pages of your own, built from blocks in a JSX layout.
|
|
25
|
+
- [Your own code](features/your-own-code.md): React components, field types, pages and handlers of your own, loaded as plugins.
|
|
26
|
+
- [Look and language](features/look-and-language.md): The app's colours, name, icon, language and installation.
|
|
27
|
+
- [Navigation](features/navigation.md): The sidebar, the user menu, the bottom bar on phones and the global search.
|
|
28
|
+
- [REST API](features/rest-api.md): The API every resource gets, with filters, writes, errors and the typed client.
|
|
29
|
+
- [API functions](features/api-functions.md): Endpoints of your own beside the REST API.
|
|
30
|
+
- [Sign-in and accounts](features/sign-in-and-accounts.md): Sign-in methods, users, roles, organizations and tokens.
|
|
31
|
+
- [Files and images](features/files-and-images.md): Uploaded files and images, where they are kept and how they are served.
|
|
32
|
+
- [History, comments and live updates](features/history-comments-and-live-updates.md): The changes of each record, comments on it, and pages that refresh as records change.
|
|
33
|
+
- [Events, webhooks and jobs](features/events-webhooks-and-jobs.md): React to changes, deliver them to other systems, and run work in the background.
|
|
34
|
+
- [Email and public forms](features/email-and-public-forms.md): Mail the app sends, and forms for people without an account.
|
|
35
|
+
- [AI](features/ai.md): Fields and actions filled by a model, the assistant beside the admin, and MCP.
|
|
36
|
+
- [Compatibility and moving from other systems](features/compatibility.md): Apps written for other systems that keep working on Protobase, and moving their data and code over.
|
|
37
|
+
- [Several apps](features/several-apps.md): Show another Protobase app's records and accept its users.
|
|
38
|
+
- [Build and run](features/build-and-run.md): Develop, build and run an app, on servers, in containers and on phones.
|
|
39
|
+
- [Releases](features/releases.md): How Protobase is released and versioned, and what a release keeps working.
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
Start an app with npm create protobase, install the repository, run the ERP, real estate and property portal examples and learn the development commands.
|
|
6
6
|
|
|
7
|
-
Protobase is a config-driven admin panel framework for existing Postgres databases. Data config lives in `data.ts`, UI config in `ui.ts`; a Hono server serves the API and a React app renders the admin. Coding agents get the guides and reference of the installed version with [`protobase skill install`](reference/cli.md#skill)
|
|
7
|
+
Protobase is a config-driven admin panel framework for existing Postgres databases. Data config lives in `data.ts`, UI config in `ui.ts`; a Hono server serves the API and a React app renders the admin. Coding agents get the guides and reference of the installed version with [`protobase skill install`](reference/cli.md#skill).
|
|
8
8
|
|
|
9
|
-
An app's own React code, its components, field types and actions, is a [plugin](reference/plugins.md)
|
|
9
|
+
An app's own React code, its components, field types and actions, is a [plugin](reference/plugins.md): built on its own against a plugin API that Protobase's releases keep, and loaded by the admin app when it starts. Protobase maintains the admin app, the API and the server, and a plugin keeps working as the app moves to newer releases, with their fixes and features, without changes of its own. Below 1.0 a new minor version may still change the config, and the bundle is built again for it; the plugins' code stays as it is (see [Who maintains what](reference/plugins.md#who-maintains-what)).
|
|
10
10
|
|
|
11
11
|
## Start an app
|
|
12
12
|
|
|
@@ -37,7 +37,7 @@ bun run --cwd examples/erp protobase users create you@example.com --generate-pas
|
|
|
37
37
|
bun run --cwd examples/erp dev # http://localhost:5173
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
`BETTER_AUTH_SECRET` in `examples/erp/.env` signs the session cookies; see [Login with Better Auth](reference/auth.md)
|
|
40
|
+
`BETTER_AUTH_SECRET` in `examples/erp/.env` signs the session cookies; see [Login with Better Auth](reference/auth.md). `protobase dev` serves the admin app and the API on one port and reloads both on every change ([CLI](reference/cli.md#dev)).
|
|
41
41
|
|
|
42
42
|
## Run the real estate example
|
|
43
43
|
|
|
@@ -51,7 +51,7 @@ bun run --cwd examples/real-estate dev # http://localhost:5173
|
|
|
51
51
|
|
|
52
52
|
## Run the property portal example
|
|
53
53
|
|
|
54
|
-
`examples/property-portal` is a public portal of homes for sale and for rent in the Netherlands and Spain, in the style of Funda and Idealista. Visitors browse and filter the listings without signing in, through the [anonymous role](reference/access.md#anonymous-access)
|
|
54
|
+
`examples/property-portal` is a public portal of homes for sale and for rent in the Netherlands and Spain, in the style of Funda and Idealista. Visitors browse and filter the listings without signing in, through the [anonymous role](reference/access.md#anonymous-access); members save searches of the listings that mail them new homes, and keep favorites and notes that only they see. The seed makes two members, `anna@portal.example` and `bram@portal.example`, and an admin, `admin@portal.example`, all with the password `property-portal-demo`.
|
|
55
55
|
|
|
56
56
|
```sh
|
|
57
57
|
bun run db:up && bun run --cwd examples/property-portal db:migrate && bun run --cwd examples/property-portal db:seed --scale small
|
|
@@ -70,7 +70,7 @@ bun run --cwd examples/property-portal dev # http://localhost:5173
|
|
|
70
70
|
| `bun run test:integration` | the database, subprocess and build tests (projects `integration*`), against the Postgres container, among them the real-Postgres tests (`*.postgres.test.ts`) |
|
|
71
71
|
| `bun run test:smoke` / `node --run test:smoke` | the CLI on Bun or on Node builds the ERP and serves its bundle, whose `€` must come back intact; part of `test:integration` on Bun |
|
|
72
72
|
| `bun run presets:write <version> <dir>` | writes each preset to `<dir>/<name>`: a standalone copy of its example with the `@protobase` packages in the range of `<version>`'s major (`>=0.y.z <1` below 1.0, `^x.y.z` from 1.0) and its own `bun.lock` at exactly `<version>`, which must be on npm |
|
|
73
|
-
| `bun run images:context` | the build contexts of the `protobase` and `protobase-dev` images in `dist/images`, at the version in `package.json` (see [Deploy](guides/deploy.md#images))
|
|
73
|
+
| `bun run images:context` | the build contexts of the `protobase` and `protobase-dev` images in `dist/images`, at the version in `package.json` (see [Deploy](guides/deploy.md#images)) |
|
|
74
74
|
| `bun run test:presets` | writes each preset as `bun run presets:write` does it and installs it with Bun from npm (so at a published version), then migrates, seeds, checks, tests and builds it on a database of its own, as a role without superuser rights; needs the Postgres container |
|
|
75
75
|
| `bun run test:postgres` | the Postgres suite in `tests/postgres/` (Vitest project `postgres`): the ERP's medium seed and the planner's statistics on it, and the jobs and event delivery through PgBouncer; needs the Postgres and PgBouncer containers and `bun run test:db postgres` |
|
|
76
76
|
| `bun run test:db` | builds the template databases the database tests clone for each run (`protobase_test_template`, `real_estate_test_template`, `property_portal_test_template`, all at small scale, and the empty, auth and jobs `snapshot_*_test_template` the real-Postgres and end-to-end tests clone), when missing or older than what they are built from; without them those tests skip. `bun run test:db postgres` builds the Postgres suite's (`protobase_medium_test_template`, the ERP at medium scale), `bun run test:db snapshots` the ones `test:record` records on (`snapshot_*_test_template`). Tests never use the `protobase`, `real_estate` or `property_portal` databases |
|
|
@@ -80,10 +80,10 @@ bun run --cwd examples/property-portal dev # http://localhost:5173
|
|
|
80
80
|
| `bun run storybook` | Storybook on port 6006 |
|
|
81
81
|
| `bun run build-storybook` | static Storybook build; its toolbar switches every story between light and dark |
|
|
82
82
|
| `bun run screenshots` / `bun run screenshots:dark` | screenshots of the stories tagged `website`, in light into `screenshots/`, in dark into `screenshots/dark/` |
|
|
83
|
-
| `bun run build:serve` | the serve runtime, `dist/protobase-serve.js` (see [Deploy](guides/deploy.md))
|
|
83
|
+
| `bun run build:serve` | the serve runtime, `dist/protobase-serve.js` (see [Deploy](guides/deploy.md)) |
|
|
84
84
|
| `bun run docs:dev` | this site on port 4321 |
|
|
85
85
|
| `bun run docs:build` | this site, built into `website/dist/`; fails on broken links |
|
|
86
|
-
| `bun run release --dry-run` | the next version and its changelog, from the commits since the last release (see [Versioning](reference/versioning.md))
|
|
86
|
+
| `bun run release --dry-run` | the next version and its changelog, from the commits since the last release (see [Versioning](reference/versioning.md)) |
|
|
87
87
|
| `bun run docs:check` | opens every page of the built site in Chromium and fails on console errors and failed requests; `BASE=https://docs.protobase.net` checks the live site |
|
|
88
88
|
|
|
89
|
-
Each public import is a package in `packages/` (`@protobase/schema`, `layout`, `query`, `client`, `ui`, `server`, and `cli` for the `protobase` command); `packages/presets` writes the projects a new app starts from and is not published; `packages/create-protobase` is `npm create protobase`, with every preset. See [Architecture](reference/architecture.md)
|
|
89
|
+
Each public import is a package in `packages/` (`@protobase/schema`, `layout`, `query`, `client`, `ui`, `server`, and `cli` for the `protobase` command); `packages/presets` writes the projects a new app starts from and is not published; `packages/create-protobase` is `npm create protobase`, with every preset. See [Architecture](reference/architecture.md) for the layout and import rules.
|