Giter VIP home page Giter VIP logo

jorgeluizetibr / car-rental-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from acushlakoncept/car-rental-api

0.0 1.0 0.0 155 KB

A RESTFUL API built with Ruby on Rails. It uses JWT to implement Authentication & Authorization. In this project, I built a full-stack application where users can access cars and it's featured amongst the least of cars available for hire. The project serves as my final capstone project at Microverse.

Home Page: https://cush-car.herokuapp.com/

Ruby 99.14% HTML 0.86%

car-rental-api's Introduction

CAR HIRE/RENTALS JSON API WITH RAILS 6

A RESTFUL API built with Ruby on Rails. It uses JWT to implement Authentication & Authorization. In this project, I built a fullstack application where users can access cars and it's featured amongst the least of cars available for hire. The project serves as my final capstone project at Microverse. The repo for the client app can be accessed here

Live Link

API Home Client App

Video Presentation

YouTube Link

Built With

  • Ruby v2.7.2
  • Ruby on Rails v6.0.3.2
  • RSpec-Rails for testing

Current API Endpoints

The API will expose the following RESTful endpoints.

BaseUrl: {Host-URL}/api/v1

Endpoint Functionality
POST /register Signup
POST /login Login
GET /users List all users
GET /cars List all cars
POST /cars Add a new car
DELETE /cars/:id Delete a car
PUT /cars/:id Update a car
DELETE /user/:id Delete a user
PUT /user/:id Update a user
POST /favourites Add favourite car
GET /favourites Get user favourite cars

API Documentation

Car Rentals API

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

Ruby: 2.6.5 Rails: 6.0.3.2 Postgres: >=9.5

Setup

$ git clone https://github.com/acushlakoncept/car-rental-api.git
$ cd car-rental-api

Install gems with:

bundle install

Setup database with:

make sure you have postgress sql installed and running on your system

   rails db:create
   rails db:migrate
   rails db:seed

Usage

Start server with:

    rails server -p 3001

Open http://localhost:3001/ in your browser.

Deploy to a live server

Deploying to a live server like Heroku is easy, make sure you have the necessary credentials setup on your local machine

heroku create
heroku rename app-new-name
git push heroku $BRANCH_NAME:master 

if you are already in master branch no need to add $BRANCH_NAME, just use git push heroku master

heroku run rails db:migrate
heroku run rails db:seed
heroku open

Enjoy your newly deployed rails API

Run tests

    rpsec 

Authors

๐Ÿ‘ค Uduak Essien

๐Ÿค 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!

Acknowledgement

Microverse Inc

car-rental-api's People

Contributors

acushlakoncept avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.