Guides
Use these guides after the quickstart to build an application, connect a client, and run PBVex in production. Read Backend primitives for the difference between queries, mutations, actions, HTTP actions, scheduling, and cron jobs. For the architectural overview, read How PBVex works.
For feature-by-feature walkthroughs, build contacts, conversations, realtime messages, authorization, and attachments in the Messaging app tutorial, or build checkout, idempotent webhooks, and premium entitlements in the FakePayment tutorial.
Build your backend
- Schema and database — define tables, indexes, and database operations.
- Querying data and designing indexes — build bounded queries and efficient access paths.
- Relationships and joins — model typed references, hydrate related records, and choose when to denormalize.
- Data types and validation — validate arguments, returns, and stored values.
- Backend functions — write queries, mutations, and actions.
- HTTP actions — expose public HTTP endpoints.
- Components — package and mount reusable backend features.
- Project organization — arrange modules and components while understanding generated paths and reserved files.
- Outbound HTTP requests — call external APIs from actions with bounded requests and responses.
Add platform capabilities
- Authentication — use password, OTP, OAuth2, MFA, and authenticated function calls.
- Migrations — transform PBVex documents transactionally and manage separate PocketBase host migrations.
- Authorization — protect application data with ownership, membership, and role checks.
- Application email templates — create typed templates and send them from functions.
- File storage — upload, inspect, download, and delete files.
- Image uploads and resizing — validate image bytes, inspect trusted metadata, and serve predefined thumbnail variants.
- Scheduling work — enqueue durable one-shot work for a delay or exact instant.
- Cron jobs — declare recurring application-wide schedules backed by PocketBase cron.
- Environment variables and secrets — declare and provision typed configuration.
Use cases and tutorials
- Build an instant-messaging app — combine authentication, profiles, contacts, permissions, realtime messages, and attachments across a complete application.
- Build a fake payment flow — generate checkout URLs, process provider events idempotently, and activate premium entitlements.
Connect an application
- Client SDK — configure
@pbvex/client, call functions, and subscribe to realtime updates. - React — use the provider and hooks in React applications.
- Svelte — use the Svelte 5 client and reactive query helpers.
- Examples — start from complete client and framework slices.
Deploy and operate
- Deployment — build, activate, inspect, and roll back application code.
- Self-hosting PBVex — install the server, access PocketBase administration, and manage persistent state.
- Going to production — configure systemd, Nginx, TLS, mail, security, and backups.
- Testing — test applications, clients, and the repository.
- Limits and boundaries — understand runtime, protocol, and single-node constraints.