Nest boilerplate which apply the hexagonal & clean architecture
$ npx create-nestjs-hexagonal <project>
$ npm install
# development mode
$ npm run start:dev
# production mode
$ npm run start:prod
The Global Folder contains global properties like, global used interface, error type, external module configuration and etc..
abstract folder include interface of factory / mapper / model / use-case and etc you can add interface file which used global
config folder include setting file to connection other server like DB, MQ, GRPC
It also include the constant folder which used globally
error folder include custom error settings
Lib folder contain the external module custom library which can use the adapter files.
We Declare the functional folder is set of implemented the backend function which seperated by DDD rules
you can change user folder to other name or add new folder, like product, order. It's only example of this template. I recommend to make folder follow the DDD rule
The User folder construct adaptor, core, port folder
port(hexagonal architecture) folder include the port file that expressed interface file
adapter is implemented by port interface file. It contains controller, repository and etc
Core is about the core logic of the domain. It contains application , domain, type folder
The application folder include business logic implement which contain the use-case, factory, mapper files.
The domain folder include core model logic files
Type folder include the Core of type like model properties type, etd