Structure

Repository

The project is developed as a NestJS mono-repo containing functionality-specific libraries, apps and customisations (using the aformentioned libraries).

Besides the various configuration files, the important directories are: libs/ and apps/. In the libs/ directory you will find a directory for each library, while in the apps/ you will find a develop/ for demonstrating all the functionality of the project, and (in the future) additional applications built using the re-usable libraries.

For more information on how to work with the mono-repo (generate an application or a library), check the NestJS documentation.

New Application Structure

For the internal CLI to work, you need to add few additional directories to the ones generated by the NestJS CLI:

  • keys/ to keep application/service key pairs,
  • scripts/ to add them docker-compose.yaml for starting/stopping the required services,
  • seeds/ to store any seeds required for pre-populating the database

Optionally, based on your needs, you might create in the application root directory:

  • a Dockerfile for the dockerization of your application,
  • a ormconfig.ts and a ormconfig.prod.js for TypeORM CLI configuration in development and production respectively.
  • a tsconfig.migrations.json for instructions on how to build migration files, as they shouldn't be bundled using Webpack.

You can use the respective files in the develop application as a guideline.