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 themdocker-compose.yamlfor 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
Dockerfilefor the dockerization of your application, - a
ormconfig.tsand aormconfig.prod.jsfor TypeORM CLI configuration in development and production respectively. - a
tsconfig.migrations.jsonfor 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.