vendix-backend-prisma

Scope Prisma queries by organization and store for NestJS multi-tenant backends.

5|Updated Aug 23, 2025
One-click install
npx skills add https://github.com/Rzyfront/Vendix --skill vendix-backend-prisma
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vendix-backend-prisma
Source: https://github.com/Rzyfront/Vendix/tree/main/skills/vendix-backend-prisma
Command: npx skills add https://github.com/Rzyfront/Vendix --skill vendix-backend-prisma

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a scalable pattern for multi-tenant data access by delivering domain-specific Prisma services that automatically scope queries by organization and store, ensuring data isolation and consistent behavior across services.

Core Features & Use Cases

  • Domain-specific PrismaService extensions: Each domain (ecommerce, organization, superadmin, public) extends the base PrismaService to apply context-aware filtering automatically.
  • Context-aware data access: Uses a RequestContextService to inject organization_id and store_id into queries for automatic scoping.
  • Reusable domain helpers: Centralized helpers for common queries (e.g., findCategories, findCartItems) and a PrismaModule setup for global availability.

Quick Start

Instantiate EcommercePrismaService in your CatalogService and fetch products with automatic store scoping.

Frequently Asked Questions about vendix-backend-prisma

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scope Prisma queries by organization and store in a NestJS multi-tenant backend?

To scope Prisma queries by organization and store, use domain-specific PrismaService extensions that inject organization_id and store_id via a RequestContextService for automatic context-aware filtering.

How does context-aware filtering enforce data isolation across multi-tenant domains?

Context-aware filtering enforces data isolation by using a RequestContextService to automatically inject tenant identifiers into domain-specific PrismaService extensions for every query.

Can I use Prisma with NestJS to manage domain data across multiple tenants?

Yes, you can manage domain data across tenants by extending a base PrismaService into domain-specific services like EcommercePrismaService and registering a global PrismaModule for consistent data access patterns.

What's the best way to structure reusable domain helpers for multi-tenant Prisma queries?

The best way to structure reusable domain helpers is to centralize common queries like findCartItems within domain-specific PrismaService extensions, ensuring consistent scoping and easing maintenance.

Why do I need separate PrismaService extensions for different domains in a multi-tenant app?

You need separate PrismaService extensions for domains like ecommerce and superadmin to apply context-aware filtering automatically, ensuring strict data isolation and consistent behavior across services.