skills/vendix-prisma-schema/SKILL.md
Prisma schema editing patterns for Vendix: snake_case schema, Prisma 7 datasource config, relationships, indexes, enums, and migration workflow. Trigger: When editing Schema or adding/removing Prisma models, fields, relations, indexes, or enums.
npx skillsauth add rzyfront/vendix vendix-prisma-schemaInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
apps/backend/prisma/schema.prisma.apps/backend/prisma.config.ts.apps/backend/src/prisma/services/.Current schema is large: 200+ models and 140+ enums. Do not duplicate exhaustive model lists in skills; inspect the schema before editing.
schema.prisma declares provider/generator. The database URL is not in the schema; it is provided through apps/backend/prisma.config.ts.
// prisma.config.ts
export default defineConfig({
datasource: { url: process.env.DATABASE_URL! },
});
snake_case: users, store_users, subscription_plans.snake_case, but exceptions exist. Preserve existing naming in the touched model._enum, but enum values are mixed lower/upper case.vendix-prisma-migrations.schema.prisma minimally.prisma migrate dev --create-only when SQL needs review first.Preferred commands:
npm run db:migrate:dev -w apps/backend
npm run prisma:generate -w apps/backend
organization_id, store_id, or a relation to a scoped parent.StorePrismaService, OrganizationPrismaService, or EcommercePrismaService, update the scoped service registration.Unsupported("vector(1536)"); vector operations use raw SQL.ALTER TYPE ... ADD VALUE IF NOT EXISTS or guarded DO $$.DATA IMPACT header.vendix-prisma-migrationsvendix-prisma-scopesvendix-prisma-seedvendix-naming-conventionsdevelopment
Mobile app development rules for Vendix Expo/React Native project. Trigger: When editing, creating, or modifying any file under apps/mobile, or when developing mobile-specific features.
development
Feature gating by store subscription state: global store write guard, AI feature gate, Redis feature resolution, quota consumption, frontend paywall interceptor, banner, and subscription UI states. Trigger: When adding feature gates, paywalls, subscription-based access control, protecting store write operations, AI feature gates, or rollout flags.
testing
SaaS subscription billing for Vendix stores: plan pricing, invoices, Wompi platform payments, manual payments, partner commissions, payouts, proration, and dunning. Trigger: When creating SaaS invoices, working with partner rev-share, margin/surcharge pricing, invoice sequence allocation, partner payout batches, subscription payments, manual payments, or dunning flows.
development
Periodic quota counters with Redis, UTC period keys, Lua-based idempotent AI quota consumption, request-id deduplication, and post-success consumption. Trigger: When building quota counters, enforcing monthly/daily feature caps, or reusing AI quota patterns for uploads, emails, exports, or rate-limited features.