Schemix allows you to programmatically create Prisma schemas using TypeScript ⌨️

Overview

Schemix

NPM

Schemix let's you programmatically generate Prisma schemas.

As Prisma schemas are not inherently segmentable, Schemix acts as a library to aid in generating your Prisma schema in a molecularized fashion using TypeScript, then exporting to one classic .prisma file to be consumed by your application.

image

Installation

Simply install the library using your favourite package manager.

Yarn

yarn add -D schemix

NPM

npm i -D schemix

Usage

Using this library, you'll create your Schema and models using TypeScript, then by running the PrismaSchema#export function, you can export it to a Prisma file.

// _schema.ts
import { createSchema } from "schemix";

export const PrismaSchema = createSchema({
  datasource: {
    provider: "postgresql",
    url: "env(DATABASE_URL)",
  },
  generator: {
    provider: "prisma-client-js",
  },
});

export const UserModel = PrismaSchema.createModel("User");
export const PostModel = PrismaSchema.createModel("Post");
export const PostTypeEnum = PrismaSchema.createEnum("PostType");

import "./models/Post.model";
import "./models/User.model";
import "./enums/PostType.enum";

PrismaSchema.export("./", "schema");
// models/User.model.ts

import { UserModel, PostModel, PostTypeEnum } from "../_schema";

UserModel
  .string("id", { id: true, default: { uuid: true } })
  .int("registrantNumber", { default: { autoincrement: true } })
  .boolean("isBanned", { default: false })
  .relation("posts", PostModel, { list: true })
  .raw('@@map("service_user")');
// models/Post.model.ts

import { UserModel, PostModel } from "../_schema";

PostModel
  .string("id", { id: true, default: { uuid: true } })
  .int("postNumber", { default: { autoincrement: true } })
  .string("content", { raw: "@database.VarChar(240)" })
  .boolean("isDeleted", { default: false })
  .enum("postType", PostTypeEnum, { default: "COMMENT" })
  .relation("author", UserModel, {
    optional: true,
    fields: ["authorId"],
    references: ["id"],
  })
  .string("authorId", { optional: true });
// enums/PostType.enum.ts

import { PostTypeEnum } from "../_schema";

PostTypeEnum
  .addValue("FEED", { map: "feed" })
  .addValue("COMMENT", {
    map: "comment",
  });

The aforementioned configuration would produce the following Prisma schema:

// schema.prisma

datasource database {
  provider = "postgresql"
  url = "env(DATABASE_URL)"
}

generator client {
  provider = "prisma-client-js"
}

enum PostType {
  FEED     @map("feed")
  COMMENT  @map("comment")
}

model User {
  id               String   @id @default(uuid())
  registrantNumber Int      @default(autoincrement())
  isBanned         Boolean  @default(false)
  posts            Post[]
  @@map("service_user")
}

model Post {
  id         String  @id @default(uuid())
  postNumber Int     @default(autoincrement())
  content    String  @database.VarChar(240)
  isDeleted  Boolean @default(false)
  postType   PostType @default(COMMENT)
  author     User?   @relation(fields: [authorId], references: [id])
  authorId   String?
}
Comments
  • Add support for extensions

    Add support for extensions

    https://www.prisma.io/docs/concepts/components/prisma-schema/postgresql-extensions

    With the current implementation, this code:

    datasource: {
      // rest
      extensions: `[pg_tgrm, zombodb]`,
      // rest
    }
    

    Evaluates to:

    extensions = "[pg_tgrm, zombodb]"
    
    opened by KrzysztofZawisla 8
  • Relations as mixin still bugy

    Relations as mixin still bugy

    Hi there, I am following this issue.

    Please again look into this: https://codesandbox.io/s/exciting-leaf-bxqzvt?file=/src/schema.prisma Relation mixin is used by Request, Session, Token models, but it gets generated only for the Request.

    If you want to, have a look into my full scheme: https://codesandbox.io/s/laughing-sun-u8sd54?file=/src/schema.prisma Basically a lot of models should contain the relation, but only CitationResponse and CitationRequest contains it.

    Thank you in advance!

    bug 
    opened by Daidalos117 6
  • 1.7.1 re-orders fields

    1.7.1 re-orders fields

    from 1.7.0 to 1.7.1 a change was introduced so that fields in a model are re-ordered, I think many users (including me) have their fields in a particular order - is there any way to control the order like was the normal behaviour before 1.7.1?

    The new order of fields seems pretty random indeed. My preference would be that they are as they are written (i.e. how it used to be). The current order is not even alphabetical... schemas are a mess now

    bug enhancement 
    opened by virbyte 5
  • Allow creating schema without source files

    Allow creating schema without source files

    It looks like there's currently only support for creating a Prisma schema by creating specific folders to hold mixins, models, and enums. This seems like a great approach for the typical use-case where you want to programmatically create and maintain a project's schema.prisma file.

    However, my use-case is a bit different. I'm trying to parse a GraphQL schema and build up a Prisma schema string on-demand. Essentially, I want to be able to independently create Prisma models, enums, and mixins and store them in variables, from which I'll later be able to create a complete (or partial) Prisma schema string by calling toString() on all of the objects and doing string concatentation.

    I tried to get this to work by importing and using functions like createModel, createMixin, etc. and calling toString() on the resulting PrismaModels, but it doesn't look like this is possible because there's a check for an existing schema object here.

    Has there been any thought given to being able to support such use-cases?

    enhancement 
    opened by efreila 5
  • schemix generate absolute path for names in Windows 10

    schemix generate absolute path for names in Windows 10

    How to reproduce :

    • use Windows 10
    • clone the standard-usage example from the repo
    • install latest schemix
    • change import from ../../../dist to schemix
    • npm start

    result :

    enum D:\Absolute\Path\on\Windows\Status {
      PENDING
      LIVE
      DELETED
      REMOVED
    }
    

    expected result :

    enum Status {
      PENDING
      LIVE
      DELETED
      REMOVED
    }
    
    opened by tsanyqudsi 4
  • Add true programmatic schemas

    Add true programmatic schemas

    As per #35, this re-implements the ability for a purely programmatic approach to schema generation, models and enums can be created independent of a parent schema while retaining full prior functionality.

    An example has been added in examples/programmatic-usage, in which an API which can generate basic models is created.

    The core logic for this endpoint is as follows.

    handler(context) {
      const { body } = context.request;
      const model = new PrismaModel(body.modelName);
      model.string("id", { id: true, default: { uuid: true } });
    
      for (const { type, name } of body.fields) {
        model[type](name);
      }
    
      return {
        status: 200,
        body: model.toString(),
      };
    }
    

    The README for said example is as follows.


    This example creates an API at 0.0.0.0:8000 with a route in which you can send GET requests to a /model endpoint. It accepts the following zod schema.

    validation.object({
      modelName: validation.string(),
      fields: validation.array(validation.object({
        type: validation.enum(["string", "int"]),
        name: validation.string(),
      })),
    });
    

    When a request is sent with the following body to 0.0.0.0:8000/model, it will respond with the subsequent string.

    {
    	"modelName": "ExampleModel",
    	"fields": [
    		{
    			"type": "int",
    			"name": "number"
    		},
    		{
    			"type": "string",
    			"name": "name"
    		}
    	]
    }
    
    model ExampleModel {
      id     String @id @default(uuid())
      number Int
      name   String
    }
    
    opened by ridafkih 4
  • fix: keep the fields order same as the source

    fix: keep the fields order same as the source

    This should fix the order of the fields when using mixins, I basically wrapped all field setters in setImmediate. This currently passes all tests and outputs the expected schema. @ridafkih what do you think?

    Also, I removed two snapshots that were obsolete.

    opened by FerasAloudah 3
  • Relation fields doesn't get generated when used as a mixin

    Relation fields doesn't get generated when used as a mixin

    Hi, when using .relation as this:

    export default createMixin((UserRelationshipMixin) => {
      UserRelationshipMixin
        .relation("user", UserModel, {
          references: ["id"],
          fields: ["userId"],
        })
        .int("userId", { unique: true })
    });
    

    the resulting model is missing those fields. Please look into example: https://codesandbox.io/s/exciting-leaf-bxqzvt?file=/src/models/Session.model.ts As you can see, Token model has manually added those fields and everything is fine. Session model on the other hand is using mixin, and it lack those fields.

    Thanks in advance :)

    bug good first issue 
    opened by Daidalos117 3
  • Fix linting issues

    Fix linting issues

    I noticed that there were some linting issues:

    33 problems (33 errors, 0 warnings)
    26 errors and 0 warnings potentially fixable with the `--fix` option.
    

    So I have enabled checking and fixing those in the package.json.

    I have ignored the example dir as I was seeing

    The file does not match your project config: example/enums/Status.enum.ts.
    The file must be included in at least one of the projects provided
    

    I would suggest adding a pre-commit hook and / or a GHA CI workflow to check linting on PRs.

    opened by zygopleural 3
  • Fix buildCompositeUnique [and add tests]

    Fix buildCompositeUnique [and add tests]

    🤦🏼

    Welcome to Node.js v16.16.0.
    Type ".help" for more information.
    > const a = ["banana", "apple", "pear"]
    undefined
    > const b = { fields: ["banana", "apple", "pear"] }
    undefined
    > typeof a
    'object'
    > typeof b
    'object'
    > Array.isArray(a)
    true
    > Array.isArray(b)
    false
    

    Since this has now bitten me, I have added support for jest unit tests and added 3 tests to make sure this doesn't happen again.

    yarn jest
    yarn run v1.22.17
    warning ../../../package.json: No license field
    $ /Users/lee/Code/nous/schemix/node_modules/.bin/jest
     PASS  lib/util/options.test.ts
      buildCompositeUnique
        with fields array
          ✓ should return correct composite unique value (1 ms)
        with options object
          without map
            ✓ should return correct composite unique value
          with map
            ✓ should return correct composite unique value
    
    Test Suites: 1 passed, 1 total
    Tests:       3 passed, 3 total
    Snapshots:   0 total
    Time:        0.373 s, estimated 1 s
    Ran all test suites.
    ✨  Done in 1.03s.
    

    I would suggest adding a GHA CI workflow to run this for PRs.

    I would also suggest updating the package.json to reflect the new ability to run jest unit tests:

    diff --git a/package.json b/package.json
    index 9bb4364..959b963 100644
    --- a/package.json
    +++ b/package.json
    @@ -11,7 +11,9 @@
         "lib": "lib"
       },
       "scripts": {
    -    "test": "yarn build && cd example && yarn && yarn start",
    +    "test": "yarn test:unit && yarn test:integration",
    +    "test:unit": "yarn jest",
    +    "test:integration": "yarn build && cd example && yarn && yarn start",
         "build": "tsc --declaration && tsc-alias"
       },
       "keywords": [
    

    Lastly, I updated the .eslintrc to only lint *.ts files (since there is now a commonJS babel.config.cjs file due to jest) and also fixed the type roots in tsconfig.json (i.e. adding jest to types and also fixing the typeRoots to point to top level node_modules - FYI I believe typeRoots actually overrides types)

    opened by zygopleural 3
  • feat: support recursive file search

    feat: support recursive file search

    This PR supports putting enums / mixins / models in nested folders. This is particularly helpful to separate the models by domain folders:

    - models
        - auth
            - Account.model.ts
            - VerificationToken.model.ts
        - order
            - Order.model.ts
            - OrderItem.model.ts  
    
    opened by thwonghin 3
  • Support descriptions

    Support descriptions

    Schemix should support providing descriptions for models and fields.

    I haven't familiarized myself with the schemix source code yet, but I can give it try.

    opened by overra 3
  • [WIP] feat: prisma enum from JS enum

    [WIP] feat: prisma enum from JS enum

    This is proposed functionality for importing TS/JS enums into the schemix/prisma. We can do this manually now, but it would be nice if the library could support this way out of the box. IMHO it should be preferred way to import JS enums, because it has numerous advantages.

    • using enum anywhere / using already typed enums
    • using default value for column from enum

    Maybe better safety could be implemented because of this, not really sure for now. What do you think?

    opened by Daidalos117 6
  • Support limiting length of strings

    Support limiting length of strings

    At the moment, in order to limit the length of strings, I need to do:

    const User = createModel((User) => {
      User
        .string("id", { id: true })
        .string("setupId", { raw: "@database.VarChar(36)" })
    })
    

    It would be nice to support something like

    const User = createModel((User) => {
      User
        .string("id", { id: true })
        .string("setupId", { maxLength: 36 })
    })
    

    or

    const User = createModel((User) => {
      User
        .string("id", { id: true })
        .varChar("setupId", { limit: 36 })
    })
    

    or

    const User = createModel((User) => {
      User
        .string("id", { id: true })
        .varChar("setupId", 36)
    })
    

    In order to add the "@database.VarChar(36)" automatically.

    opened by zygopleural 3
  • Support passing decimal precisions

    Support passing decimal precisions

    At the moment, if I want to define FPP, I need to do:

    const Probability = createModel((Probability) => {
      Probability
        .string("id", { id: true })
        .decimal("probability", { raw: "@database.Decimal(3, 2)" })
    })
    

    It would be nice to support

    const Probability = createModel((Probability) => {
      Probability
        .string("id", { id: true })
        .decimal("probability", 3, 2)
    })
    

    or

    const Probability = createModel((Probability) => {
      Probability
        .string("id", { id: true })
        .decimal("probability", { precision: [3, 2] })
    })
    

    In order to add the "@database.Decimal(3, 2)" automatically.

    opened by zygopleural 0
  • Support standard date fields

    Support standard date fields

    At the moment, if I want to store just a date, I need to do:

    const Report = createModel((Report) => {
      model
        .string("id", { id: true })
        .dateTime("reportDate", { raw: "@database.Date" })
    })
    

    It would be nice to be able to have something like

    const Report = createModel((Report) => {
      model
        .string("id", { id: true })
        .date("reportDate")
    })
    

    which would automatically add the "@database.Date".

    This is more of a nice to have, and completely understandable that you might want to just support native PostgreSQL types.

    This could equally be implemented with a custom function (presumably).

    opened by zygopleural 0
  • Additional type safety for enum default values

    Additional type safety for enum default values

    Given an enum

    const PlanType = createEnum((PlanType) => {
      PlanType
        .addValue("FREE")
        .addValue("PREMIUM")
    })
    

    and a model

    const Plan = createModel((Plan) => {
      Plan
        .string("name", { id: true })
        .enum("type", PlanType, { default: "FREE" })
    })
    

    I want to ensure that the value passed as the default argument for the enum (e.g. { default: "FREE" }) is a valid value of the enum (i.e. ["FREE", "PREMIUM"]).

    At the moment I am able to pass anything (e.g. .enum("type", PlanType, { default: "SOMETHING" })).

    opened by zygopleural 3
Releases(v1.8.5)
  • v1.8.5(Dec 13, 2022)

    Full Changelog: https://github.com/ridafkih/schemix/compare/v1.8.4...v1.8.5

    Made it so that when extensions provided into the datasource generated by Schemix, they are no longer wrapped in quotation marks. Issue reported by @KrzysztofZawisla in #52.

    Source code(tar.gz)
    Source code(zip)
  • v1.8.4(Dec 11, 2022)

    What's Changed

    • feat: add types to accept "extensions" by @ridafkih in https://github.com/ridafkih/schemix/pull/53

    Full Changelog: https://github.com/ridafkih/schemix/compare/v1.8.3...v1.8.4

    Source code(tar.gz)
    Source code(zip)
  • v1.8.3(Nov 12, 2022)

    This release was made at altitude! 🛩️

    What's Changed

    • feat: merge mixins raw fields and attribute blocks by @FerasAloudah in https://github.com/ridafkih/schemix/pull/50

    Full Changelog: https://github.com/ridafkih/schemix/compare/v1.8.2...v1.8.3

    Source code(tar.gz)
    Source code(zip)
  • v1.8.2(Nov 7, 2022)

    What's Changed

    • fix: keep the fields order same as the source by @FerasAloudah in https://github.com/ridafkih/schemix/pull/49

    New Contributors

    • @FerasAloudah made their first contribution in https://github.com/ridafkih/schemix/pull/49

    Full Changelog: https://github.com/ridafkih/schemix/compare/v1.8.1...v1.8.2

    Source code(tar.gz)
    Source code(zip)
  • v1.8.1(Nov 7, 2022)

    This release was made at altitude! 🛩️

    What's Changed

    • match both ticks when getting filename by @ridafkih in https://github.com/ridafkih/schemix/pull/47

    Full Changelog: https://github.com/ridafkih/schemix/compare/v1.8.0...v1.8.1

    Source code(tar.gz)
    Source code(zip)
  • v1.8.0(Oct 21, 2022)

    What's Changed

    • fix mixins when interfacing directly with PrismaModel by @ridafkih in https://github.com/ridafkih/schemix/pull/44

    Full Changelog: https://github.com/ridafkih/schemix/compare/v1.7.1...v1.8.0

    Source code(tar.gz)
    Source code(zip)
  • v1.7.1(Oct 18, 2022)

    What's Changed

    • Fixes a bug reported by @Daidalos117 in which it was reported that there were still issues with relations that existed within mixins! by @ridafkih in https://github.com/ridafkih/schemix/pull/41

    Full Changelog: https://github.com/ridafkih/schemix/compare/v1.7.0...v1.7.1

    Source code(tar.gz)
    Source code(zip)
  • v1.7.0(Oct 18, 2022)

    What's Changed

    • Schemix now supports projects post-build, by filtering out .d.ts and .x.map files, you no longer have to use ts-node to generate your schema file! @ridafkih in https://github.com/ridafkih/schemix/pull/42

    Full Changelog: https://github.com/ridafkih/schemix/compare/v1.6.1...v1.7.0

    Source code(tar.gz)
    Source code(zip)
  • v1.6.1(Oct 16, 2022)

    What's Changed

    • Add true programmatic schemas by @ridafkih in https://github.com/ridafkih/schemix/pull/36
    • Add eslint and unit tests by @ridafkih in https://github.com/ridafkih/schemix/pull/38
    • 1.6.0 by @ridafkih in https://github.com/ridafkih/schemix/pull/39

    Thank you to @efreila for the massive help on the programmatic feature-set!

    Full Changelog: https://github.com/ridafkih/schemix/compare/v1.5.2...v1.6.1

    Source code(tar.gz)
    Source code(zip)
  • v1.5.2(Oct 10, 2022)

    What's Changed

    • Fix linting issues by @zygopleural in https://github.com/ridafkih/schemix/pull/31
    • fix: import all mixins after models and enums by @ridafkih in https://github.com/ridafkih/schemix/pull/34

    Full Changelog: https://github.com/ridafkih/schemix/compare/v1.5.1...v1.5.2

    Source code(tar.gz)
    Source code(zip)
  • v1.5.1(Sep 30, 2022)

    What's Changed

    • Fix buildCompositeUnique [and add tests] by @zygopleural in https://github.com/ridafkih/schemix/pull/30

    Full Changelog: https://github.com/ridafkih/schemix/compare/v1.5.0...v1.5.1

    Source code(tar.gz)
    Source code(zip)
  • v1.5.0(Sep 30, 2022)

    What's Changed

    • Update onDelete and onUpdate referential actions by @zygopleural in https://github.com/ridafkih/schemix/pull/25
    • Add composite uniqueness by @zygopleural in https://github.com/ridafkih/schemix/pull/23
    • Allow unique enum fields by @zygopleural in https://github.com/ridafkih/schemix/pull/22

    New Contributors

    • @zygopleural made their first contribution in https://github.com/ridafkih/schemix/pull/25

    Full Changelog: https://github.com/ridafkih/schemix/compare/v1.4.0...v1.5.0

    Source code(tar.gz)
    Source code(zip)
  • v1.4.0(Sep 24, 2022)

    What's Changed

    • feat: add model map option by @thwonghin in https://github.com/ridafkih/schemix/pull/20

    Full Changelog: https://github.com/ridafkih/schemix/compare/v1.3.0...v1.4.0

    Source code(tar.gz)
    Source code(zip)
  • v1.3.0(Sep 12, 2022)

    What's Changed

    • feat: support recursive file search by @thwonghin in https://github.com/ridafkih/schemix/pull/17

    New Contributors

    • @thwonghin made their first contribution in https://github.com/ridafkih/schemix/pull/17

    Full Changelog: https://github.com/ridafkih/schemix/compare/v1.2.0...v1.3.0

    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Aug 31, 2022)

    What's Changed

    • Updated yarn instructions by @Ninoks in https://github.com/ridafkih/schemix/pull/10
    • add PrismaModel#id method to add @@id fields. by @ridafkih in https://github.com/ridafkih/schemix/pull/14
    • Ridafkih/add boolean generator options by @ridafkih in https://github.com/ridafkih/schemix/pull/13

    New Contributors

    • @Ninoks made their first contribution in https://github.com/ridafkih/schemix/pull/10

    Full Changelog: https://github.com/ridafkih/schemix/compare/v1.1.4...v1.2.0

    Source code(tar.gz)
    Source code(zip)
  • v1.1.2(Aug 14, 2022)

    Full Changelog: https://github.com/ridafkih/schemix/compare/v0.6.0...v1.1.2

    This release of Schemix drastically changes the functionality of the library.

    Schema Indexing

    Schemix will now automatically index the folders relative to the file in which the createSchema function is called for three folders.

    • ./models/
    • ./mixins/
    • ./enums/

    It will pull the respective items from these folders, register them into the schema, and include it in the schema export.

    Model Declaration

    The way in which models, enums, and mixins are declared has changed. Now, you import createModel, createEnum, and createMixin from the library itself, the name of the item will default to the file name, but an overriding name can be provided as the first parameter for these functions.

    This means you no longer need to define the item in the index, import it into an external configuration file, and then import that configuration back into the index. This will all be managed automatically.

    // models/User.model.ts
    import { createModel } from "../../dist";
    
    import PostModel from "./Post.model";
    import UUIDMixin from "../mixins/UUID.mixin";
    
    export default createModel((UserModel) => {
      UserModel
        .mixin(UUIDMixin)
        .relation("friends", UserModel, { list: true, name: "friends" })
        .relation("friendsRelation", UserModel, { list: true, name: "friends" })
        .relation("posts", PostModel, { list: true });
    });
    

    The name in the aforementioned model will default to User, as that is the name of the file. If we want to change it to UserModel, for example, we can do so as follows.

    // models/User.model.ts
    // ...
    
    export default createModel("UserModel", (UserModel) => {
      UserModel
        .mixin(UUIDMixin)
        .relation("friends", UserModel, { list: true, name: "friends" })
        .relation("friendsRelation", UserModel, { list: true, name: "friends" })
        .relation("posts", PostModel, { list: true });
    });
    

    Contributions

    If any issues are discovered, suggestions can be provided, etc., please get in contact! Feel free to open an issue, or PR!

    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Aug 2, 2022)

    What's Changed

    • feat: support multiple generators by @itsjxck in https://github.com/ridafkih/schemix/pull/8

    New Contributors

    • @itsjxck made their first contribution in https://github.com/ridafkih/schemix/pull/8

    Full Changelog: https://github.com/ridafkih/schemix/compare/v0.5.13...v0.6.0

    Source code(tar.gz)
    Source code(zip)
  • v0.5.13(Jul 6, 2022)

    What's Changed

    • feat: :art: add ability to pass in "env" key in datasource "shadowDatabaseUrl" prop by @evist0 in https://github.com/ridafkih/schemix/pull/6

    New Contributors

    • @evist0 made their first contribution in https://github.com/ridafkih/schemix/pull/6

    Full Changelog: https://github.com/ridafkih/schemix/compare/v0.5.12...v0.5.13

    Source code(tar.gz)
    Source code(zip)
  • v0.5.12(May 11, 2022)

    What's Changed

    • update package.json and ci/cd deployment by @ridafkih in https://github.com/ridafkih/schemix/pull/4
    • Add numeric types by @ridafkih in https://github.com/ridafkih/schemix/pull/2

    Full Changelog: https://github.com/ridafkih/schemix/compare/v0.5.11...v0.5.12

    Source code(tar.gz)
    Source code(zip)
  • v0.5.11(May 11, 2022)

    Number Types

    This adds the Decimal, and BigInt types to Schemix. The corresponding methods are PrismaModel#bigInt and PrismaModel#decimal, alongside the other model chain methods.

    Source code(tar.gz)
    Source code(zip)
Owner
Rida F'kih
I don't know how to fix your printer.
Rida F'kih
Prisma 2+ generator to emit Joi schemas from your Prisma schema

Prisma Joi Generator Automatically generate Joi schemas from your Prisma Schema, and use them to validate your API endpoints or any other use you have

Omar Dulaimi 26 Dec 24, 2022
Prisma 2+ generator to emit Zod schemas from your Prisma schema

Prisma Zod Generator Automatically generate Zod schemas from your Prisma Schema, and use them to validate your API endpoints or any other use you have

Omar Dulaimi 212 Dec 27, 2022
A NestJS module that allows you use Prisma, set up multiple Prisma services, and use multi-tenancy in each Prisma service.

NestJS Prisma Module Installation To use this package, first install it: npm i @sabinthedev/nestjs-prisma Basic Usage In order to use this package, yo

Sabin Adams 39 Dec 2, 2022
Learn GraphQL by building a blogging engine. Create resolvers, write schemas, write queries, design the database, test and also deploy.

GraphQL Blog graphqlblog.com Learn GraphQL by building a blogging engine. Create resolvers, write schemas, write queries, design the database, test an

GraphQLApps 6 Aug 17, 2022
Opinionated collection of TypeScript definitions and utilities for Deno and Deno Deploy. With complete types for Deno/NPM/TS config files, constructed from official JSON schemas.

Schemas Note: You can also import any type from the default module, ./mod.ts deno.json import { type DenoJson } from "https://deno.land/x/[email protected]

deno911 2 Oct 12, 2022
Prisma +2 generator to emit a tRPC shield from your Prisma schema

Prisma tRPC Shield Generator Automatically generate a tRPC Shield from your Prisma Schema. Updates every time npx prisma generate runs. Table of Conte

Omar Dulaimi 27 Dec 24, 2022
This is a library to alternate and self-host the Prisma Data Proxy (cloud.prisma.io)

Alternative Prisma Data Proxy This is a library to alternate and self-host the Prisma Data Proxy (cloud.prisma.io). In order to deploy your project to

AijiUejima 60 Dec 28, 2022
Cindy Dorantes 12 Oct 18, 2022
Quick programmatically install npm dependencies 📦

qpind Install dependecies quick & programmatically ?? Install # Using npm: npm install qpind # Using pnpm: pnpm add qpind # Using yarn: yarn add qpind

Conner 15 Oct 6, 2022
Programmatically upload NFT assets to OpenSea.io for free

OpenSea Uploader This is the example repository for my blog post How to Mint 100,000 NFTs For Free. Please note that this is merely a proof of concept

Andre Rabold 18 Sep 15, 2022
GraphQL Hive provides all the tools the get visibility of your GraphQL architecture at all stages, from standalone APIs to composed schemas (Federation, Stitching)

GraphQL Hive GraphQL Hive provides all the tools the get visibility of your GraphQL architecture at all stages, from standalone APIs to composed schem

Kamil Kisiela 184 Dec 21, 2022
Automagically bypass hcaptcha challenges with http api, with puppeteer, selenium, playwright browser automation scripts to bypass hCaptcha programmatically

Automagically bypass hcaptcha challenges with http api, with puppeteer, selenium, playwright browser automation scripts to bypass hCaptcha programmatically. For help you can message on discord server with the bellow link. You can also create an issue.

Shimul 199 Jan 2, 2023
A Telegram bot which generates your intro video programmatically 📽️

Features ?? Generate videos programmatically from telegram input High performance High quality videos Installation ?? Installation is pretty easy, cli

Tuhin Kanti Pal 14 Sep 6, 2022
This repository aims to create a POC about authentication and authorization using NestJS, Prisma and JWT.

A progressive Node.js framework for building efficient and scalable server-side applications. Description Nest framework TypeScript starter repository

Vinícius Fraga Modesto 2 Nov 2, 2022
An API built for an invoices manager app using TypeScript and Prisma with Node and Express.

Invoices App API An API built for the invoices manager app using TypeScript and Prisma with Node and Express. Run locally To run locally, you need to

Waleed Alfaifi 4 Oct 17, 2022
App that allows you to control and watch YouTube videos using hand gestures. Additionally, app that allows you to search for videos, playlists, and channels.

YouTube Alternative Interaction App An app I made with Edward Wu that allows you to search and watch videos from YouTube. Leverages Google's YouTube D

Aaron Lam 2 Dec 28, 2021
Chris Siku 13 Aug 22, 2022
Create a C# .NET core EntityFramework ORM from your schema.prisma file

A note of forewarning to the would-be user... This was a failure. I'm making a note here: huge regret. It's hard to overstate my dissatisfaction. ?? S

Ian Ray 9 Dec 24, 2022