📖 User Guides

Admin Portal Guide

Manage users, finances, employers, and system operations from the PetBank admin panel.

🐾 Owner Portal 🏥 Provider Portal 🏢 Employer Portal ⚙️ Admin Portal
🔐

Accessing the admin portal

Navigate to petsavingsbank.com/petbank-admin.html and sign in with an admin-authorized account. Admin access is controlled via the ADMIN_USER_IDS environment variable.

📊

System health check

  • Users — Total count with owner/provider breakdown
  • Pets — Active pets and active PSA accounts
  • Total PSA Funds — Combined routine + emergency balances across all owners
  • Payments — Total and settled payment counts
  • Platform Fees — Total earnings from transaction fees
  • Pending Requests — Outstanding payment requests
  • Uptime — Real-time system uptime counter
  • Table Row Counts — Row counts for all major database tables
👥

User management

Browse and manage all pet owner accounts:

  • Search: Filter owners by name or email in real time
  • Table: Name, Email, Pet count, PSA Balance, Plan, Status, Email Verified, Join date

Actions per owner

  • View Detail — Full profile: personal info, pets, PSA details, household members, OAuth accounts, recent payments
  • Force Verify Email — Manually verify an unverified email
  • Suspend/Unsuspend — Schedule account closure or cancel a pending closure
  • Reactivate — Restore a deactivated account
  • View As — Read-only impersonation showing their dashboard data
  • Delete — Permanently remove the owner (requires typing the owner's name to confirm)

Browse and manage all provider accounts:

  • Search: Filter by business name
  • Table: Business name, Type, Location, KYB status, Client count, Revenue, Join date

Actions per provider

  • View Detail — Business info, client list, offers, announcements, Stripe account, platform fee
  • Suspend/Unsuspend — Manage account status
  • Reactivate — Restore inactive providers
  • View As — Read-only impersonation showing revenue, clients, and offers
  • Delete — Remove provider (requires business name confirmation)

View all provider-created offers in the shared library. Remove inappropriate offers from the library (doesn't affect the provider's own copy).

💰

Financial management

  • Filters: Status (Settled/Pending/Failed/Refunded), date range, specific owner, specific provider
  • Table: Date, Owner, Provider, Pet, Gross, Discount, Platform Fee, Net, Status
  • Export to CSV
  • Stats: Total accounts, routine balance sum, emergency balance sum, active count
  • Search by owner name
  • Table: Owner, Email, Routine balance, Emergency balance, Total, Status, Opened date
  • Manual Adjustment — Add or deduct funds from any PSA with a required reason (logged to audit trail)
  • Export to CSV

Payment Requests

  • Filter by status: Pending, Paid, Declined, Cancelled, Expired
  • Detail view: Full request breakdown including provider, owner, pet, amounts, dates, and notes
  • Admin actions: Decline or cancel pending requests

Provider Payouts

  • Filters: Status (Paid/In Transit/Pending/Failed), specific provider
  • Table: Provider, Stripe ID, Amount, Fee, Net, Status, Initiated date, Arrival date
🏢

Employer management

Employers

  • Stats: Total companies, enrolled employees, pending invites, total contributed
  • Table: Company, Tier, Monthly contribution, Enrolled count, Pending invites, Total contributed, KYB status, Account status
  • Edit Employer — Change tier, contribution amount, KYB status, account status, and internal notes
  • Suspend/Unsuspend/Reactivate

Enrollments

  • Filter by status: Active, Paused, Removed, Left
  • Table: Employee, Email, Employer, Tier, Status, Total contributed, Last contribution, Enrollment date

Contributions

  • Filters: Status (Settled/Pending/Processing/Failed/Refunded), specific month
  • Table: Month, Company, Employee, Amount, PSA target, Status, Stripe intent, Run date
📈

Growth tracking

View all owner-to-provider invitations across the platform:

  • Filters: Status (Sent/Opened/Registered), text search
  • Table: Business Name, Email, Invited By, Status, Sent date, Follow-up sent date, Registered date
  • Status meanings: Sent = email delivered; Opened = provider clicked the link; Registered = provider completed signup and auto-connected

Join Events

  • Filters: Event type (Click/Signup/Connect), text search
  • Table: Provider, Event Type, Session ID, Date
  • Event types: Click = visited join link; Signup = new owner registered; Connect = pet linked to provider

Insurance Policies

  • Filters: Status (Active/Cancelled/Expired/None), text search
  • Table: Owner, Pet, Carrier, Policy #, Premium, Deductible, Reimb %, Status, Expiry date
🛠️

DevOps tools

Health Reviews

  • Filter: Pending vs. Completed
  • Table: Owner, Pet, Year, Prompted date, Status, Completed date, New plan generated

Activity Log (Audit Trail)

  • Filter by action: Dynamic dropdown of all action types
  • Filter by entity: Owner, Pet, Provider, etc.
  • Entries show: Timestamp, action badge, entity, details of change
  • Paginated for large datasets

Database

  • Health: Row counts for all tables
  • Data Exports: CSV download for Owners, Providers, Payments, Ledger, PSA Accounts
  • SQL Migrations: Select and run migration files (typed confirmation required)
  • Danger Zone: Full database wipe (requires exact phrase + admin email confirmation)

Email Tools

  • Send Test Email — Send a test message to any address
  • Recent Notifications — View all system notifications with filters
  • Clear 30d+ read — Bulk-delete read notifications older than 30 days

Environment

  • Stats: API version, database status
  • Environment Variables: Grid showing which env vars are set (values never exposed)
  • Table Sizes: PostgreSQL disk usage per table
👁️

View As (read-only)

Owner View

Pets, subscription plan, PSA balances, targets, linked providers, pending requests, recent payments, ledger entries, and notifications.

Provider View

Revenue stats, business profile, clients, offers, announcements, campaigns, payments received, payment requests (with status badges), and notifications.

🔒No data can be modified during impersonation. It's a diagnostic tool for support and troubleshooting.
🛡️

Key safety notes

  • Delete operations always require typing confirmation (owner name, business name, or specific phrase)
  • PSA adjustments require a reason and are logged to the audit trail
  • Database wipe requires both an exact phrase AND your admin email — this is irreversible
  • All admin actions are recorded in the Activity Log