Code Monkey home page Code Monkey logo

gedewon / carbooking-backend Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 175 KB

Rails backend Book car is a platform to book a car that is present in different cities for a given period of time. The user selects the duration of rental per car model type and price range. if a user is an admin he can manage the car resources by updating the list of cars in the database.

Home Page: https://carbackend.onrender.com/api-docs

License: MIT License

Ruby 99.10% HTML 0.37% Shell 0.53%
ror postgres ruby swagger-documentation

carbooking-backend's Introduction

default-monochrome default

Book car is a platform to book a car that is present in different cities for a given period of time. The user selects the duration of rental per car model type and price range. if a user is an admin he can manage the car resources by updating the list of cars in the database.

Frontend Repository

GitHub Link

screencapture-localhost-3000-api-docs-index-html-2022-11-29-01_53_41

Built With

  • Ruby on Rails
  • Development set up
  • Rails API only
  • API Swagger documentation
  • JWT & bcrypt

Setup

  • Open your terminal and navigate to the folder you would like to save the project.type the following commands to your terminal
git clone [email protected]:Gedewon/CarBooking-Backend.git
  • Move into project directory
cd CarBooking-Backend

Available Scripts

bundle install && rails db:create db:migrate db:seed 

Then bootup your database by running the following command

rails server

Testing

rake rswag

Authors

๐Ÿ‘ค Gedewon Haile

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

๐Ÿ“ License

This project is MIT licensed.

carbooking-backend's People

Contributors

gedewon avatar kiboma2021 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

carbooking-backend's Issues

[2pts] Create User Model

  • The user logs in to the website, only by typing the username (a properly authenticated login is a requirement if your group is made of 5 people).

User Table Column Filed

  • username
  • password
  • role

[2pts] Create Reservations Model

  • To reserve an appointment, the user has to select a date and city (username and selected item are autofilled).

Reservation
- userId
- carId
- startDate
- EndDate
- City

[3pts] Database Mode

The Database Model has three tables.

  1. User
    • username
    • password
    • role
  2. Car
    • name
    • image
    • AmountperDay
  3. Reservation
    • userId
    • carId
    • startDate
    • EndDate
    • City

[1pts] Crate CORS configuration

Configure Cross-Origin Resource Sharing (CORS) mechanism that allows a server to be able to share resources with the react front-end origin

[4pts] Reservation List Page

When the user clicks the "My reservations" link in the navigation panel they can see a list of their reservations (with information about item name, date and city).

[1pts] Delete Reservation Action

When the user clicks the "Delete item" link in the navigation panel they can see a list of all items with title and "Delete" button.
When the user clicks the "Delete" button, the selected item is marked as removed and does not show on the main list anymore.

[4pts] reserve an appointment Page

To reserve an appointment, the user has to select a date and city (username and selected item are auto-filled).

The user can also access the "Reserve" page from the navigation panel. In that case only username is autofilled.

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.