Skip to main content
All models use async SQLAlchemy 2 with PostgreSQL. UUIDs are used as primary keys throughout. Timestamps (created_time, updated_time) are always stored in UTC.

Users & Access Control

User (user_account)

The central entity — every person who logs in.

Organisation (organisation)

Groups users and websites together.

UserOrganisationMapping (user_organisation_mapping)

Many-to-many: users ↔ organisations, with a role per membership.

UserRole (user_role)

Named roles (owner, editor, viewer, etc.) with a hierarchy level.

Permission (permission)

Granular permission slugs.

PermissionUserRoleMapping (permission_user_role_mapping)

Maps permissions to roles (many-to-many).

Websites & Audits

Website (website)

A website registered by a user for auditing.

WebsiteAudit (website_audit)

A single scan run. Contains config and timing.

WebsitePage (website_page)

Individual pages discovered and scanned during an audit.

LighthouseAudit (lighthouse_audit)

Results from a Lighthouse scan on a single page.

AccessibilityAuditMaster (accessibility_audit_master)

Reference table of all WCAG/ADA accessibility rules. Pre-populated, cached in Redis on startup.

AccessibilityAuditLog (accessibility_audit_log)

Per-page processed accessibility results.

AuditIssueList (audit_issue_list)

Individual accessibility issues found in a scan.

Billing & Subscriptions

Plan (plan)

Available subscription plans.

UserPlanPurchase (user_plan_purchase)

Records every plan purchase/subscription.

UserStripeAccount (user_stripe_account)

Stripe customer record per user.

UserSubscriptionLimit (user_subscription_limit)

Tracks credit/scan usage per billing period.

Other Models