Skip to content

Hotel Management Rest Service ( AWS Lambda ) made with TypeScript on CDK, DynamoDB, SNS, SQS, S3, EventBridge and AWS Gateway.

Notifications You must be signed in to change notification settings

andersonhsporto/hotel-serveless-rest

Repository files navigation

Hotel Management System

Description

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.

!! Working in progress

Technologies

System requirements

Installation

  1. Clone the repository
  2. Install dependencies
    npm install
  3. Build the project
    npm run build

Deployment

  1. Configure AWS CLI
    aws configure
  2. Deploy the project
    cdk deploy --all --require-approval never

Endpoints

Guests

  • 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

Rooms

  • 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

Json Example

Some endpoints like POST /guests and PUT /guests/{id} require a json body like this:

Guests

 {
  "id": "string",
  "guestName": "string",
  "guestEmail": "string",
  "guestMobile": "string",
  "guestBirthDate": "string",
  "guestAddress": "string",
  "code": "string"
  }

Rooms

{
  "roomType": "string",
  "isFull": "bool",
  "isCleaned": "bool",
  "description": "string"
}

The room type is a string that can be single, double, triple or couple.

TODO: Endpoints

RESERVATIONS

  • GET /reservations
  • GET /reservations/{id}
  • POST /reservations
  • PUT /reservations/{id}
  • DELETE /reservations/{id}

Useful commands

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk synth emits the synthesized CloudFormation template

Contact Information

If you have any questions, suggestions, or critiques, please contact me using email or through LinkedIn.

About

Hotel Management Rest Service ( AWS Lambda ) made with TypeScript on CDK, DynamoDB, SNS, SQS, S3, EventBridge and AWS Gateway.

Topics

Resources

Stars

Watchers

Forks