EXPERIMENTAL vNext Typescript Bounded Context Mono Repository Template
This repository has two main purposes
- As a template for bounded context mono repos
- As example code for the implementation of applications. It shows how to use common cross-cutting concerns' clients, like logging, auditing, platform-config and security.
- Start by creating a new repository in GitHub using this template
- Make sure package directory names conform to the standard and end with "lib", "svc" or "tool"()
Unsorted hints:
- For packages that don't require publishing to NPM, make sure you have the
"private": true
line in package.json. By contrast, for all modules that require NPM publishing make sure it is set to false.
npm -w packages/package-dir-name install npm_dependency_name
For development dependencies add the --dev
at the end, like so:
npm -w packages/package-dir-name install npm_dependency_name --save-dev
Notes:
- Replace
package-dir-name
with the correct module name, it corresponds to the directory name - Replace
npm_dependency_name
with the correct dependency name - Common devDependencies, such as linters or test frameworks, should be installed/dependend in the main
package.json
to avoid repeating them in each of the monorepo's modules
TBD finish this
This service exemplifies how to create a bounded context service that can be deployed. The objective is to show how to use the most important vNext platform foundational services.
To make sure the service is docker image is build and published to DockerHub by the CI/CD pipeline, change the value of the " publish_to_dockerhub" to true.
"private": true,
"mojaloop": {
"publish_to_dockerhub": true
},
Please see the details of the example service within its README file.
More information on how to install NVM: https://github.com/nvm-sh/nvm
# (In the repository root directory - one having the .nvmrc file)
nvm install
nvm use
All commands below assume you're positioned at the root of the monorepo.
npm install
npm run build
npm run start
npm run test:unit
npm run test:integration
Execute locally the pre-commit checks - these will be executed with every commit and in the default CI/CD pipeline
Make sure these pass before committing any code
npm run pre_commit_check