All Projects → Errorname → Prisma Multi Tenant

Errorname / Prisma Multi Tenant

Licence: mit
🧭 Use Prisma as a multi-tenant provider for your application

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Prisma Multi Tenant

Prisma Kubernetes Deployment
Demo how to deploy a Prisma server to a Kubernetes cluster.
Stars: ✭ 89 (-52.41%)
Mutual labels:  prisma
Ledokku
Beautiful web UI for all things Dokku
Stars: ✭ 103 (-44.92%)
Mutual labels:  prisma
Pi
Multi-tenant application development engine for cloud ready SaaS platform.
Stars: ✭ 145 (-22.46%)
Mutual labels:  multi-tenant
Prisma Docs Generator
Prisma generator for automatically generating documentation reference from the Prisma schema.
Stars: ✭ 91 (-51.34%)
Mutual labels:  prisma
Saas Vuejs Tailwindcss
VueJS + TailwindCSS frontend for SaaS apps.
Stars: ✭ 107 (-42.78%)
Mutual labels:  multi-tenant
Docs
📚 Prisma Documentation
Stars: ✭ 136 (-27.27%)
Mutual labels:  prisma
Howtographql
The Fullstack Tutorial for GraphQL
Stars: ✭ 7,999 (+4177.54%)
Mutual labels:  prisma
Prisma Examples
🚀 Ready-to-run Prisma example projects
Stars: ✭ 3,017 (+1513.37%)
Mutual labels:  prisma
Real World Grading App
An example of a real-world REST API backend built with TypeScript, Hapi, Prisma, and PostgreSQL.
Stars: ✭ 105 (-43.85%)
Mutual labels:  prisma
Ra Data Opencrud
A react-admin data provider for Prisma and GraphCMS
Stars: ✭ 142 (-24.06%)
Mutual labels:  prisma
Production Ready Expressjs Server
Express.js server that implements production-ready error handling and logging following latest best practices.
Stars: ✭ 101 (-45.99%)
Mutual labels:  prisma
Nestjs Realworld Example App
Exemplary real world backend API built with NestJS + TypeORM / Prisma
Stars: ✭ 1,838 (+882.89%)
Mutual labels:  prisma
Umbriel
✉️ Email marketing platform built with Node.js, TypeScript, Prisma and DDD concepts.
Stars: ✭ 138 (-26.2%)
Mutual labels:  prisma
Prisma
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite & MongoDB (Preview)
Stars: ✭ 18,168 (+9615.51%)
Mutual labels:  prisma
K8spin Operator
K8Spin multi-tenant operator - OSS
Stars: ✭ 175 (-6.42%)
Mutual labels:  multi-tenant
Multi Tenant App Demo
Demonstrates the discriminator field (shared schema) based multi-tenant application using Spring Boot & Hibernate 5.
Stars: ✭ 57 (-69.52%)
Mutual labels:  multi-tenant
Serverless Prisma
AWS Serverless Prisma Boilerplate
Stars: ✭ 126 (-32.62%)
Mutual labels:  prisma
Prisma Auth0 Example
Boilerplate Prisma Startup
Stars: ✭ 184 (-1.6%)
Mutual labels:  prisma
Ofc Bootstrap
Bootstrap OpenFaaS Cloud for your team
Stars: ✭ 178 (-4.81%)
Mutual labels:  multi-tenant
Typegraphql Prisma
Prisma 2 generator to emit TypeGraphQL types and CRUD resolvers from your Prisma 2 schema
Stars: ✭ 137 (-26.74%)
Mutual labels:  prisma

Prisma-multi-tenant 🧭

Version Documentation Maintenance License: MIT Twitter: Errorname_

🧭 Use Prisma as a multi-tenant provider for your application

What's a multi-tenant application?

A multi-tenant application is when a single instance of your application runs on a server and serves multiple tenants.

With a multi-tenant architecture, a software application is designed to provide every tenant a dedicated share of the instance - including its data, configuration, user management, tenant individual functionality and non-functional properties.

For example, you could run a social-network for companies, where each company would have it's own data and users.

Why is Prisma great for multi-tenancy?

Prisma gives you all the tools necessary to handle your database: data modeling, database schema migrations, type safe database access, etc. Doing so, prisma-multi-tenant can then automate those processes and help you make a multi-tenant application.

Why do I need prisma-multi-tenant?

Because prisma-multi-tenant does not only allow you to access multiple databases seamlessly with only a couple of lines of code in your server, but it also let you use the CLI to create new tenants and assure consistancy between all your databases as easily as possible.

Installation

npm i -g prisma-multi-tenant

prisma-multi-tenant init # Init multi-tenancy in your Prisma project

Usage

If this is your first time using prisma-multi-tenant, I strongly suggest that you follow the ✨ Getting Started ✨ tutorial.

$> prisma-multi-tenant help

  🧭  prisma-multi-tenant v2.4.1

  USAGE

    prisma-multi-tenant [command] [args]

    Examples:
        prisma-multi-tenant new
        prisma-multi-tenant migrate my_tenant up
        prisma-multi-tenant env my_tenant -- npx @prisma/cli instrospect
        ...

  COMMANDS

    init                       Init multi-tenancy for your application
    list                       List all tenants
    new <management?>          Create a new tenant or management
    studio <name>              Use Studio to access a tenant
    migrate <name?> <action>   Migrate tenants (up, down, save)
    delete <name>              Delete one tenant
    generate                   Generate Prisma Clients for the tenants and management
    env <name>                 Set env variables for a specific tenant
    eject                      Eject prisma-multi-tenant from your application
    help                       Display this help

  OPTIONS

    -h, --help                 Output usage information for a command
    -V, --version              Output the version number
    -e, --env                  Load env file given as parameter
    --verbose                  Print additional logs
const { MultiTenant } = require('@prisma-multi-tenant/client')

const multiTenant = new MultiTenant()

// The name can come from anywhere (headers, token, ...)
const prisma = await multiTenant.get('my_tenant_A')

// Use Prisma-Client the same way as before
const users = await prisma.user.findMany()

console.log(users)

Documentation

Read more on how prisma-multi-tenant can help you achieve multi-tenancy for your apps:

Author

👤 Thibaud Courtoison

🤝 Contributors

Contributions, issues, and feature requests are welcome! 🙌

Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2020 Thibaud Courtoison.

This project is MIT licensed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].