Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1003 Bytes

File metadata and controls

57 lines (39 loc) · 1003 Bytes

Jethings Database

Centralized database authority repository for the Jethings ecosystem.

This repository is the single source of truth for:

  • Prisma schema
  • Database migrations
  • Database structure
  • Seeds
  • Database evolution

Seeds

Run the full database bootstrap after migrations:

pnpm db:bootstrap

Run only the idempotent seed:

pnpm prisma:seed

The seed flow generates permission resources from every Prisma model, then seeds:

  • base roles and role-resource permissions
  • the global super admin account
  • store types: OPTIC, SHOES
  • product types: LENS, FRAME, SHOES
  • required lens variants and their product-type relations

Configure the super admin through .env:

SUPER_ADMIN_EMAIL=superadmin@jethings.local
SUPER_ADMIN_PASSWORD=SuperAdmin123!

Architecture

jethings-database
    └── Owns schema + migrations

j-shoes-backend
    └── Prisma consumer only

j-optic
    └── Drizzle consumer only