/Exo-cars-backend

API created with Ruby on Rails

Primary LanguageRuby

FINAL CAPSTONE (BACK END)

In this project, we created a website for renting exotic cars (exo-cars). It fetches data from an API that we also created and deployed on Heroku. It allows users to register with token validation, see the available cars and make reservations. Admins are allowed to add and remove cars from the database.

Front-end REPO

final-capstone-frontend

Built With

  • Ruby on Rails
  • devise
  • jwt
  • rspec-rails
  • rswag

Live Demo

API documentation

Getting Started

To get a local copy, follow these simple steps.

Prerequisites

Web browser installed

Setup

Cloning a repository

  • On GitHub.com, navigate to the main page of the repository;

  • Above the list of files, click "Code" button;

  • Copy the URL to clone the repository.

    • To clone the repository using HTTPS : https://github.com/ElsonOtake/Final_capstone_backend.git

    • To clone the repository using an SSH key, including a certificate issued by your organization's SSH certificate authority : git@github.com:ElsonOtake/Final_capstone_backen.git

    • To clone a repository using GitHub CLI : gh repo clone ElsonOtake/Final_capstone_backen

  • Open Terminal;

  • Change the current working directory to the location where you want the cloned directory;

  • Type git clone, and then paste the URL you copied earlier;

  • Change the current working directory to the location of your cloned directory;

  • Run bundle install;

  • Run bundle exec figaro install;

  • Add the following content to the config/application.yml filling in your Postgres username and password:

    DATABASE_HOST: localhost
    DATABASE_USER: your_username
    DATABASE_PASSWORD: your_password
    
  • Run rails db:create db:migrate db:seed

  • Run rails server;

Run tests

  • Open your terminal;

  • Go to application folder;

  • run rspec spec/requests for test the requests;

  • run rspec spec/models for test the models;

  • run rake rswag:specs:swaggerize to generate the API documentation.

Authors

👤 Antonio Hincapié

👤 Elson Otake

👤 Giuseppe Tomasini

👤 Gonzalo A. Medina

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgments

  • Microverse
  • W3Schools
  • Stack Overflow

This site is based on the design created by Murat Korkmaz on Behance, this design is under the Creative Commons license of the design.

📝 License

This project is MIT licensed.