Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Book a Car api Backend #35

Merged
merged 191 commits into from
Feb 29, 2024
Merged

Book a Car api Backend #35

merged 191 commits into from
Feb 29, 2024

Conversation

Estete9
Copy link
Collaborator

@Estete9 Estete9 commented Feb 28, 2024

Project requirements

FRONTEND PR

NOTE
Please make sure of the following:

  • The file .env with the content REACT_APP_BASE_URL=http://localhost:4000 exists in the frontend's root directory

Basics

  • You should follow the layout of the provided design. You should change only the titles, descriptions, and photos - in order to create a website about something other than motorcycles.
  • Select a theme for your website - is it going to be a website for booking doctor appointments, booking online classes, or something else?

Features

Depending on your team size you are required to complete a set number of features. Take inventory of your team and see where you fit in the following table:

Team size # of required features
5 11

If your team has finished the required features, but you'd still like to complete more you are free to continue with the optional ones.

Note: If your team decides to implement optional features, make sure they work as expected (just like the required ones). This will be considered in your final evaluation!

Core features - Required for every team size
  1. The user logs in to the website, only by typing the username (a proper authenticated login is a requirement if your group is made of 5 people).

  2. In the navigation panel, the user can see links to:

    • Motorcycles/doctors/classes/items that you selected as a theme.
    • "Reserve" form.
    • "My reservations".
    • "Add motorcycle/doctor/class/item that you selected as a theme" (the link is visible to everybody).
    • "Delete motorcycle/doctor/class/item that you selected as a theme" (the link is visible to everybody).
  3. On the main page, the user can see a list of motorcycles/doctors/classes/items that you selected as a theme.

  4. When the user selects a specific item, they can see the details page with its full description (skip the "Rotate image" button).

    • In the details page, the user can click the "Reserve" button (in the design you can see the "Configure" button - please replace it with the "Reserve" button).
  5. When the user clicks the "Add item" link in the navigation panel they can see a form for adding a new item.

  6. Make the app responsive, creating both mobile and desktop versions.

Additional features - Required for teams with 3-4 & 5 members (optional for others)
  1. 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.
  • To reserve an appointment, the user has to select a date and city (username and selected item are autofilled).
    • Use the design based on the "Book a vespa test-ride" and add all necessary inputs.
    • The user can also access the "Reserve" page from the navigation panel. In that case only username is autofilled.
  1. 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).
  2. Add full documentation for your API.
Additional features - Required only for teams with 5 members (optional for others)
  1. Implement proper user authentication from the front-end to the server.
  2. Make sure that the "Add item" and "Delete item" links are accessible only by users who are admins.

Setup

In your terminal, navigate to the folder of your choice and clone the repository with the following commands:

git clone https://github.com/fmanimashaun/book-car-api.git

Install

After cloning the project, change into the project directory:

cd cd book-car-api

bundle install

Credentials setup

In order to create databases and run the tests, you need to follow this steps:

  1. Remove config/credentials.yml.enc if they exist.
  2. If you use Windows run: $env:EDITOR="code --wait"; rails credentials:edit If you use Linux run: EDITOR="code --wait" bin/rails credentials:edit
  3. Close the editor. New master.key, credentials.yml.enc files will be generated.

Database Setup

This application uses PostgreSQL as the database. Here are the steps to set it up:

  1. Ensure PostgreSQL is installed on your machine and running.

  2. Update the config/database.yml file with your PostgreSQL username and password in the default section.

  3. Create the database:

rails db:create
  1. Run migrations to set up the database schema:
rails db:migrate
  1. Load default date to database:
rails db:seed

This should start your local server on http://localhost:4000/ using rails s. Now, you can use the REST API client of your choice to interact with the API.

For guide on how to setup the database, refer to the video recording

For deployment on render, you need to add your AWS credentials to the setup, see Rails guides for assistance and additional video guide

Copy link

@Meltrust Meltrust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

Good job so far!
There are some issues that you still need to work on to prepare your project for the final evaluation, but you are almost there!

You are really close to finishing the Microverse program!! Keep it up! 👍👍👍

You can do it

After implementing the requested changes, please submit another review request. ♻️

Check the comments under the review.

Cheers and Happy coding!👏👏👏

Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the previous reviews unless it is requested otherwise.


README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link

@Meltrust Meltrust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

Good job so far!
There are some issues that you still need to work on to prepare your project for the final evaluation, but you are almost there!

You are really close to finishing the Microverse program!! Keep it up! 👍👍👍

You can do it

After implementing the requested changes, please submit another review request. ♻️

Check the comments under the review.

Cheers and Happy coding!👏👏👏

Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the previous reviews unless it is requested otherwise.


README.md Show resolved Hide resolved
Copy link

@Meltrust Meltrust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

Good job so far!
There are some issues that you still need to work on to prepare your project for the final evaluation, but you are almost there!

You are really close to finishing the Microverse program!! Keep it up! 👍👍👍

You can do it

After implementing the requested changes, please submit another review request. ♻️

Check the comments under the review.

Cheers and Happy coding!👏👏👏

Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the previous reviews unless it is requested otherwise.


db/seeds.rb Show resolved Hide resolved
@Estete9 Estete9 merged commit 72d4c51 into main Feb 29, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants