Skip to content

Instantly share code, notes, and snippets.

@jonatanpineda
Created April 10, 2020 09:58
Show Gist options
  • Save jonatanpineda/74a2762b54997ecb8c12e8e90f5e90ad to your computer and use it in GitHub Desktop.
Save jonatanpineda/74a2762b54997ecb8c12e8e90f5e90ad to your computer and use it in GitHub Desktop.
clean architecture
// Entities
domain:
-user
//Application contains the use cases represented as commands and queries??
application:
-ports:
-user_storage
-sms_sender
-email_sender
-queries:
-get_users_query
-get_user_query
-commands:
-create_user_command
-ban_user_command
-follow_user_command
//Adapters adapt the external(frameworks & dependencies) to the application and domain layer
adapters:
-controllers:
users_controller
-http:
-chain or adapt (improvising here...)
-mongodb:
users_mongodb_storage
-twilio:
twilio_sms_sender
-gmail:
gmail_email_sender
//Infraestructure frameworks and dependencies implementation
infraestructure:
-http-lib-or-framework:
//context middleware can be chained
-context
// utility middleware
-authenticator
-json_serializer
//domain http handling
-users_handler
//high level map of the routes
-routes
-grpc-lib-or:
-users_handler
-ws:
users_ws
not finished...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment