Skip to content

This is the backend for the booking-app web application for motorcycle reservations: you have a list of motorcycles that a user can reserve for a certain period of time. The backend is a REST API that allows you to create, read, update and delete motorcycles. It also allows you to create, read, update and delete reservations. Built with Ruby / R…

Notifications You must be signed in to change notification settings

cwaku/booking-app-api

 
 

Repository files navigation

BOOKING-APP-API

This is the backend for the booking-app web application for motorcycle reservations: you have a list of motorcycles that a user can reserve for a certain period of time. The backend is a REST API that allows you to create, read, update and delete motorcycles. It also allows you to create, read, update and delete reservations. This API is made these models:

  • User model
  • Motorcycle model
  • Reservation model
  • My_Reservation Model

Deployment

Base URL

The API has the following endpoints:

allow user to authenticate and return a token

POST /api/v1/auth/login

allows user to create an account

POST /api/v1/users/register

Edit user informations

PUT /api/v1/users/:id

Delete user informations

DELETE /api/v1/users/:id

returns all motorcycles

GET /api/v2/motorcyles

allows user to create a motorcyles

POST /api/v2/motorcyles/new

returns a specific motorcyle

GET /api/v2/motorcyles/:id

allows user to edit a motorcyle

PUT /api/v2/motorcyles/:id

allows user to delete a motorcycle

DELETE /api/v2/motorcyles/:id

allows user to get all available motorcycles

GET /api/v2/available_motorcycles

allows user to create a new reservation

POST /api/v2/reservations/new

allows user to get all motorcycles reserved

GET /api/v2/my_reservations

allows user to get a specific reserved motorcycle

GET /api/v2/reserve_motorcycle/:id

allows user to update a reservation

PUT /api/v2/reservations/:id

allows user to cancel a reservation

DELETE /api/v2/reservations/:id

Built With

  • Rails
  • Ruby
  • Postgresql
  • JWT
  • ActiveRecord Serializer
  • ActiveRecord Image Uploader
  • Heroku

Getting Started

Here are the steps to follow in order to get this project on your local computer.

Prerequisites

rails v7.0.2 +

ruby v3.0.2 +

Setup

clone this repo by typing git clone https://github.com/vic778/booking-app-api.git

Install

install the dependencies by typing bundle install

Usage

start the local server by running rails s

Testing

run the tests by typing bundle exec rspec

Documentation

Author

👤 Victor Barh

👤 Ricky Mormor

🤝 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

  • Hat tip to anyone whose code was used !

📝 License

This project is MIT licensed.

About

This is the backend for the booking-app web application for motorcycle reservations: you have a list of motorcycles that a user can reserve for a certain period of time. The backend is a REST API that allows you to create, read, update and delete motorcycles. It also allows you to create, read, update and delete reservations. Built with Ruby / R…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 99.5%
  • HTML 0.5%