skills/vendix-backend/SKILL.md
NestJS backend patterns for Vendix domains, controllers, services, DTOs, scoped Prisma, auth/permissions, validation, and module registration. Trigger: When editing files in apps/backend/, creating modules, or working with Prisma.
npx skillsauth add rzyfront/vendix vendix-backendInstall 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.
Backend code lives mainly under apps/backend/src/domains/, plus shared common/, prisma/, ai-engine/, and infrastructure modules. Do not create new feature folders under the old src/features/ pattern.
Common domain areas:
domains/superadmin/domains/organization/domains/store/domains/ecommerce/domains/auth/Follow existing domain folder conventions:
apps/backend/src/domains/<domain>/<module>/
<module>.module.ts
<module>.controller.ts
<module>.service.ts
dto/
Some established modules have nested submodules or shared services. Match the nearest existing pattern.
Use the domain-appropriate Prisma service:
| Context | Service |
| --- | --- |
| superadmin/system | GlobalPrismaService |
| organization admin | OrganizationPrismaService |
| store admin/POS | StorePrismaService |
| ecommerce customer/public store | EcommercePrismaService |
If adding a new model, register it in scoped Prisma services before relying on automatic tenant filters. See vendix-prisma-scopes.
ValidationPipe is configured in main.ts; use class-validator DTOs.VendixHttpException and registered ErrorCodes where available.npm run prisma:generate -w apps/backend
npm run db:migrate:dev -w apps/backend
npm run db:migrate:prod -w apps/backend
npm run db:seed -w apps/backend
docker logs --tail 40 vendix_backend
Do not run destructive reset/clean commands unless explicitly requested.
vendix-prismavendix-prisma-scopesvendix-backend-authvendix-backend-apivendix-validationvendix-error-handlingdevelopment
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.