/Capstone-Back-End

Vacay InnVacay Inn Fullstack capstone project. The app is a room reservation website that allows users to sign up and log in to see detailed information about rooms and create reservations for rooms. The data is stored on a back-end server built with Ruby on Rails and displayed on the front end which is built with React.

Primary LanguageRubyMIT LicenseMIT

Capstone-Back-End

Getting Started

This project was built using Ruby on Rails. It is the backend of a booking app that allows users to register and log in, and create reservations for specific rooms. It also allows users to see the reservations they have made and the rooms they have booked.

πŸ“— Table of Contents

πŸ“– Capstone-Back-End

The Capstone-Back-End project sends data to the front-end through the use of api-endpoints. These endpoints are mostly private so the users can only read and manipulate the data if they are autheticated and authorized to do so. The project was built using Ruby on Rails and deployed on Render.

πŸ›  Built With

Tech Stack

Server
Franwork

Key Features

Key features of the repository.

  • Was created with RoR
  • Has a login and registration authentication system with the help of devise
  • Has a database that stores the records of it's rooms, branches, users and reservations
  • Users have roles and only admins can manipulate the rooms and braches
  • Has a private api endpoint that allows users to see their reservations and rooms
  • Has Rubocop to enforce best ruby practices

(back to top)

πŸ’» Getting Started

Follow these steps in order to run ruby code.

Prerequisites

First you need to ensure that you have ruby installed in your computer.

Install

It varies depending on your operating system so here are some links to help you install it on Windows and on Ubuntu.

For MacOS run the following commands

  brew install rbenv ruby-build
  # Add rbenv to bash so that it loads every time you open a terminal
  echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
  source ~/.bash_profile

  # Install Ruby
  rbenv install 3.0.1
  rbenv global 3.0.1
  ruby -v

This example shows how to install Ruby 3.0.1 which was the latest version in April 2021, but you can check to see if there is a newer version here. Iy is also assumed that you have homebrew already installed on your Mac.

Next you'll want to intall Rails and postgreSQL by running the following commands, but you can also use any SQL application of your choice

  gem install rails -v 7.0.6

  sudo apt install postgresql libpq-dev

And start postgreSQL and the app with

  sudo service postgresql start

  rails server

Setup

Once you have ruby installed, run this command to get the project on your local machine.

  git clone git@github.com:hernandanielzamora/Capstone-Back-End.git

Usage

Once you have the project installed, access the project's root directory usign this command

  cd Capstone-Back-End

Before running your application you'll want to create a master key. To do so you'll need to remove config/master.key and config/credentials.yml.enc if they exist. Then in your terminal run:

  EDITOR="code --wait" rails credentials:edit 

Close the editor that opens. This command will create a new master.key and credentials.yml.enc if they do not exist. Lastly, run this command to see the project in in your browser.

  rails server

(back to top)

πŸ‘₯ Authors

Here is a mention all of the collaborators of this project.

πŸ‘€ Author 1

πŸ‘€ Author 2

πŸ‘€ Author 3

πŸ‘€ Author 4

(back to top)

πŸ”­ Future Features

The following are the future features that will be added to the project.

  • Add further security measures, such as email confirmation
  • Change the deployment site
  • It will probably not take over the world

(back to top)

🀝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

⭐️ Show your support

If you like this project you can give me a hand by recommending me to potential employers! πŸ˜‰πŸ€

(back to top)

πŸ™ Acknowledgments

We would like to thank those who have motivated us to keep on fighting despite how tough the journey may become.

(back to top)

πŸ“ License

This project is MIT licensed.

(back to top)