API service to book rooms/work-spaces using Ruby on Rails.
Check a live version here.
Check API documentation here.
Check front-end implementation of the project here.
- Ruby on Rails as REST API.
- Deployed on Heroku.
- Database PostgreSQL.
- Tests using rspec, factory-bot, shoulda-matchers, database-cleaner & faker.
Brief guide on how to install and run this project locally.
To download the project simply run:
git clone [email protected]:codingAngarita/bookMe.git
or
git clone https://github.com/codingAngarita/bookMe.git
Then move into the created directory cd bookMe
This projects uses ruby 2.7.0
you can install ruby using RVM or check the ruby language page.
To run this project locally you should provide the local PostgreSQL role
and password
you can check this guide for mor info.
Install PostgreSQL and it's required development libraries.
sudo apt install postgresql postgresql-contrib libpq-dev
The role
as it's called on Postgre it's basically your username, using this role rails will create and communicate with the Database.
sudo -u postgres createuser -s YOUR_DB_ROLE_NAME -P
sudo -u
Allows to run the createuser
command ussing the postgres
role thats automatically created upon installing.
The -s
flag will tell posrgres to create a user with super user privileges, and using the -P
flag you will be asked to enter a password for your new role.
This project uses dotenv to manage database role credentials
Create a .env
file on the root of the project.
# .env
BOOKME_DATABASE_USER=YOUR_DB_ROLE_NAME
BOOKME_DATABASE_PASSWORD=YOUR_DB_ROLE_PASSWORD
This env variables are used in config/database.yml
to securely connect to the local database
This project uses bundler 2.1.2
check if you have it installed using bundler --version
.
You can install the bundler gem using running:
gem install bundler -v 2.1.2
Run the command bundle
or bundle install
.
Once you are done following the previous steps you should run:
rails db:create
to create the local database.rake db:migrate
to run any pending migrations.
You can now start the server by running rails s
Check the ERD (Entity Relationship Design) here: