jargon

Design patterns·Wiring: injection, containers and lifetimes

there is exactly one file that knows every concrete class, and it is the one that runs at startup.

Composition root

Also calledobject graph root, wiring root, main

The single place — as close to the entry point as possible — where the object graph is assembled and concrete types are chosen. Keeping it to one place is what makes the rest of the codebase free of construction logic, and it is the answer to 'if nobody news anything up, who does'. A codebase with several composition roots, or with one buried in a service, is one where nobody can say what actually runs.

Commonly confused with