We are lazy team, we make microservices more simple, fast, and elegant!
gRPC is fastest microservices architecture, we can consume another service with gRPC. But gRPC is more complex to build from scratch.
We make this code so easy to understand, you can create microservices only from the graphql scheme.
Features that we have and will make include:
- Generate Protobuf from graphql schema
- Generate gRPC server from Protobuf schema which is generated by graphql schema
- Generate each table and field which is needed by the server from the graphql schema
- Generate flow based on graphql schema (TODO)
- Graphql server with gRPC microservices (TODO)
- Docker and docker-compose
To running project, You can choose to use local or docker.
To running project via local, You can follow this step:
-
Install MongoDB
See the documentation to install MongoDB on your computer: documentation
-
Running Server
-
Before running the server, change
.env
based your MongoDB configuration -
Running local server with this command:
npm run start:dev
-
To running project docker compose, You can follow this step:
-
Install Docker and Docker Compose
-
Running Server
Running docker compose with command:
npm run start:docker
.
├── coverage # Interactive test result
├── dist # Compiled file javascript
├── graphql # Graphql schema
├── microgen # This project locate in here
├── node_modules # Fvking black hole
├── protos # protobuf file
├── scripts # Script helper
├── src
| ├── __tests__ # Unit Testing files
| ├── app # Contain Basic App configuration
| ├── database # Data access stuff (Sequalize mostly)
| ├── grpc # gRPC server
| ├── proto # Proto generated file .d.ts and .js
| ├── repositories # Contain query sql/no-sql to database
| ├── utils # Util libs (formats, debugger, validation, etc)
| └── index.ts # App Entry point
|
├── .env # Example environment
├── .env.dev # Environment which is required to generate
├── .gitignore # Git ignore
├── LICENSE # The license file
├── README.md # This file
└── tsconfig.json # Typescript configuration