Multijet
Multijet is a highly opinonated framework for building large microservice based monorepos in TypeScript.
The main advantage of Multijet is the ability to build and bundle all your microservices and their dependencies in a matter of seconds. Bundlers are often used in frontend development, but they are not as common in backend development. Multijet uses esbuild to bundle your microservices and their dependencies into a single file, including all dependencies.
Multijet relies heavily on npm workspaces and turborepo to manage a monorepo structure:
- Each microservice is a separate Node.js project usually based on the
Fastifyweb framework. - The packages included in the
libs/folder also are separate Node.js projects can be imported and used either by a Microservice or by another lib.
Thanks to turborepo and esbuild, multijet can build and bundle all your microservices and their dependencies in a matter of milliseconds
To get started, head to the official documentation (outdated for V2!)
Features
- Very fast builds
- OpenAPI-first design
- Modular and flexible
- Multiple deploy methods (AWS Lambda and Docker by default)
- Easily configurable
- Single file bundled microservices
- Native support for both Node.js and Bun
V2 Changes
V2.x is a major release of multijet. It is recommended to always use the latest version of Multijet to create new projects. However, if you have an existing project created with old v1.x, you can still use the old CLI by running:
npx multijet@1 <command>V2 offers a lot of new features and improvements, such as:
- Bun support (both as runtime or package manager)
- Completely new CLI
- Cleaned up structure and core
- Better tooling
- Aggressive linter and formatter
- Better local testing
Getting started
To get started with Multijet, you need to install the CLI globally:
# note: you can use both npm or bunnpm i -g multijet@latestThen you can create a new project by following the instructions:
mjet createProject structure
Multijet projects are structured as monorepos using npm workspaces.
The following are the default workspaces in a Multijet project:
libs/**: Shared libraries between microservices. Inside there are multiple npm packages.microservices/**: Business logic microservices. Each microservice is a separate npm package.
The project structure is as follows:
Directoryconfigs/ API specs and other configs
- openapi.yaml
Directoryesbuild/
- …
Directorydeploy/ Deployment scripts
Directoryaws/
- …
Directorydocker/
- …
Directorylibs/ Shared libraries between microservices
Directoryhttp/
- …
Directorymodels/
- …
Directoryapi-errors/
- …
Directoryutils/
- …
Directorymicroservices/ Business logic microservices
Directoryhello-service/
- …
- package.json
- turbo.json Turborepo configuration