Engineering

Database

Data domains, migration workflow, and realtime state ownership.

Database

Urmate uses the database as the source of truth for users, sessions, Study records, instructor applications, chat agents, channel providers, tasks, community installs, XRouter configuration, billing, runtime workspaces, and admin state.

Core Domains

DomainStores
AuthUsers, sessions, accounts, roles, profile metadata.
StudyCourses, boards, library items, podcasts, progress, instructor profiles, bookings, certificates, organizations.
InstructorApplications, agreements, payout details, verification status, sessions, course plans, strikes.
ChatAgents, channel providers, channel threads, external messages, tasks, workroom messages, community installs.
XRouterProviders, models, keys, endpoints, quota tracking, usage logs, CLI tool settings.
BuildersProjects, files, snapshots, runtime metadata, import drafts.
InfrastructureVPS records, sandbox connections, API keys, volumes, registries, snapshots, heartbeats.
BillingSubscriptions, checkout sessions, coupons, receipts, payment provider metadata.

Migration Workflow

Use the repo's existing Prisma workflow. Common commands:

cd /root/apps/urmate
pnpm prisma generate
pnpm prisma migrate dev
pnpm prisma db push

Use migrate dev when you need a named local migration. Use db push only for rapid local iteration where the team has accepted that schema history is not being generated.

Realtime Expectations

Most dashboards poll or fetch API state after mutations. Features that users expect to feel realtime include:

  • Study notifications;
  • instructor booking requests;
  • Circles messages and avatars;
  • chat channel webhooks;
  • task workroom output;
  • XRouter usage counters;
  • infrastructure heartbeat status.

When adding a feature, store durable state first, then update client state optimistically only when the server mutation succeeds.

Copyright © 2026