Skip to content

samuelmanzanera/clean-node-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clean-node-api

NodeJS web api using the clean architecture with DDD

Architecture

The application follows the Uncle Bob "Clean Architecture" principles and project structure or Hexagonal or Onion architecture

The following can be used to structure microservices or to have clean startup for REST web api.

Project structure

|app.js => Entry of point of the application
|--core => Business layer
|----domain => Domain model objects such as Entities, Aggregates, Value Objects, Business Events, etc.
|----useCases => Application business rules 
|----exceptions => Application exceptions
|--adapters => Adapters and formatters for use cases and entities to external agency such as Database or the Web
|----controllers => Express controllers
|----middlewares => Express middlewares
|----repositories => Repository implementations
|----security => Security tools implementation (by example JsonWebToken)
|----serializers => Object converters
|--infrastructure
|----database => Database connection, ORM, Query builder, Schema
|----logger => Application looger
|----server => Express server definition

Licence

MIT

Releases

No releases published

Packages

No packages published