Git Product home page Git Product logo

hotel-aggregator's Introduction

Hotel Aggregator

This application works as an aggregator of hotels from different data sources.

Documentation for my work process is here.

The application is deployed on Heroku

Stack

Ruby: 3.3.1 Web server: Sinatra

Build the app

bundle install

Note: If you run into an error in Mac when installing thin, try running the line below before running `bundle install' again.

bundle config build.thin --with-cflags="-Wno-error=implicit-function-declaration"

Run the server

bundle exec thin start

App is available at http://localhost:3000

Querying the server

The hotels endpoint is available via /hotels.

When no parameter is given, the list of all hotels will be returned.

Filtering parameters can be specified via query parameters e.g:

  • /hotels?id=:hotel_id: returns a single (or no) hotel with the specified id
  • /hotels?destination_id=:destination_id: returns a list of hotels in the destination
  • /hotels?id=:hotel_id&destination_id=:destination_id: returns 400 error as server will only process at most 1 of these parameters.

Miscellaneous

Deployment

The application is deployed on Heroku

CI/CD pipeline

Pipeline is built using Github Actions to facilitate the following:

  • Code quality via rubocop (barebones)
  • Running tests
  • Deploying to Heroku

Performance considerations

I did not implement further performance improvements. However, search for "NOTES: performance" to see my notes around this.

hotel-aggregator's People

Contributors

kjcpaas avatar

Watchers

 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.