/castle

Sleep well 😴 with Relais & Châteaux

Primary LanguageJavaScript

Casstle

How it work ?

This website list all the "Hotel restaurants" from Relais Chateaux which have a Michelin stared restaurant. We can search by week-end an available Relais-Chateaux hotel , with the total price per person .

To do this first we have listed the list of Michelin starred restaurants and then have scrapped the Relais-Chateaux hotels. You will find two folders : -Scraping : inside there is the node.js script to scrape the Hotels. -Website : inside there is the website.

Steps:

  • run the michelin scrapper.
  • run the relais chateau scrapper.
  • place the generated json into the src folder of the website.
  • run the server of the website (with react.js)

Castle

Sleep well with Relais & Châteaux

castle

Table of Contents

🐣 Introduction

🎯 Objectives

List the best rates - for each Weekend - for France located Relais & Châteaux with starred restaurants

🏃‍♀️ Steps to do

Create a connection between relaischateaux.com, restaurant.michelin.fr and the end-user.

Stack

Node.js + React + Material Design (mdl, bootstrap, foundation...) + ES6 [+ docker + redis ...]

👩‍💻 Just tell me what to do

  1. Fork the project via github

fork

  1. Clone your forked repository project https://github.com/YOUR_USERNAME/castle
cd /path/to/workspace
❯ git clone git@github.com:YOUR_USERNAME/castle.git
  1. Do things

  2. commit your different modifications:

cd /path/to/workspace/castle
❯ git add -A && git commit -m "feat(michelin): get list of starred restaurants"

(why following a commit message convention?

  1. Don't forget to commit early, commit often and push often
❯ git push origin master

Note: if you catch an error about authentication, add your ssh to your github profile.

  1. If you need some helps on git commands, read git - the simple guide

🏃‍♀️ Example of Steps to do

Investigation

Properties from Relais & Châteaux

  1. How it works https://www.relaischateaux.com ?
  2. How to get the list of Hotel + restaurant
  3. How to identify the restaurant(s) name ?
  4. How to compute the booking price for all weekend ? for a given weekend?

etc ...

Some things to do:

  1. Browse the website
  2. Check how that you can get list of properties: api etc.... (check network activity)
  3. Check how that you can get list of restaurants for a given property: api etc.... (check network activity)
  4. define the JSON schema for Property

etc ...

Example of Property: https://www.relaischateaux.com/fr/france/mercues-lot-mercues

Michelin Restaurant

  1. How it works https://restaurant.michelin.fr
  2. What are the given properties for a starred restaurant: name, adress, town, stars, chef... ?
  3. ...

Some things to do:

  1. Browse the website
  2. define the JSON schema for a restaurant
  3. Check how that you can get list of starred restaurants: api etc.... (check network activity)

etc...

Example of Restaurant: https://restaurant.michelin.fr/2akhln2/lauberge-des-glazicks-plomodiern

The web application

Some things to do:

  1. How to create a connection between Relais & Châteaux and the starred restaurant?

Server-side with Node.js

require('castle')

Create a module called castle that returns the list of best rates for all Weekends for each Property

const castle = require('castle');
...
const property = {...};


const properties = castle.getProperties();
const prices = castle.getPrices(property);

...

Some things to do:

  1. create the calls (api, http) to get the Property page
  2. get the restaurants name (by scraping or decoding api response)
  3. check if the restaurant is starred.
  4. get the price by Weekend (by scraping or decoding api response)

require('michelin')

Create a module called michelin that return the list of restaurant

const michelin = require('michelin');

const starred = michelin.get();

...

Some things to do:

  1. scrape list of France located starred restaurants
  2. store the list into JSON file, nosql database (like redis, mongodb...)
  3. create a node module that returns the list

Client-side with React

MVP to do:

  1. For each Weekend, list best rates for France located Relais & Châteaux with starred restaurants

Next features:

  1. Add filters:
  • filtering by name
  • sorting by stars
  • sorting by price
  • sorting by distance
  1. Bonus: Display on a map only Relais & Châteaux with starred restaurants.

Notification (bonus)

Some things to do:

  1. Notify me (discord or slack) a new best rate price for any Relais & Châteaux with starred restaurant.

Don't forget

Focus on codebase and UX/UI

Licence

Uncopyrighted