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.
Architecture Overview
Section titled “Architecture Overview”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”Internal Entries Blueprints (9)
Section titled “Internal Entries Blueprints (9)”| 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. |
Managed SQL Tables (3)
Section titled “Managed SQL Tables (3)”Account registers entriesTables => ['account_'] with Entries to own three high-throughput tables:
entries_tbl_account_deliveries(account_deliveries, provideraccount: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:
entry(Default): Member profiles live in theaccount-profilesEntries collection. The core ProcessWireusertemplate is never modified.user(Opt-In): Member profiles live directly on ProcessWireUserpages via an embedded@fieldset:account-profilefield attached withaccount:scaffold:user --allow-user-template --activate. In this mode, the admin workspace opens member records viapage-edit/?id={id}.
Three Progressive Integration Stages
Section titled “Three Progressive Integration Stages”- Stage 1 (
frontendMode = 'inertia'): Account serves virtual routes under/auth/*and/account/*rendered by its built-inAccount/AuthScreenandAccount/AccountScreenInertia views. - Stage 2 (
frontendMode = 'classic'): Embed server-rendered HTML forms in any ProcessWire template with$account->render('login')and enqueuegetFrontendStyleAssets()+getFrontendScriptAssets()(dist/AccountFrontend.{js,css}). - Stage 3 (Pure Engine): Call
$account->handle(new AccountRequest(...))returning a typedAccountResult, read$account->accountSummary(),$account->profile(), and$account->flowProps($screen), or expose/api/v1/identity/*throughHeadless.