Rest service for hotel management system, made with AWS CDK and AWS Lambda using typescript and node.js. this project is heavily inspired in the example developed during the course AWS Serverless com NodeJS e AWS CDK.
- Typescript
- Node.js
- AWS CDK
- AWS Lambda
- AWS API Gateway
- AWS DynamoDB
- AWS S3
- AWS CloudWatch
- AWS IAM
- AWS Secrets Manager
- AWS Cognito
- AWS SNS
- Clone the repository
- Install dependencies
npm install
- Build the project
npm run build
- Configure AWS CLI
aws configure
- Deploy the project
cdk deploy --all --require-approval never
- GET /guests - List all guests
- GET /guests/{id} - Get guest by id
- POST /guests - Create new guest
- PUT /guests/{id} - Update guest by id
- DELETE /guests/{id} - Delete guest by id
- GET /rooms - List all rooms
- GET /rooms/{id} - Get room by id
- POST /rooms - Create new room
- PUT /rooms/{id} - Update room by id
- DELETE /rooms/{id} - Delete room by id
Some endpoints like POST /guests and PUT /guests/{id} require a json body like this:
{
"id": "string",
"guestName": "string",
"guestEmail": "string",
"guestMobile": "string",
"guestBirthDate": "string",
"guestAddress": "string",
"code": "string"
}
{
"roomType": "string",
"isFull": "bool",
"isCleaned": "bool",
"description": "string"
}
The room type is a string that can be single, double, triple or couple.
- GET /reservations
- GET /reservations/{id}
- POST /reservations
- PUT /reservations/{id}
- DELETE /reservations/{id}
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testscdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template
If you have any questions, suggestions, or critiques, please contact me using email or through LinkedIn.