Skip to content

ravensears/Week-5-Makers-BnB-Challenge

Repository files navigation

USER STORIES

Any signed-up user can list a new space.

As a user,
So that I can list spaces,
I would like to register. 

Users can list multiple spaces.

As a host,
So that I can rent multiple spaces,
I want to list mulptiple spaces at the same time.

Users should be able to name their space, provide a short description of the space, and a price per night.

As a host,
So that guests can read my space details,
I want to give my space a name, description and price.

Users should be able to offer a range of dates where their space is available.

As a host,
So that guests can see when my space is available,
I want to list the dates when my space is available.

Any signed-up user can request to hire any space for one night, and this should be approved by the user that owns that space.

As a guest,
So that I can rent a space for a night,
I want to send a booking request to the host.

As a host
So that I can approve a request,
I want to see who requests to hire my space.

Nights for which a space has already been booked should not be available for users to book that space.

As a host, 
So that my space isn't double booked,
I expect only available dates to be shown for spaces. 

Until a user has confirmed a booking request, that space can still be booked for that night.

As a host,
So that I can manage my bookings,
I need my spaces to be available until I confirm booking requests.

INSTRUCTIONS

Install gems

Run the following:

bundle install

Setup Database

To create databases for production and test enviroments, run the following on psql:

CREATE DATABASE cherbnb;
CREATE DATABASE cherbnb_test;

Connect to each database and create the following tables:

CREATE TABLE users(
  id SERIAL PRIMARY KEY, 
  email VARCHAR(60), 
  password VARCHAR(60), 
  name VARCHAR(60), 
  username VARCHAR(20)
  );

CREATE TABLE spaces(
  id SERIAL PRIMARY KEY, 
  description VARCHAR(280), 
  name VARCHAR(60), 
  price VARCHAR(60)
  );

Screenshot 2022-01-17 at 12 08 41

Screenshot 2022-01-17 at 12 08 28

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •