prisma-template
v0.2.1
Published
CLI to compose Prisma schemas using modular templates and an interactive wizard.
Readme
Prisma Template CLI
🇬🇧 Merge modular Prisma templates to produce production-ready
schema.prismafiles. (Default language: English)🇪🇸 Traducción completa disponible en docs/es.md.
📚 Documentation
Reading this on npm? Use the CDN links below because relative GitHub paths are not available here.
- 🇬🇧 English (canonical): docs/en.md
- 🇪🇸 Spanish translation: docs/es.md
Each guide covers the interactive flow, CLI flags, and detailed examples. Both files also ship inside the npm tarball under docs/ if you prefer local reading.
🧱 Categorías de plantillas / Template categories
| Category | Quick summary (ES en paréntesis) |
| ------------- | --------------------------------------------------------------------------------------------------------------------------- |
| core/ | Identity, auth, RBAC, multitenancy, auditing, feature flags (Identidad, autenticación, RBAC, multitenancy, auditoría...) |
| business/ | Organizations, CRM, sales pipelines, projects, tasks (Organizaciones, CRM, pipeline de ventas, proyectos y tareas) |
| content/ | CMS, blog, docs, knowledge base, LMS, media library (CMS, blog, documentación, knowledge base, LMS y media library) |
| commerce/ | eCommerce, marketplace, payments, billing/subscriptions, invoicing, credits (eCommerce, marketplace, pagos...) |
| engagement/ | Social graph, comments, reactions, notifications, moderation, analytics, A/B testing (Social, comentarios, reacciones...) |
| operations/ | Booking engines and support/ticketing (Booking y soporte/ticketing) |
| infra/ | API keys, webhooks, rate limiting, IoT devices, telemetry (API keys, webhooks, rate limiting, IoT, telemetry) |
| streaming/ | OTT catalog, playlists, progress, entitlements, ads (OTT catalog, playlists, progress, entitlements y ads) |
Browse these folders under templates/ to inspect every .prisma file or drop in new ones—the CLI picks them up automatically.
🚀 Quick peek
# Interactive wizard
npx prisma-template
# Generate directly from a preset
npx prisma-template --db mysql --preset ott-platform --output ./prisma/schema.prisma
# Direct CLI example
npx prisma-template --db mysql --add auth billing ott --output ./prisma/schema.prisma📦 Install
# Global install
npm install -g prisma-template
# Or run ad-hoc without installing globally
npx prisma-template🧭 Template vs Custom
After picking the database provider you can choose between:
- Template: ten curated stacks (e.g.
OTT Platform,B2B SaaS Suite,Marketplace Hub,Creator Economy,Knowledge Hub,Support Ops,Booking Platform,IoT Fleet,Social Community,Education LMS) spanning multiple categories that you can accept or tweak. - Custom: the original browser where you hop across categories and toggle exactly the modules you need.
Every preset is documented in detail (EN/ES). Pick whichever mode matches the speed you need.
Skip the wizard entirely with --preset <id> (IDs: ott-platform, b2b-saas, content-network, marketplace-hub, creator-economy, knowledge-hub, support-ops, booking-platform, iot-fleet, social-community, education-lms).
