Skip to content

ubergonmx/porum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Major Course Output of Group 12 (S15) for CCAPDEV2122T2

Introduction

Since we are social beings, the global pandemic has had a significant impact on our social lives as it continues to limit our face-to-face interactions and isolate us from the rest of the world.

As a result, many of us want to share our experiences with the internet, which has served as the primary mode of communication during the pandemic. There are many social media platforms that people can use as a result of this, but only a few community-based platforms where people can post various information or contents.

Herewith, the proposed web application is an online forum similar to Reddit and StackOverflow, that will allow registered users to create posts from queries, news, thoughts or to simply share something of their interest. With this, other users can comment and react to these posts which will promote interaction and communication between the users of the web application making it more user-friendly.

Local Set Up

  • Make sure MongoDB is installed and running.
  • Run npm install.
  • Rename the .env.default file to .env.
    • Set up MONGODB_URI if connection problems occur.
  • To run the application, execute node server.js or npm start
  • To access the application, go to the localhost:port link with port based on the SERVER_PORT environment variable.
    • By default, the link is http://localhost:3000/.

Content

  • db - This folder contains files which defines database connection, models, and sample data.
  • utils - This folder contains js files used as helper functions.
  • models - This folder contains files for database modeling and access.
  • public - This folder contains static assets such as css, js, and image files.
  • routes - This folder contains files which describes the response of the server for each HTTP method request to a specific path in the server.
  • views - This folder contains all hbs files to be rendered when requested from the server.
  • server.js - The main entry point of the web application.

Languages and Tools

html5 css3 javascript nodejs express express mongodb heroku

Installed NPM Packages

  • bcrypt - This package is used to hash passwords.
  • body-parser - This package parses incoming request bodies before the handlers, available under the req.body property.
  • cloudinary - This package integrates Cloudinary sdk for managing image upload to cloud.
  • deep-email-validator - This package validates email addresses based on regex, common typos, disposable email blacklists, DNS records and SMTP server response.
  • dotenv - This package is the module that loads environment variables from a .env file into process.env.
  • express - This package is the web framework of this project which provides broad features for building web and mobile applications.
  • express-csp-header - This package is a Content-Security-Policy middleware used to allow specified scripts (such as FontAwesome).
  • express-handlebars - This package is a view engine for express which is used as the templating engine for this project.
  • express-session - This package is a session middleware used to store session data such as the logged in user.
  • helmet - This package is used to help secure the application by setting various HTTP headers.
  • mongodb - This package is the MongoDB driver for Node.js.
  • mongoose - This package is an object modelling tool for MongoDB.
  • morgan - This package is an HTTP middleware for Node.js that logs HTTP requests and errors.
  • multer - This package is a node.js middleware for handling multipart/form-data, which is primarily used for uploading files.
  • nodemailer - This package allows sending emails from Node.js.
  • nodemon - This package helps develop Node.js based applications by automatically restarting the node application when file changes in the directory are detected.