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
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.
- 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!
Below are the instructions on how to get the project running on your local machine!
- PHP 8.2+
- Composer
- Node.js & NPM
- SQLite
- (If on Windows) Laravel Herd
- Clone the repository
git clone https://github.com/semvde/RideRate.git riderate
cd riderate- Setup dependencies, environment, database and front-end assets
composer run setup- 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:
-
php artisan serve
- View the web-app by going to http://localhost:8000
-
Below you can find the documentation of Ride Rate!
Ride Rate uses the following technologies:
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
}
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.
RideControlleris 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).ExperienceControlleris 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).AdminControlleris responsible for getting the correct data from the database and sending it to the right admin management pages.
toggleVisibility()inRideControlleris responsible for toggling the public boolean of a ride to show or hide rides for non-admins.toggleVisibility()inExperienceControlleris responsible for toggling the public boolean of an experience.pageTitle()inapp/helpersis responsible for showing the correct title in the browser tab based on the current route name.
- 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 totrue(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'sboot()function in therides-creategate. You may also want to change the error message's inRideController'screate()andstore()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.
The source code in this repository is licensed under the MIT License.