Pottr/Docs
Topic:How Pottr Works
Getting Started
.md

How Pottr Works

Pottr bridges client-friendly WordPress management and modern frontend engineering: where your data lives, how requests flow, and who does what.

The End-to-End Workflow

  1. Install Pottr in WordPress: Download the zip from pottr.tangble.com, upload it under Plugins › Add New › Upload Plugin and activate it. Pottr is not on the WordPress.org directory.

  2. Define your application data: Create collections visually in the WordPress admin, declare them in code with a Blueprint, or let an external app request a connection that you approve with one click.

  3. The REST API exists immediately: Pottr serves JSON at /wp-json/pottr/v1/collections/{slug} with filtering, sorting and pagination.

  4. Connect your frontend: Use your public key (pk_live_...) in your React, Next.js, Vue or mobile app to read and write entries.

  5. Add capabilities as you need them: Turn on app-user authentication, scope collections to their owners, add webhooks, accept media uploads, stream live events, or automate deployments with Blueprints.

A Request, Start to Finish

  1. Your app sends a request to /wp-json/pottr/v1/... with an Authorization: Bearer header (and, for signed-in users, an X-Pottr-User-Token header).
  2. Pottr checks CORS, then the API key or token, then your monthly API-call quota.
  3. The schema validates the request body: required fields, field types and unknown keys.
  4. The entry is read from or written to wp_pottr_entries, scoped to the user if the collection is user-owned.
  5. Pottr records an activity log event, queues any matching webhooks and publishes the change to live event streams.

Where Your Data Lives

  • Entries: One JSON document per entry in wp_pottr_entries, tagged with its collection slug. Deleting an entry through the API is a soft delete.
  • Schema: Your collections and fields are stored in the pottr_schema WordPress option.
  • App users: Each app that declares authentication gets its own users and refresh-token tables, separate from wp_users.
  • Logs, webhooks and events: Dedicated tables for activity logs, webhook deliveries and the short-lived live-event buffer.
  • Uploads: Files go to the WordPress uploads folder under pottr/{app}/ and are registered as media attachments.

Deleting the plugin keeps all of this by default. Data is only erased if you switch on Also erase all Pottr data when the plugin is deleted under Pottr › Settings.

WordPress vs. Pottr Responsibilities

LayerComponentResponsibilities
WordPressHosting & runtimePHP and MySQL runtime, admin UI, media library, transactional mail (wp_mail), WP-Cron scheduling.
PottrApplication engineSchema, REST routes, API keys, app-user JWT authentication, webhooks, metering, logs and live events.
Your frontendUser experienceThe client UI (React, Vue, Next.js, mobile), user interaction and client-side state.

The Pottr Admin

Everything above can be managed from the Pottr menu in WordPress:

  • Pottr (dashboard): Usage at a glance, plus tabs for Collections, Webhooks, Logs and, when you use app authentication, your app users. Open a collection to edit its fields and browse, add, import and delete entries.
  • API Keys: View, copy and regenerate your public and secret keys, copy a ready-made .env snippet and see connected apps.
  • License: See your plan, activate or deactivate a license key and manage billing.
  • Settings: Choose whether Pottr keeps an activity log and whether data is erased when the plugin is deleted.
  • Getting started: A guided first request, available from the top bar at any time.