CloudBnB is an AirBnB clone, developed by six students at Makers Academy as a one-week engineering project. The program is developed in Ruby, using Sinatra, and tested with RSpec. Active Records was used to set the database.
Before running this program make sure you have Ruby installed on your machine by typing in your terminal:
ruby -v
Otherwise, you can install it by following the instructions reported on the Ruby website
Run the server by typing:
rackup
Better to do this in a separate terminal.
To set up the database on your local machine:
# make sure all dependencies are downloaded
bundle install
# create the databases on your machine
rake db:create
# create the tables from our migrations
rake db:migrate
rake db:migrate RACK_ENV="test"
# populate the tables with test data
rake db:seed
rake db:seed RACK_ENV="test"
Now if you check the tables in TablePlus you should see that the databases have been added (for both development and for test) and that the tables are now populated with dummy data.
To run the tests you will need to install rspec on your console:
gem install bundler
bundle add rspec
then you can run the tests by typing:
rspec
from the root directory of the project.
We started designing our program starting from some user stories:
Then we designed our database system:
From those, we started to build our MVP
Here are some screens of our final product:
- Style the space section of the bookings page
- Add approve/deny buttons to booking requests
- Add images to spaces
- Add the availability in a calendar format