Skip to content

semvde/RideRate

Repository files navigation

🎢 Ride Rate

Read and write comprehensive reviews about rides from theme parks all around the world with Ride Rate!

🌐 Check out the live version: NO VERSION AVAILABLE YET

Table of Contents
  1. About this project
  2. Functionality
  3. Getting started
    1. Requirements
    2. Installation
  4. How does it work?
    1. Technologies
    2. Entity Relationship Diagram
    3. Usage
  5. License

semvde

ℹ️ About this project

Ride Rate is a web-app that allows users to read and write experiences (reviews) about rides from theme parks all around the world!

This project was created for the final assignment of the course Programming 5 at Rotterdam University of Applied Sciences. The goal of the course was to build a web-app with the Laravel framework.

✨ Functionality

  • Browse the website and learn all the juicy details about rides from all around the world!
  • See experiences (reviews) that other users have written per ride!
  • Write your own experiences effortlessly!
  • Are we missing a ride in our database? Submit a new one for approval!

🚀 Getting started

Below are the instructions on how to get the project running on your local machine!

Requirements

  • PHP 8.2+
  • Composer
  • Node.js & NPM
  • SQLite
  • (If on Windows) Laravel Herd

Installation

  1. Clone the repository
git clone https://github.com/semvde/RideRate.git riderate
cd riderate
  1. Setup dependencies, environment, database and front-end assets
composer run setup
  1. Setup local test server
npm run dev
  • If you're using Windows:
    • Make sure the project is in the Laravel Herd sites directory and SSL is enabled for it
    • View the web-app by going to https://riderate.test
  • If you're not on Windows:

🛠️ How does it work?

Below you can find the documentation of Ride Rate!

Technologies

Ride Rate uses the following technologies:

  • Laravel
    • Blade
    • Laravel Breeze
  • Tailwind CSS
  • JavaScript

Entity Relationship Diagram

erDiagram
    users ||--o{ rides : "creates"
    users ||--o{ experiences : "writes"
    types ||--o{ rides : "categorizes"
    rides ||--o{ experiences : "has"
    users ||--o| password_reset_tokens : "has"
    users ||--o{ sessions : "has"

    users {
        id bigint PK
        string name
        string email UK
        timestamp email_verified_at
        string password
        string remember_token
        text image_url
        enum role "default: user"
        timestamps created_at
        timestamps updated_at
    }

    rides {
        id bigint PK
        string name
        bigint type_id FK
        text description
        text image_url
        boolean public
        bigint user_id FK "default: 1"
        string slug UK
        int stat_speed
        int stat_length
        int stat_height
        int stat_duration
        int stat_capacity
        timestamps created_at
        timestamps updated_at
    }

    types {
        id bigint PK
        string name
        timestamps created_at
        timestamps updated_at
    }

    experiences {
        id bigint PK
        bigint ride_id FK "cascade on delete"
        bigint user_id FK
        text text
        int rating_theme
        int rating_design
        int rating_ridexp
        int rating_guestxp
        int rating_creativity
        text image_urls
        boolean public
        timestamps created_at
        timestamps updated_at
    }

    password_reset_tokens {
        string email PK
        string token
        timestamp created_at
    }

    sessions {
        string id PK
        bigint user_id FK
        string ip_address
        text user_agent
        longtext payload
        int last_activity
    }
Loading

Usage

Ride Rate has a lot of classes, functions and other code! This chapter dives into the most important ones to understand how the codebase works.

Classes

  • RideController is responsible for showing an overview (with sorting and filtering options) on the /rides page and all logic related to managing rides (like creating, updating, deleting).
  • ExperienceController is responsible for showing an overview (with sorting and filtering options) on the /experiences page and all logic related to managing experiences (like creating, updating, deleting).
  • AdminController is responsible for getting the correct data from the database and sending it to the right admin management pages.

Functions

  • toggleVisibility() in RideController is responsible for toggling the public boolean of a ride to show or hide rides for non-admins.
  • toggleVisibility() in ExperienceController is responsible for toggling the public boolean of an experience.
  • pageTitle() in app/helpers is responsible for showing the correct title in the browser tab based on the current route name.

Nice to knows

  • When a new rides is requested to be added, the ride will always default to public false (0). This way an admin can review it before setting public to true (1) through the admin dashboard. Only admins can change the public boolean of a ride, unlike experiences where the writer can also change it's state.
  • A user is only able to request a missing ride to be added after they have written at least 3 experiences. This is to prevent bot/spam accounts from requesting to many rides. Admin users can add rides regardless of how many experiences they have written. If you want to change this requirement, you can do so in AppServiceProvider's boot() function in the rides-create gate. You may also want to change the error message's in RideController's create() and store() functions.
  • Users can't delete an experience once they have written it for a certain ride. Only admins can delete experiences. However, a user is able to set it's public state to false (0) if they wish that other users can't see it anymore. Experiences can also be edited if needed.

📜 License

The source code in this repository is licensed under the MIT License.

About

Read and write comprehensive reviews about rides from theme parks all around the world with Ride Rate! It was created for the final assignment of the course Programming 5 at Rotterdam University of Applied Sciences.

Topics

Resources

License

Stars

Watchers

Forks

Contributors