An app was made to book a car to test it before you buy it. The front end was made with react and redux, and the back end was made with rails. The whole page is connected by using API.
Our main features are:
Deployed with Heroku
To get a local copy up and running follow these simple example steps.
To get a local copy up and running follow these simple example steps.
git clone git@github.com:Emmanuelaaron/carBooking.git
cd carbooking
npm install
Then type on your terminal :
bundle install
With this, you will install all dependencies for React and Redux and also for rails. This project saves the pictures using the Cloudinary service. First, you need to go to the Cloudinary website and create and accounts, ist free. Then create a file and name it .env, there you need to type the following information on it:
CLOUD_NAME="cloud name"
CLOUD_API_KEY="paste cloud key here"
CLOUD_API_SECRET="paste the cloud API secret code here"
Without this file, the app will not work, because saves all the image files on Cloudinary and then gets the URL from them.
Now to run the server you need to run the rails server and the development server. To do that first type on the terminal:
rails s
Now on a new terminal type:
npm run dev
Now got to localhost You will see the login page first.
The backed is made with ruby on rails and this works as an API service alone. To use it you need to either create an account or log in using:
localhost:3000/api/v1/newuser
localhost:3000/api/v1/login
You only need to send a username using the body and the API will return the token, you need to save this token for you to use any of the other remaining features on the API server.
We also include a home API code on:
localhost:3000/api/v1/home
This will return all the cars added to the database.
To create new reservations you will use the API:
localhost:3000/api/v1/reservations/new
You are only required to send:
To get all the cars again and cities at the same time you can use the API:
localhost:3000/api/v1/carsNcities
To add new car use:
localhost:3000/api/v1/newcar
This requires:
bundle exec rspec
Number of team members: 3
👤 Emmanuel Isabirye
👨💻 *David Alvarez
👨💻 Jose Alberto Arriaga Ramos
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
This project is MIT licensed.