Framework: Angular v9.1.0
Built following of Clean Architecture principles and domain-driven design
- Fairly clear layer boundaries and direction: infrastructure -> domain -> application -> presentation
- More independent of the framework
- More testable
- Dependency Inversion Principle to ensure the three previous points
- Behavior-oriented services (use cases)
- domain: entities (interfaces), repositories ports (abstract)
- application: use cases and other business services
- presentation: angular components and BLoc (state management services)
- infrastructure: reposiries adapters (concrete implementation).
- /src/app
-
app/app.module:
- layer: presentation / infrastructure
- contains: component, router
- description: here is app router that follows lazy loading practices and root component
-
/core:
- layers: domain / application / infrastructure
- contains: entities, use cases, repos (ports & adapters)
- description: aka bounded contexts, containing core modules (covering an aspect / point of view of the business) and shared artifacts that don't know angular, provides some services called use cases (business-oriented services) for the presentation layer
-
/features:
- layer: presentation
- contains: features components and state managment (folow BLoC's pattern)
- follow Angular's features modules pattern, use lazy loading, each module depends on one or more core modules
-
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Luciano Rodriguez