<aside> ⚡ We use Inversify as our DI framework.

</aside>

The container.ts in the src folder will expose the inversify container to be used by the entire application for registering and resolving dependencies. (Refer to this for example)

Each module folder (including app) will have

  1. A folder called interfaces will house all the interfaces for that module. (Refer to this for example)
  2. A file called <module-name>.types.ts will have all the types declared required for dependency registration and declaration. (Refer to this for example)
  3. A file called <module-name>.bootstrapper.ts with a public method called initialize. The initialize method takes in an instance of the DI Container and binds the interfaces of that module folder to the container. (Refer to this for example)

The initialize method of the root file bootstrapper.ts passes the container to the initialize method of bootstrapper.ts of each project folder to add dependencies to it. (Refer to this for an example)