muneeb21 / microservice-web-applicaion

A Web-Application which involves four MicroServices that will interact with each other and will provide a basic calendar booking functionality.

Repository from Github https://github.communeeb21/microservice-web-applicaionRepository from Github https://github.communeeb21/microservice-web-applicaion

Calendar Booking Microservices

A Web-Application which involves four MicroServices that will interact with each other and will provide a basic calendar booking functionality.

Tech Stack:- Nodejs, Express, MongoDb, Javascript

Setup all the microservices using npm init

Microservices

Identity Service
Command Service
Calendar Service
Kyc Service

Schemas(model)

  • User:- This schema stores information about an individual user.
    Location: Identity Service/models/user.js
    Entries: name, surname, email
  • Booking:- This schema stores information about a booking.
    Location: Calendar Service/models/booking.js
    Entries: name1, name2, date, timeinHrs, timeinMins (timing of slot)

Routes

/register
/check
/newbooking
/listing

Dependencies used

  • Express
  • Mongoose
  • Axios (To make an http request within a service, so as to interact with other microservice)
  • Mongo-connect

Dependencies used for testing

  • Mocha
  • Chai
  • Chai-http

Functionalities

  • Command Service handles the commands for other services

  • Register funtion is used to register a new user.
    If the surname doesnot start with "A" it wont proceed further.
    It would find the user with provided unique email.
    If user is already present then a new user wont be created.

  • Check function checks whether the two users entered are registered or not.

  • Newbooking function is used to enter the booking details.
    First the availability of time slot on particular day will be checked
    Then the booking would be made.

  • Listing function is for listing all the users.

About

A Web-Application which involves four MicroServices that will interact with each other and will provide a basic calendar booking functionality.


Languages

Language:JavaScript 100.0%