Hexagonal Architecture is to design the application in layers, with the core business logic at the center and the external interfaces and technologies forming a "hexagonal" shape around it. The core business logic is encapsulated in the center of the hexagon, while the external interfaces and technologies are represented by the "ports" and "adapters" on the hexagon's perimeter.
This is more of a prof of concept or template rather than fully working application. To deploy it properly you'd need to:
- create an IAM role with permission to access CloudFormation, Lambda, API Gateway, and DynamoDB
- create a DynamoDB table using the AWS Console or AWS CLI
- update template.yaml with required credentials and resource locations
- package AWS SAM application with
sam package
- deploy AWS SAM application with
sam deploy
npm install
- install Docker
- install AWS SAM CLI
- compile TypeScript
npm run build
- build AWS SAM application
sam build
- install packages for compiled JS
cd dist
npm i
cd ..
- run AWS SAM application locally
sam local start-api
npm run test
npm run coverage
- POST
/
- adds new user - GET
/{id}
- get one user by id - DELETE
/{id}
- remove user by id - PUT
/{id}
- update user by id
- address comments in the code
- consider using dependency injection
- add proper tracing
- add a pipeline
- add AWS policies and roles