- After the end of a typical ride at Oye! Rickshaw the passenger is presented with the option to rate a ride.As a part of this exercise we would like you to design and implement the backend of a rating service.The solution should support
- 1.The passenger should be able to rate a given ride.
- 2.The driver should be able to see aggregated rating of his all rides
- 3.The driver should be able to rate the passenger after ride
- 4.The passenger should be able to see his aggregated rating based on all the rides he hastaken.
- All Assumptions
- Approach to solution
- DB Schema or Setup Scripts
- Steps to run your application
- UserId and riderId provided
- works only for the last ride rating not for ride's history rating
- We use Model-View-Controller (MVC) framework is an architectural pattern that separates an application into three main logical components Model, View, and Controller.
- firstly i design the schema for both the table.
- stepup the server
- create router and update endpoint
- setup moongoose config.
- create controller for action
- create views for basic frontend part.
- setup template.
- finally we've our MVP(prototype).
- User Table
-
- userId (unique)
-
- todtalsum
-
- ridecount
-
- average
-
- Timestamp
- Rider Table
-
- riderId (unique)
-
- todtalsum
-
- ridecount
-
- average
-
- Timestamp
In the project directory (root), you can run:
Installs all the dependencies npm modules.
Runs the app in the development mode.
Open http://localhost:8000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.