Skip to main content
SaaS Foundation uses Prisma with PostgreSQL. The schema comes almost entirely from Better Auth’s core models and its Admin, Organization, and API Key plugins, with a small number of application-specific fields. Read Authentication to learn why the application relies on Better Auth while exposing a smaller, deliberate set of auth operations. The tables below describe persisted database fields. Prisma relation fields, such as sessions on User, are omitted because they do not create additional columns.

User

Stores a person’s identity, profile, platform access, and moderation state.

Session

Stores authenticated sessions and their active organization context.

Account

Stores password credentials and external identity-provider accounts connected to a user.

Verification

Stores short-lived verification values used by authentication flows.

Apikey

Stores user-owned API keys and their rate-limit state. The Prisma model is named Apikey and maps to the apikey database table.

Organization

Stores each customer organization in the multi-tenant application.

Member

Connects a user to an organization and assigns their organization-level role.

Invitation

Stores pending and completed invitations for both portals.