Giter Site home page Giter Site logo

mattseligman / lightbnb Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.52 MB

LightBnB is an app that revolutionizes the travel industry. It allows home owners to rent out their homes to people on vacation, creating an alternative to hotels and B&Bs.

HTML 0.72% JavaScript 98.52% SCSS 0.76%

lightbnb's Introduction

LightBnB

LightBnB is an app that revolutionizes the travel industry. It allows home owners to rent out their homes to people on vacation, creating an alternative to hotels and B&Bs.

It's time to start working on the LightBnB app. Before we start doing anything technical, we're going to design the database. This is a multi billion dollar idea, so we want to get the database right, the first time.

ERD Requirements

Create an Entity Relationship Design for our LightBnB app with the following specifications:

  • The app will have users, properties, reservations, and property reviews.

  • A user will have a name, email address, and password.

  • A property will have a title, description, cost_per_night, parking\_spaces, number_of_bathrooms, and number_of_bedrooms.

  • A property will need to have images associated with it, so for now we will store a url for a small thumbnail photo and a large cover photo.

  • A property will need address data associated with it including country, street, city, province, post_code

  • A property can either be active or not active depending on weather the owner is currently renting it out or not.

  • A property will have an owner which will be one of the registered users.

  • A reservation will have a start date and an end date

  • A reservation will be made by a guest, which will be a registered user, and will be associated with a single property

  • A property review will have a message and a rating from 1 to 5

  • A property review can be made by a guest and will be associated with a single reservation

  • A user can own many properties

  • A property belongs to one owner

  • A user can make many reservation

  • A reservation belongs to one guest

  • A property can be reviewed by many guests

Entity Relationship Design

ERD

WebApp File Structure

  • public contains all of the HTML, CSS, and client side JavaScript.
  • sass contains all of the sass files.
  • server contains all of the server side code.
    • server.js is the entry point to the application. This connects the routes to the database.
    • apiRoutes.js and userRoutes.js are responsible for any HTTP requests to /users/something or /api/something.
    • json is a directory that contains a bunch of dummy data in .json files.
    • database.js is responsible for all queries to the database. It doesn't currently connect to any database, all it does is return data from .json files.

lightbnb's People

Contributors

mattseligman 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.