{"id":20364181,"url":"https://github.com/mabuonomo/yggdrasill","last_synced_at":"2026-04-11T03:33:02.469Z","repository":{"id":124139147,"uuid":"286695750","full_name":"mabuonomo/yggdrasill","owner":"mabuonomo","description":"🌲🐋 Yggdrasill is a super set of tools, for NestJS, that simplify development and deployment. Zero configuration. Fully dockerized.","archived":false,"fork":false,"pushed_at":"2020-09-14T19:55:07.000Z","size":762,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-04T05:09:12.171Z","etag":null,"topics":["docker","graphql","grpc","kubernetes","make","makefile","nestjs","prisma"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mabuonomo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-11T08:59:21.000Z","updated_at":"2023-03-09T00:22:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"97c01545-fb12-41c2-b5e6-1580f4acfd48","html_url":"https://github.com/mabuonomo/yggdrasill","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mabuonomo/yggdrasill","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mabuonomo%2Fyggdrasill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mabuonomo%2Fyggdrasill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mabuonomo%2Fyggdrasill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mabuonomo%2Fyggdrasill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mabuonomo","download_url":"https://codeload.github.com/mabuonomo/yggdrasill/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mabuonomo%2Fyggdrasill/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31668046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","graphql","grpc","kubernetes","make","makefile","nestjs","prisma"],"created_at":"2024-11-15T00:10:22.603Z","updated_at":"2026-04-11T03:33:02.439Z","avatar_url":"https://github.com/mabuonomo.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌲 🐋 Yggdrasill\n\n**Yggdrasill** is a super set of tools, for NestJS (https://docs.nestjs.com/), that simplify development and deployment. Zero configuration. Fully dockerized.\n\n## Phyilosophy\n\n_What's Yggdrasill? Yggdrasil (from Old Norse Yggdrasill) is an immense mythical tree that plays a central role in Norse cosmology, where it connects the Nine Worlds. (https://en.wikipedia.org/wiki/Yggdrasil)._\n\nThe purpose of this repository is to unify and simplify the use of some very useful tools, such as:\n\n- Prisma (https://www.prisma.io/)\n- GRPC (https://grpc.io/)\n- GraphQL (https://graphql.org/)\n- Kubernetes (https://kubernetes.io/it/) --\u003e WIP\n- and more (\"Nine Worlds\" remember?) --\u003e WIP\n\n## ☠️ Prerequisites\n\n- Make\n- Docker\n- Docker-compose\n- NestJS (if you use GRPC part)\n\n## 🏁 Quick start\n\nClone this repository into the root of the your project, as git submodule\n\n```sh\ngit submodule add git@github.com:mabuonomo/yggdrasill.git\n```\n\n## 🚀 Integration\n\nSome examples of integration\n\n---\n\n### Prisma\n\n_Create client and migration from a schema.prisma file_\n\nFirst of all you have to create the prisma schema (https://pris.ly/d/prisma-schema) in the following path \"schema/prisma/schema.prisma\" (root of the your project)\n\nAn example of the schema.prisma:\n\n```ts\n// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ndatasource db {\n  provider = \"mysql\"\n  url      = env(\"DATABASE_URL\")\n}\n\ngenerator client {\n  provider = \"prisma-client-js\"\n  output   = \"/main/node_modules/@prisma/client\"\n}\n\nmodel User {\n  id            Int      @default(autoincrement()) @id\n  createdAt     DateTime @default(now())\n  email         String   @unique\n  givenName     String\n  familyName    String\n  posts         Post[]\n  profile       Profile?\n  nickname      String   @unique\n  picture       String\n  emailVerified Boolean\n}\n\nmodel Profile {\n  id     Int    @default(autoincrement()) @id\n  bio    String\n  user   User   @relation(fields: [userId], references: [id])\n  userId Int\n}\n\nmodel Post {\n  id         Int        @default(autoincrement()) @id\n  createdAt  DateTime   @default(now())\n  title      String\n  published  Boolean    @default(false)\n  categories Category[] @relation(references: [id])\n  author     User       @relation(fields: [authorId], references: [id])\n  authorId   Int\n}\n\nmodel Category {\n  id    Int    @default(autoincrement()) @id\n  name  String\n  posts Post[] @relation(references: [id])\n}\n\nenum Role {\n  USER\n  ADMIN\n}\n\n```\n\nWe can now to generate the typescript client\n\n```sh\ncd yggdrasill \u0026\u0026 make prisma_build\n```\n\nIf you want to create and apply the migration at your database:\n\n```sh\ncd yggdrasill \u0026\u0026 make prisma_migrate\n```\n\nDo you use Nestjs? Read https://docs.nestjs.com/recipes/prisma\n\n---\n\n### GraphQL\n\n_Create NestJS's interfaces from \\*.graphql files_\n\nFirst of all you have to create the graphql schema in the following path \"schema/graphql/example.graphql\" (root of the your project)\n\nAn example of the example.graphql:\n\n```ts\ntype Query {\n  getCats: [Cat]\n  cat(id: ID!): Cat\n}\n\ntype Mutation {\n  createCat(createCatInput: CreateCatInput): Cat\n}\n\ntype Subscription {\n  catCreated: Cat\n}\n\ntype Cat {\n  id: Int\n  name: String\n  age: Int\n}\n\ninput CreateCatInput {\n  name: String\n  age: Int\n}\n```\n\nWe can now to generate the typescript interfaces\n\n```sh\ncd yggdrasill \u0026\u0026 make graphql_build\n```\n\nThe command will generate the following code (schema/graphql/dist):\n\n```ts\n/** ------------------------------------------------------\n * THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)\n * -------------------------------------------------------\n */\n\n/* tslint:disable */\n/* eslint-disable */\nexport interface CreateCatInput {\n  name?: string;\n  age?: number;\n}\n\nexport interface Cat {\n  __typename?: \"Cat\";\n  id?: number;\n  name?: string;\n  age?: number;\n}\n\nexport interface IMutation {\n  __typename?: \"IMutation\";\n  createCat(createCatInput?: CreateCatInput): Cat | Promise\u003cCat\u003e;\n}\n\nexport interface IQuery {\n  __typename?: \"IQuery\";\n  getCats(): Cat[] | Promise\u003cCat[]\u003e;\n  cat(id: string): Cat | Promise\u003cCat\u003e;\n}\n\nexport interface ISubscription {\n  __typename?: \"ISubscription\";\n  catCreated(): Cat | Promise\u003cCat\u003e;\n}\n```\n\nDo you use Nestjs? Read https://docs.nestjs.com/graphql/quick-start\n\n---\n\n### Grpc\n\n_Create NestJS's interfaces from \\*.proto files_\n\nFirst of all you have to create the protobuf schema in the following path \"schema/grpc/example.proto\" (root of the your project)\n\nAn example of the example.proto:\n\n```protobuf\nsyntax = \"proto3\";\nimport \"google/protobuf/empty.proto\";\n\npackage micr_prisma;\n\nservice MicrService {\n  rpc FindOne (google.protobuf.Empty) returns (UserList) {}\n  rpc Save (google.protobuf.Empty) returns (User) {}\n}\n\nmessage User {\n  string id = 1;\n  string name = 2;\n  string surname = 3;\n}\n\nmessage UserList {\n  repeated User users = 1;\n}\n```\n\nWe can now to generate the typescript interfaces\n\n```sh\ncd yggdrasill \u0026\u0026 make grpc_build\n```\n\nThe command will generate the following code (schema/grpc/dist):\n\n```ts\n/* eslint-disable */\nimport { Empty } from \"./google/protobuf/empty\";\nimport { Metadata } from \"grpc\";\nimport { Observable } from \"rxjs\";\nimport { GrpcMethod, GrpcStreamMethod } from \"@nestjs/microservices\";\n\nexport interface User {\n  id: string;\n  name: string;\n  surname: string;\n}\n\nexport interface UserList {\n  users: User[];\n}\n\nexport interface MicrServiceController {\n  findOne(\n    request: Empty,\n    metadata?: Metadata\n  ): Promise\u003cUserList\u003e | Observable\u003cUserList\u003e | UserList;\n\n  save(\n    request: Empty,\n    metadata?: Metadata\n  ): Promise\u003cUser\u003e | Observable\u003cUser\u003e | User;\n}\n\nexport interface MicrServiceClient {\n  findOne(request: Empty, metadata?: Metadata): Observable\u003cUserList\u003e;\n\n  save(request: Empty, metadata?: Metadata): Observable\u003cUser\u003e;\n}\n\nexport function MicrServiceControllerMethods() {\n  return function (constructor: Function) {\n    const grpcMethods: string[] = [\"findOne\", \"save\"];\n    for (const method of grpcMethods) {\n      const descriptor: any = Reflect.getOwnPropertyDescriptor(\n        constructor.prototype,\n        method\n      );\n      GrpcMethod(\"MicrService\", method)(\n        constructor.prototype[method],\n        method,\n        descriptor\n      );\n    }\n    const grpcStreamMethods: string[] = [];\n    for (const method of grpcStreamMethods) {\n      const descriptor: any = Reflect.getOwnPropertyDescriptor(\n        constructor.prototype,\n        method\n      );\n      GrpcStreamMethod(\"MicrService\", method)(\n        constructor.prototype[method],\n        method,\n        descriptor\n      );\n    }\n  };\n}\n\nexport const MICR_PRISMA_PACKAGE_NAME = \"micr_prisma\";\nexport const MICR_SERVICE_NAME = \"MicrService\";\n```\n\nDo you use Nestjs? Read https://docs.nestjs.com/microservices/grpc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmabuonomo%2Fyggdrasill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmabuonomo%2Fyggdrasill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmabuonomo%2Fyggdrasill/lists"}