Co-Re MERN Work In Progress
January 2021
Course-Review is a MongoDB-Express-React-Node (MERN1) web application that aims to serve as a platform for college students to post structured yet personal reviews of courses they’ve taken, and view reviews posted by other students.
Functionality
Login & Registration :
- Able to register and login via email, cached in
localStorage
as JSON web tokens using Redux authentication
Search :
- Integrated with Algolia’s InstantSearch API
Markdown Support :
- Recognizes and displays markdown-formatted text supplied as form input
To Do
Login & Registration :
- Email validation
- Social media registration and login
User Interface / User Experience :
- Improve look and feel of website
- Include alert text notifying users of markdown support
Bugs :
- Several bugs relating to asynchronous API requests logic
Code
Course Review Schema:
const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const coursereviewSchema = new Schema(
{
university: { type: String, required: true },
subject: { type: String, required: true },
code: { type: String, required: true },
name: { type: String, required: true },
semester: { type: String, required: true },
professor: { type: String, required: true },
rating: { type: Number, required: true },
author: { type: String, required: true },
authorId: { type: String, required: true },
general: { type: String, required: true },
tldr: { type: String, required: true },
workloadrating: { type: Number, required: true },
examsrating: { type: Number, required: true },
syllabus: String,
textbook: { type: String, required: true },
grading: String,
workload: String,
lectures: String,
assignments: String,
exams: String,
},
{
timestamps: true,
}
);
const CourseReview = mongoose.model("CourseReview", coursereviewSchema);
module.exports = CourseReview;
Demo
Home page of Co-Re. Here, you can see overview of courses, and search instantly for any course. The search function allows for fuzzy matching2.
This is an example page of a course review. Markdown text formatting is supported.
-
MongoDB is a document database that generally serves as the backend service for MERN apps, while React.js is the client-side JavaScript framework that renders web elements. Express.js and Node.js make up the JavaScript web server. See also: MERN ↩
-
Here, fuzzy matching (more accurately approximate string matching) refers to matching records based on approximate search terms, e.g. searching “naitonal” will find “National University of Singapore” as one of the matches. ↩