/LightBnB

Primary LanguageJavaScript

LightBnB

LightBnB is a project I created during my time at Lighthouse Labs.

It is a clone of the vacation rental platform Airbnb where I gained experience using PostgreSQL and relational database systems to access and return property and user data.

Process and Outcomes

  • Create Entity Relationship Diagram based on given data requirements and relations.
  • Create tables (properties, users, reservations, property_reviews).
  • Insert table values using given seed files.
  • Write SELECT queries to run against database (eg. user login, properties by city, all reservations).
  • Implement Node Postgres (pg) to link server with database and show real data to users.

Users can add listings, search for listings based on different criteria (min/max price, city etc), create an account and stay logged in, view their reservations.

Dependencies

  • bcrypt: ^3.0.6
  • body-parser: ^1.19.0
  • cookie-session: ^1.3.3
  • express: ^4.17.1
  • nodemon": ^1.19.1
  • pg: ^8.8.0

Installation

Clone this project from github.

Install all dependencies with npm install.

Server runs at http://localhost:3000/

  • > cd LightBnb_Webapp-master
  • > npm run local

CREATE DATABASE in psql

  • > CREATE DATABASE lightbnb;
  • > \c lightbnb

CREATE TABLES

  • > \i migrations/01_schema.sql;

SEED DATABASE

  • > \i seeds/02_seeds.sql;

Screenshots

LightBnB Entity Relationship Diagram "LightBnB Entity Relationship Diagram" Homepage - user logged in "Homepage" Create a new listing "User creates a new listing" Query new listing in database "Searching for listing in database lightbnb" New listing exists in database "New listing data exists in database"