Project Functionality and make up - Ultan-Kearns/eCommerceApp GitHub Wiki

Project Functionality and make-up

Server.js

The server.js file runs the backend of the project. The server.js file is run using node and will start the server so that the user can see items which are stored in the Mongo database. The database is hosted on Mlab and contains items, orders, users and every other piece of information that is needed to maintain the site and the functionality.

Src folder

The source folder contains all of the components for the application and style sheets for the UI design and also services for the component to communicate with the backend. There are 14 components in total 1 for each page, all the pages are listed in the architecture section of the wiki.

How to use the application

The user is initially brought to the homepage, here they can navigate to the pages using the mat-toolbar or the buttons that are underneath the images on the homepage. There is also a drop-down menu for categories where there is a button which the user can press to purchase the item. The other pages which the user can interact with are the Support page for submitting bugs to the server, the login page where the user can login to the website, the forgot page where the user can enter the email they signed up with and receive an email with a password and the register page where the user can create an account to use on the site.

Technologies used in the application

  • Node - for open source server which allows us to host the server locally or on the cloud so that the user can send a response to the server and receive a message back.
  • Express - This is a framework for Node and allows to build a web based application with Node
  • Angular - Asynchronous Javascript which allows the website to have a more responsive design and faster load times.
  • Mongo - This is a relational database which allows us to store items, the reason we used Mongo is that it is relatively fast to retrieve information from the database and show it to the user.

Why a MEAN stack? - elaboration

There are many reasons why we used a MEAN stack. Using the MEAN stack it is relatively easy to get a project up and working in a small amount of time. The stack contains all technology needed for an E-commerce site or a multitude of other types of website. Mongo is extremely easy to use and has a variety of options to tweak the database to the developer's needs, Mongo is also very easy to work with as it allows the developer to write services in angular to push data objects to the database. Express allows us a tonne of useful features to work with the backend such as debugging(for error detection) and middleware(which systematically arranges different function calls. Angular allows us to traverse the application faster as the javascript functions are called asynchronously which significantly cuts down load time. Angular also separates components which makes it very easy to debug as each component is separated in to different files which contain the logic and design for that component. Node Allows us to host a server locally so that the user can utilize all functions on the application.