GithubHelp home page GithubHelp logo

yunyunliu / booking Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bedroost/booking

0.0 0.0 0.0 1.46 MB

Booking microservice for a home sharing platform that displays a calendar, prices per night and total number of reviews in an accessible and mobile-friendly UI. Users can select available dates and number of guests to check-in.

JavaScript 79.53% HTML 0.38% CSS 19.68% TSQL 0.19% Dockerfile 0.22%

booking's Introduction

Bedroost

Calendar booking module for a home sharing app built in service-oriented architecture.

bedroost png

Table of Contents

  1. Tech Stack
  2. Demo
  3. Usage
  4. Requirements
  5. RESTful API routes
  6. Related Projects

Tech Stack

Front-end: JavaScript, React, Redux, Webpack
Back-end: Node.js, Express
Database: MySQL
Testing: Jest, Enzyme, CirceCI

Demo

bedroost gif

Usage

# clone this repository
$ git clone https://github.com/bedroost/booking.git

# install dependencies
$ npm install

# seed mysql database
$ mysql -uroot < server/db/schema.sql
$ npm run seed

# bundle files with webpack
$ npm run build

# run the app!
$ npm start

Requirements

  • Nvm
  • Node
  • Git

RESTful API routes

GET Rooms and Booking Information

Endpoint: /api/rooms/:listingid

Success Response:

  • An array of objects containing basic room and booking information with param listingid
  • Response Code: 200
  • Expected Content:
{
  listingInfo:
  {
    baseGuests: 2
    basePrice: 327
    cleaningFee: 285
    createdAt: "2019-09-01T03:20:27.000Z"
    extraGuests: 0
    guestFee: 173
    id: 1
    lastAvailableDate: "2020-04-13"
    maxGuests: 2
    maxNights: 108
    minNights: 1
    reviews: 450
    serviceFee: 39
    taxes: 26
    updatedAt: "2019-09-01T03:20:27.000Z"
    views: 746
  },
  bookedDates: {
    0: {
      id: 1, bookedDate: "2019-11-03", createdAt: 
      "2019-09-01T03:20:27.000Z", updatedAt: 
      "2019-09-01T03:20:27.000Z", listingId: 1
    },
    1: {
      id: 2, bookedDate: "2019-07-02", createdAt: 
      "2019-09-01T03:20:27.000Z", updatedAt: 
      "2019-09-01T03:20:27.000Z", listingId: 1
    },
    2: {
      id: 3, bookedDate: "2019-12-23", createdAt: 
      "2019-09-01T03:20:27.000Z", updatedAt: 
      "2019-09-01T03:20:27.000Z", listingId: 1
    },
    3: {
      id: 4, bookedDate: "2019-06-04", createdAt: 
      "2019-09-01T03:20:27.000Z", updatedAt: 
      "2019-09-01T03:20:27.000Z", listingId: 1
    }
  }
}

Error Response:

  • Response Code: 404

Related Projects

booking's People

Contributors

esme avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.