What it does
pb-hooks covers writing server-side JavaScript hooks for PocketBase, including custom routes, middleware, event hooks, and global APIs. It documents the goja ES5 runtime and explains all event hooks, database queries, and record operations.
It is relevant when you need to add custom routes, respond to PocketBase events, run cron jobs, send emails, make HTTP requests, query the database, or extend PocketBase with server-side logic.
Hook code is JavaScript that runs inside PocketBase on the goja ES5 runtime.
Limitations and requirements
Code runs on the goja ES5 runtime, so it must be written in ES5-compatible JavaScript.
Safety
Our team has not reviewed this resource. Only automated rules checked it; resources with high-risk signals are not published. These are signals, not a guarantee that installing it is safe. Try it in a sandbox project first.
- Runs code or changes an assistant's behaviour
Sources
- AI Templates (aitmpl) first seen 13 Nov 2026 · last seen 17 Nov 2026 · its page on the source · figures reported by the source: aitmpl downloads 22
pb-hooks
Server-side JavaScript hooks for PocketBase (pb_hooks). Use when writing custom routes, event hooks, cron jobs, sending emails, making HTTP requests, querying the database, or extending PocketBase with server-side logic. Covers the goja ES5 runtime, routing, middleware, all event hooks, DB queries, record operations, and global APIs.
As shown on www.aitmpl.com when we last read it