Skip to content

Core Concepts

Account separates low-volume structured identity records (stored as Entries blueprints) from high-volume operational logs and counters (stored in managed SQL tables). Understanding these primitives makes every configuration option predictable.

flowchart LR
  User["Visitor or Member"] --> Guard["AccountGuard (CSRF, Roles, Redirects)"]
  Guard --> Stage1["Stage 1: Virtual /auth/* & /account/* (Inertia)"]
  Guard --> Stage2["Stage 2: Classic $account->render()"]
  Guard --> Stage3["Stage 3: Pure Engine handle(AccountRequest)"]
  Stage1 --> Engine["Account Flow Engine"]
  Stage2 --> Engine
  Stage3 --> Engine
  Engine --> Blueprints["9 Entries Blueprints (profiles, sessions, audit)"]
  Engine --> Tables["3 Managed SQL Tables (deliveries, inbox, saved_items)"]
  Engine --> Notify["NotificationService (email, sms, webhook, in_app)"]

Data Architecture: 9 Blueprints + 3 Managed SQL Tables

Section titled “Data Architecture: 9 Blueprints + 3 Managed SQL Tables”
Blueprint Handle Type Purpose
account Singleton Global settings: route prefixes, frontendMode, profile_source, registration policy, MFA/passkey rules, OAuth providers, and notification runtime.
account-profiles Collection Default member profile records (display name, phone, company, avatar, locale, approval/verification timestamps).
account-credentials Collection Registered WebAuthn Passkeys and TOTP secrets bound to ProcessWire users.
account-identities Collection Federated OAuth/OIDC provider links (provider, external subject ID, linked user).
account-challenges Collection Single-use Magic Links, 6-digit OTPs, email verification codes, password resets, and member invitations.
account-sessions Collection Persistent remember-me device tokens (token_selector, device label, masked IP, expiry, revocation).
account-consents Collection (locked: true) Immutable consent ledger recording policy versions and acceptance timestamps.
account-audit Collection (locked: true) Immutable security audit trail (account.login.*, account.session.theft_detected, account.privacy.exported, account.deleted).
account-templates Collection Editable notification templates with localized subjects, bodies, channels, and condition rules.

Account registers entriesTables => ['account_'] with Entries to own three high-throughput tables:

  • entries_tbl_account_deliveries (account_deliveries, provider account:deliveries): Channel-by-channel delivery log with status (sent, failed, skipped), attempt count, subject, and recipient.
  • entries_tbl_account_inbox (account_inbox): Per-user in-app notification inbox with read/unread timestamps.
  • entries_tbl_account_saved_items (account_saved_items): Multi-list saved item records (favorites, wishlist, compare, or custom list slugs) linked to ProcessWire users.

Single-Owner Member Profiles (profile_source)

Section titled “Single-Owner Member Profiles (profile_source)”

Account enforces a strict single-owner model for extended profile fields so data never drifts across two copies:

  1. entry (Default): Member profiles live in the account-profiles Entries collection. The core ProcessWire user template is never modified.
  2. user (Opt-In): Member profiles live directly on ProcessWire User pages via an embedded @fieldset:account-profile field attached with account:scaffold:user --allow-user-template --activate. In this mode, the admin workspace opens member records via page-edit/?id={id}.
  1. Stage 1 (frontendMode = 'inertia'): Account serves virtual routes under /auth/* and /account/* rendered by its built-in Account/AuthScreen and Account/AccountScreen Inertia views.
  2. Stage 2 (frontendMode = 'classic'): Embed server-rendered HTML forms in any ProcessWire template with $account->render('login') and enqueue getFrontendStyleAssets() + getFrontendScriptAssets() (dist/AccountFrontend.{js,css}).
  3. Stage 3 (Pure Engine): Call $account->handle(new AccountRequest(...)) returning a typed AccountResult, read $account->accountSummary(), $account->profile(), and $account->flowProps($screen), or expose /api/v1/identity/* through Headless.

Next steps