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.
- 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.
- 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
Clone this project from github.
- > git clone git@github.com:chchchelsay/LightBnB.git
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;
LightBnB Entity Relationship Diagram Homepage - user logged in Create a new listing Query new listing in database New listing exists in database