Standard Set
Version 0.1.3 · Owners: @benallfree
The extensions every PocketOne app has: settings, page templates, a cache, API tokens (with the OAuth server), remotes (remote/v1), MCP, Pages, an S3 fallback bucket and S3 redirects, point-in-time restore, backups, bulk mail, deploy, WASM modules called from pb_hooks, dashboard cache headers (UI Cache), and a key-value store ($kv). Every app uses it, standalone or an instance on a multisite host, so an app never misses one because its host forgot to list it. Members can be reconfigured or turned off per app, never removed.
The set also gives every app's superuser dashboard PocketOne's logo and favicon, the running PocketOne version in the footer (linked to its releases) and a Docs link to pocketone.dev/docs.
Install · Configure · Use · Integrations · Example
Install
The standard set is built into pocketone. In your own Go build, make the app with it instead of
pocketbase.New():
set := standard.New()
app := set.NewApp(pocketbase.Config{}, jsvm.Config{HooksDir: "pb_hooks"})
app.Start()
NewApp registers the members, loads pb_hooks with their JS APIs ($mcp, $apiTokens, $bulkmail, $wasm, $llm) and resolves
their contracts. On an app you built yourself, call set.Register(app, jsvmConfig) instead.
To build the app from pocketone.yaml's app section (data folder, dev mode, hooks and migrations folders, JS engine
and its limits), load the file and pass what AppFromConfig returns:
cfg, err := config.Load(config.FromArgs(os.Args[1:]))
if err != nil {
log.Fatal(err)
}
a, err := standard.AppFromConfig(cfg)
if err != nil {
log.Fatal(err)
}
app := standard.New().NewApp(a.PocketBase, a.JS)
Every app key reaches your build this way, including ones added in later releases. Your own flags override the
fields they cover.
Configure
- Reconfigure a member: replace it, e.g.
set.PITR = pitr.New(pitr.Config{Retention: 7 * 24 * time.Hour}). A member set to nil is an error. - Turn one off: on a single app,
enabled: falsein itspocketone.yamlsection (api-tokens: {enabled: false}); for every instance under Pocker, in itspocker: isolate_config:section, and for one instance, in itsextensions.<name>. Extensions that require it turn off too, and say why. cache, storage (s3-fallback), s3redirect and pitr readenabledin their own sections: off, they stay registered and do nothing. - Keep one off in code: a binary whose own code does what a member does sets
set.Switches, whichRegisterreads each member'senabledfrom (nil:standard.ConfiguredSwitches, thepocketone.yamlsections). Wrap it:if name == "bulkmail" { return extkit.Config{{"enabled": false}} }; return standard.ConfiguredSwitches(name). - Add your own:
set.Add(myextension.New()). Extras register after the members, under the same rules. - Pick providers:
set.Providersispocketone.yaml'sproviders:section, for a contract more than one extension provides.
pocketone.yaml reference
api-tokens:
Turns the api-tokens extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.api-tokens.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
backups:
Turns the backups extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.backups.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
bulkmail:
Turns the bulkmail extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.bulkmail.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
deploy:
Turns the deploy extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.deploy.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
kv:
Turns the kv extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.kv.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
llm-chat:
Turns the llm-chat extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.llm-chat.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
llm-search:
Turns the llm-search extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.llm-search.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
mcp:
Turns the mcp extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.mcp.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
pages:
Turns the pages extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.pages.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
providers:
Which extension provides a contract when several do.
remotes:
Turns the remotes extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.remotes.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
settings:
Turns the settings extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.settings.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
templates:
Turns the templates extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.templates.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
uicache:
Turns the uicache extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.uicache.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
wasm:
Turns the wasm extension off on a single app (enabled: false). On a multisite host it doesn't reach the instances: use pocker's isolate_config, or an instance's extensions.wasm.
| Key | Type | Default | Description |
|---|---|---|---|
enabled |
bool | On unless false. Extensions that require it turn off too, and the startup lines say why. |
Use
Each app logs what it got when it starts:
standard: on: settings, templates, cache, api-tokens, remotes, mcp, pages, storage, s3redirect, pitr, backups, bulkmail, deploy, wasm, uicache, kv, llm, llm-chat
standard: api-tokens/v1 ← api-tokens
With remotes off (deploy requires its remote/v1):
standard: remotes off: enabled: false
standard: deploy off: needs remote/v1, which nothing provides
Commands and APIs
Generated from the pocketone binary and the contracts this extension provides.
Commands
What it adds to the pocketone binary (CLI reference):
| Command | |
|---|---|
pocketone cache |
Shows each extension's folder in pb_cache and its size |
pocketone cache clear [extension...] |
Empties pb_cache (every extension's folder, or the ones named) |
pocketone extensions migrate down <extension> [n] |
Reverts an extension's last n migrations (default 1; 0: all of them) |
pocketone extensions migrate up [extension] |
Applies pending extension migrations (startup does this too) |
pocketone extensions migrations |
Lists each extension's migrations and whether they're applied |
Integrations
| With | What happens |
|---|---|
| Multisite | Every instance that runs PocketOne gets the set. Pocker gives it to each instance (Server.Standard) with the instance's own extensions.<name> settings and the host's extras. A Docker instance on a PocketOne image runs the stock pocketone binary: the set with its defaults, no extras. One on a PocketBase image has none. |
| Contracts | Members find each other through contracts (api-tokens/v1), resolved per app; the startup lines show who provides what. |
Example
// A PocketOne app with the standard set and one extra extension: run it with `go run . serve`.
package main
import (
"log"
"time"
"ganigeorgiev.com/pocketbase/pocketbase"
"pocketone.dev/ext/jsvm"
"pocketone.dev/ext/mailtrap"
"pocketone.dev/ext/pitr"
"pocketone.dev/ext/standard"
)
func main() {
set := standard.New()
set.PITR = pitr.New(pitr.Config{Retention: 7 * 24 * time.Hour}) // reconfigure a member
set.Add(mailtrap.New()) // add your own
app := set.NewApp(pocketbase.Config{}, jsvm.Config{HooksDir: "pb_hooks"})
if err := app.Start(); err != nil {
log.Fatal(err)
}
}
License
MIT
Questions and comments
Comments are a GitHub Discussions thread; sign in with GitHub to post.