This is a single page web application that can used as a feedback system for any group/organisation. All the user actions are performed via the REST API at the client side using AJAX.
- Students and Professors are able to create an account and log in. Password authentication is done through passport npm module.
- 3 roles are implemented with different administrative rights
- Regular Student: Can rate and leave a comment for a course
- Teacher/Professor: Can create his own courses and reply comments about owned courses
- Admin: Can edit/delete all users, courses, comments, and reviews
- Reviews have:
- A 5 star based rate
- Date on which the review was made
- Comment
- When a Student logs in he will see the course list ordered by rate average
- When an Teacher/Professor logs in he will see a course list of only the ones owned by him, and the reviews pending to reply (Teachers/Professors can reply the review once).
- Courses detailed view should have:
- The overall average rating
- The highest rated review
- The lowest rated review
- Last reviews with rate, comment, and reply
- Course list can be filtered by Rating
- Regex Search for all the courses available. Available to all the students, Teacher/Professsors and Admin.
- All the APIs are RESTful in nature.
- Each access to API is protected by several middleware layer that if the client should be made access to the resource.
- Each input by the user is protected from common Security vulnerabilities.
- Each input is sanitized both at the client side and server side to provide required level of protection from XSS, Cross-site scripting etc.
The Following APIs can be called for registrations and login purposes. No Authentication is required to call these APIs.
POST /user/register
POST /user/login
The Following APIs can only be called once the user is authenticated. The APIS are secured through a channel of middlewares which check for all the requirements that must be satisfied before one can access the resource of the API.
GET /
GET /userInfo
GET /outlet
GET /outlet/outletId/:outletId
GET /outlet/to_reply/:outletId
GET /outlet/:userId
GET /outlet/reviews/:outletId
GET /users/
GET /outlet/regex/:pattern
GET /outlet/regex/user/:pattern
POST /outlet/
PUT /outlet/review/:outletId
PUT /outlet/reply/:outletId/:reviewId
PUT /users/change/:priority/:userId
DELETE /outlet/:outletId
DELETE /outlet/review/:outletId/:reviewId
DELETE /users/:userId
GET /user/logout
To set up the development environment, you need to follow the following steps
- Download npm and nodeJs. Installation guide can be found here
- Download and install MongoDB on your system.
To run the project on local server, first navigate to the project directory in your filesystem.
- Now create a directory
/data/db
in the location where your project folder resides. - Now run
mongod --dbpath=./data/db
from the current directory. - Now run
cd reviewsys
, or go inside the project folder. - Now run
nodemon start
in the terminal. - Open
localhost:3000
from your favourite browser.