Code base uses npm's workspaces functionality. Two folders contains workspaces :
Root space propose common tools:
- Typescript tooling
- Rollup build recipe
- Jest tests config
Every sub projects will compile with typescript, run jest tests and bundle their index.ts into a unique bundle.
In this folder, we'll put all standalone projects : frontend apps and backend microservices. Each should be independant, built separately, and quickly hosted.
Packages are utilities or libraries aimed to be imported everywhere as NPM package. It may be a backend SDK or tool, typings, or frontend components.
Packages are all built by Rollup, given the root
rollup.config.js file or a custom
rollup.config.js provided by the package project.
Services uses their own build process as declared in their package.json. For example, console service is built using Nextjs while backend services are built by typescript (with a custom
For Docker-based production deployments, all services also provide a
Run test with :
Every file name
*.test.t|jsx? is run with Jest. Read Jest documentation to find
how to run only a few tests.
Tests must be as fast as possible. Each file should not take more than 200ms to run.
Each packages and services follow their own minor versions but a major version will be applied on every subprojects.