@athas/db
external-readyShared database schema package with Drizzle models used by backend modules.
Purpose
@athas/db centralizes the Drizzle schema model for backend domains.
Scope
- Auth tables (
users,accounts,sessions, verification tokens) - RBAC tables (roles, permissions, user-role assignments)
- Notifications tables
- Integrations provider config tables
- Billing tables (catalog, purchases, checkouts, webhook events, entitlements)
- Wallet tables
Why this package exists
- keeps schema ownership in one place
- prevents table/type drift across modules
- enables migrations and typed query consistency
Typical import
import { users, roles, billingPurchases } from '@athas/db'Notes
- Runtime DB access is backend-owned.
- Schema updates should be accompanied by migration generation and validation.