MERN Stack
MERN Stack
ACKNOWLEDGEMENT………………………………………………………………………….I
CANDIDATE DECLARATION…………………………………………………………………..II
ABSTRACT………………………………………………………………………………………..IV
LIST OF ABBREVIATIONS
CHAPTER 1 1
1 INTRODUCTION 1
1.1 Overview of the Company 1
1.2 Internship Program Objective 1
1.3 Vision of the Company 1
CHAPTER 2 2
2.1 Node.js 3
2.1.1 Node Module 4
2.1.2 Node Package Manager 5
2.1.3 Node Event Loop 7
2.2 Express.js 8
2.2.1 Basic Routing 8
2.2.2 Writing and Using Middleware 9
2.3 MongoDB 10
2.3.1 NoSQL Database 11
2.3.2 Data Models 12
2.3.2.1 Embedded Data Model 12
2.3.2.2 Normalized Data Model 13
2.3.3 MongoDB Atlas 14
2.3.4 Mongoose 16
2.4 React.js 17
2.4.1 JSX 18
2.4.2 Virtual DOM 19
2.4.3 Component 20
2.4.3.1 Functional Components 21
2.4.3.2 Class Components 22
CHAPTER 3 15
3 APPLICATION IMPLEMENTATION 15
CHAPTER 4 35
4 DISCUSSION
4.1 Application Evaluation 35
4.2 Further Improvement 36
CHAPTER 5 38
5 CONCLUSION 38
REFERENCES 39
List of Abbreviations
UI User Interface
Wisflux Private Limited thrive to empower and enhance the lives of people
Through profound IT Innovative solutions, with the help of our competent
technical team specialized in providing very effective and efficient solutions.
Transforming your ambitious goals into reality.
Core Values:
1. Our cross-functional team structure and collaborative approach ensures that all
reviews and client feedback are incorporated in the development process. This is
done in order to obtain satisfactory outcomes on time, without compromising on
cost or quality.
2. We provide services to cover all aspects of app creation This saves our partners
the trouble of managing multiple teams and allows them to focus on core
business objectives.
To help students potentially land permanent or contractual jobs from host company.
The MERN stack is basically a JavaScript-based stack which is created to facilitate the
development process. MERN comprises of four open-source elements: MongoDB as
thedatabase, Express as server framework, React.js serves as client library and
Node.js is an environment to run JavaScript on the server. These technologies
introduce an end- to-end web stack for developers to utilize in web development.
Figure 1 explains the architecture of MERN stack. Firstly, Express with Node.js create
API which is used for logic and to interact with MongoDB. When React client sends a
HTTP request to the back-end server. The server analyzes the request, retrieves data
from the database and responses with that data. React client is updated based on that
returned data.
2
2.1 Node.js
Node.js is JavaScript environment provider and the most essential core of the MERN
stack. Node.js is now the most widely used free open-source web server environment
created by Ryan Dahl. It allowed to execute JavaScript code on the server. It is able to
run on multiple platforms like windows, Linux and mac OS. Node.js is dependent on
Google V8 engine which is the core of Chrome browser. C and C++ run both Node and
V8 which is better in performance speed and memory consumption.
A Node app runs in an individual process with event looping, without the need of a new
thread for each operation. This is opposed to traditional servers which make use of lim-
ited thread to handle requests. Node is a non-blocking, asynchronous and event-driven
engine aimed for scalable application development. Generally, Node libraries are cre-
ated using non-blocking pattern. Application calls a request and then move on to work
on next task rather than stalling while waiting for a response. When the request is com-
pleted, a callback function informs the application about the results. This allows multiple
connections or requests to a server to be executed simultaneously which is important
when scaling applications. MongoDB is also invented to be used asynchronously, there-
fore it is compatible with Node.js applications.
Table 1. A popular web server task (reading a file on server and send the content as response
to the client) handled by PHP and Node.js
3
Node terminate the waiting time between handling requests and move on to the next
request as table 1 illustrates.
Listing 1 demonstrates the usage of http module and „createServer‟ function to initiate a
server running on port 8080. A text string is shown in the client as a response.
In 2017, statistic showed that more than 350 000 packages are found in the npm registry,
make it the largest software repository on Earth. Due to being an open source and
having a basic structure, the Node ecosystem has prospered dramatically, and currently
there are over 1 million open-source free package, which facilitates development process
a lot. Beginning with being a method to download and manage Node dependencies, npm
has become a powerful means in front-end JavaScript.
4
There are two types of Node packages installation, globally or locally by the npm install
command. The package then is downloaded from the NPM registry and presented in a
folder named node_modules. The package is also added to the package.json file under
property dependencies. By using require function follow with the package name, it is
usable in the project as the example below in listing 2:
Figure 2 illustrates some Node package used in the application under dependencies property
such as body-parser, Braintree, cookie-parser, etc.
5
2.2 Express.js
Express is a micro and flexible prebuilt framework based on Node that can provide faster
and smarter solution in creating server-side web applications. Express is made of Node
so it inherits all Node‟s features like simplicity, flexibility, scalability and performance as
well. In brief, what Express does to Node is the same as Bootstrap does to HTML/CSS
and responsive design. It makes programming in Node a piece of cake and provides
developers some additional tools and features to improve their server-side coding. Ex-
press is literally the most famous Node framework so that whenever people mention
about Node, they usually imply Node combined with Express. TJ Holoway chuk
released Express the first time in 2010 and currently it is maintained by the Node
foundation anddevelopers who contribute to the open-source code.
Despite the fact that Express itself is completely minimalist, developers have pro-
grammed many compatible middleware packages to solve almost all issues in web de-
velopment. Express offers a quick and straightforward way to create a robust API with
a set of helpful HTTP methods and middleware.
Routing determine the way how an application‟s endpoints (URIs) interact with client re-
quests. The basic syntax consists of an object as instance of Express and the corre-
spondent HTTP request method such as app.get(), app.post() to handle GET and POST
request respectively.
Routing methods take a callback function as parameter. The specified function is called
when the HTTP requests match the defined routes and methods.
//respond with 'hello' when a GET request is made to the route :/hello
app.get('/hello', function(req, res) {
res.send('hello') //response method
})
var callback1 = function(req, res, next) {
//
next()
}
6
var callback2 = function(req, res, next) {
//
next()
}
app.get('/multiple', [callback1, callback2])
As can be seen from listing 3, routing method in line 17 has more than 1 callback function
as parameters. In this case, it is crucial to add „next‟ to each callback function arguments
and call it later in the body to switch control to the next callback. „next‟ function will be
discussed more in the next section.
Middleware functions have the ability to approach request object, response object and
the „next‟ function in the application‟s request-response phase. Middleware execution re-
turn an output which could be either the final outcome or could be passed as an argument
to the next middleware until the end of the cycle. The ‟next‟ function belongs to the
Express router which starts the following middleware right after the current middleware
finished. If a middleware does not finish the req-res cycle, next() must be called to pass
control to the next one. Otherwise, the request will be suspended.
7
An Express application is basically a sequence of middleware calls. The call orders is
based on the order which they are declared
Figure 4 explains that Express treats all middlewares in the same way so that the order
in which your route handlers and other middleware functions are written is exactly the
execution order.
2.3 MongoDB
8
2.3.1 NoSQL Database
There are big differences between the mechanism NoSQL databases store data and
relational databases do. NoSQL databases are differentiated based on their data model.
There are 4 main types:
Document databases
Key-value databases
Wide-column databases
Graph databases
They share one common thing which is dynamic schema and can scale easily with large
data loads and high user volumes. A popular misunderstanding is that NoSQL databases
do not handle relationship data well. While in fact, many developers believed that data
modeling relationship is easier for NoSQL databases due to the nested individual data
structure.
During the late 2000s, as a result of the considerable decrement in storage price, there
is no need to create a complicated data model just to avoid data duplication. NoSQL
databases took a big step forward and became a good option for developers and large
data volume applications.
9
2.3.2 MongoDB Atlas
MongoDB Atlas, which announced in 2016 by MongoDB creator team, is the cloud ser-
vice for storing data globally. It offers everything MongoDB provide without further re-
quirements when building applications, allowing developers to fully focus on what they
do best. With Atlas, developers do not have to worry about paying for unnecessary
things as they follow a pay-as-you-go standard.
MongoDB Atlas introduces a simple interface to get started and running. Basically, by
choosing instance size, region and any customized features needed, Atlas brings out the
suitable instance and includes it with the following:
MongoDB Atlas is practical and reliable thanks to its integrated automation mechanisms.
With Atlas, it is unnecessary to concern about operational tasks as following:
10
2.3.3 Mongoose
Mongoose schema is covered inside a mongoose model, and a specific schema creates
model. While schema and model are slightly equivalent, there is a primary differ-
ence: schema determines the document formation, default values, validator, etc.
while model is responsible for document-related operation like creating, querying, updat-
ing and deleting. A schema definition is simple, and its structure is usually based on
application requirements. Schemas are reusable and can include multiple child-sche-
mas. Schema applies a standard structure to all the documents in a collection. Moreover,
Mongoose provides additional features like query helper functions and business logic in
the data. For example, Mongoose can help connect database with the server and per-
form typical database operations for reading, writing, updating and deleting data. Mon-
goose removes the need of writing complicated data validations by providing schema
validation rules to allow only acceptable data to be saved in MongoDB.
2.4 React.js
Figure 6. Number of package downloads with NPM per year of React, Angular and Vue
11
Figure 6 compares the number of package downloads with NPM among React and two
other popular frameworks - Angular and Vue. As can be seen, the number of React has
increased dramatically in popularity in the past few years and definitely has proven its
preference.
React works only on user interfaces of web and mobile applications. This equivalent to
the view layer of MVC template. ReactJS allows developers to create reusable UI com-
ponents as well as to create scalable web applications that can change data without
reloading the page. In addition to providing reusable component code, which means
reducing development time and lessening the risk of bugs and errors, React released
some key features that add to its appeal for developers:
2.4.1 Component
React is all about component, which reflects the primary unit of every application. React
allow developers to divide the user interface into simple, independent and reusable
components. A developer can start with common tiny components that can be used re-
peatedly on several pages like navigation bar, button, input form etc. This is what reus-
ability means, which is a perfect way to reduce development time, so that developers
can concentrate on more crucial features and business logic. Then comes the turn of
wrapper components that include children components with internal logic. Each compo-
nent determines its own way how it should be rendered. A component can also be com-
bined with other components or nested inside higher order components. The develop-
ment process keeps going on like that until it reaches the root component which is also
the application. As a result, this approach guarantees the application consistency and
uniformity which make it easier for maintenance as well as further codebase growth.
Functional components are completely presentational and basically are written under the
form of a JavaScript function that can receive some props (properties) as argument and
12
return a React element. Thanks to their predictability and straightforwardness, functional
components always make the same result given the same props. Therefore, developers
tend to pick functional components whenever possible. Stateless component or dumb
component is all functional component‟s name as it comes from the natural fact that
functional components do not manage any state and their task is simply output user
interface elements.
ECMAScript6 class syntax are utilized to write class-based components, the one which
not only can return JSX but also can dispatch action, fetch data, handle events and have
local state. Class components offer more functionalities by inheriting from React.Com-
ponent class. They can access all additional lifecycle methods from their parent class
and manipulate code at particularly moment during the process. While functional
components are dumb and stateless, class components are said to be smart and stateful
thanks to being a container of the local state, internal logic and other children compo-
nents. Therefore, a class component should be considered in case if there is a need for
local state management or lifecycle method as well as some logic. Otherwise, a func-
tional component is more suitable.
13
As figure 11 summarizes, all React.Component subclasses have to define render func-
tion. A constructor function is implemented here because there is initial state and inside
constructor, super(props) should be called first out of all statements. If not, this can lead
to errors because of undefined props.
14
Chapter 3
3 Application Implementation
A prototype version of the e-commerce application was created to apply the study of
MERN stack as well as to understand how they contribute to the whole entity in web
development.
Typically, a (business to customer) B2C e-commerce web application has two types of
users, which are admin and user. Admins are responsible for some specific management
tasks such as creating, updating and removing the products from the database as well
as managing user orders. A user is able to browse and read product‟s information dis-
played in the application. He can also add the product to the shopping cart and perform
the payment for that product. While some resources and web routes are public, the oth-
ers can only be accessed by an admin or a signed in user.
By interviewing and researching some normal customers and business owners, the au-
thor figured out what different type of user want from the application, what features they
think are necessary for an e-commerce web application. Based on that, a list of user
stories is shown below to illustrate some of the required functionalities for this application:
15
As an admin, admin want to add category to the database
As an admin, admin want to manage user orders
The very first thing to do is to set up an Express application by creating an app.js file,
which is the entrance file of the project, where some of the necessary middlewares and
node packages are stored. Express instance is defined under app variable.
16
Mongoose is discussed in chapter 2.3.3
Morgan logs the request details
bodyParser unzips the whole body part of an incoming request and makes
it available on req.body object.
cookieParser deconstructs cookie header and populates all the cookie in
req object under property named cookies.
dotenv let developers use environment variable by accessing .env file
The following step is setting up database connection. MongoDB atlas is used due to
various advantages it brings in for the project as chapter 2.3 summarizes above. Since
Atlas is an online database service, no installation is required. By accessing MongoDB
Atlas official site and following instruction there, a cluster is created with the author‟s
personal choice of cloud provider and region followed by a connection string which is
saved as MONGO_URI variable in the environment file. It is then used by mongoose to
connect to the database. When the connection is successful, „DB Connected‟ is dis-
played in the terminal. Otherwise, a message telling the connection error is printed out
as Figure 9 below explains.
The back-end folder is structured by 3 main sub-folders: models, routes and controllers.
While models contain all the mongoose schemas that are based on application require-
ments, routes define all the API routes and controllers comprise of the logic that needed
to be execute after each incoming request match with the corresponding route.
17
3.2.1.2 Mongoose Schema Creation
There is a total of 4 schemas in this application: category, order, product and user. Each
mongoose schema represents for a document structure User schema is written first be-
cause user model is needed to handle authentication and authorization.
User schema
As can be seen from figure 10 below, a user schema has 3 required properties called
name, email and password. Role property is set to 0 by default as it means this is a
normal user. By manually changing the role value to other (in this application: 1) the user
becomes an admin. The user model only accepts defined properties in the schema to be
added to the database. While history shows an array of purchases that user used to
make, timestamps displays the time of creation and modification of a user object.
18
For security reasons, real password is not saved in the database but an encrypted one,
therefore the author used Crypto, which is a Node module to hash the password while
combined with a tool called mongoose virtual.
19
Product schema
A product schema is structured as figure 12 below. It has all the properties that any e-
commerce product may need, like name, description, price, quantity, category, etc. Sold
field is set to 0 as default value and is incremented after each user purchase. One differ-
ent with the user schema above is that category field has a type of ObjectId while the
„ref‟ option indicates which model to refer to during population (in this case category
model). This illustrates the relationship between product model and category model and
by using populate method, category data is no longer its original _id but replaced with
mongoose document retrieved from the database.
While user schema and product schema look complex, category schema is pretty simple
and straightforward with only name and timestamps field.
JSON Web Token (JWT) is a standard that defines a compact and self-contained way to
transmit data securely between client and server as a JSON object. Tokens can be
20
transferred through an URL or a HTTP request header easily thanks to its compact size
while self-contained feature let JWT comprise all the necessary user information. Data
inside a JWT is verified and reliable because it is signed with a secret key or a public
private key pair. Moreover, the signature also confirms that only the party holding the
private key have signed it.
Authentication is the most popular use case of JWT. After a user signs in, the authoriza-
tion is granted and a JWT is created by the application and sent back to the user. By that
time, all following requests made by user will contain the token in the authorization
header with Bearer schema. The server will check for a valid token, and if it is available,
the user is allowed to access protected routes, services and resources that require that
token. As JWT is self-contained, all needed data stay there, leading to less works toward
the database. This whole process is analyzed in figure 17 above
21
Figure 14. Usage of JWT in E-commerce application to sign in user
Figure 14 demonstrates how JWT is implemented in the „signin‟ controller method. This
method is executed when there is a POST request to the route „/api/signin‟. Firstly, user
credentials are retrieved from the request body and set to the corresponding variable.
Then database looks for the user with that email and checks if the password is matched
with hashed password. If yes, a signed token is generated with user ID and a secret
random string which is saved in environment file. This secret string key is needed for
security reasons since tokens are user credentials. Then the token is attached in cookie
with an expiry time and is returned with user data as json format to the client.
Data distribution and sharing between two or more systems has always been an essen-
tial aspect of software development. Taking into account a case when a user search for
some books of a specific category, an API is called and the request is sent to the server.
The server analyzes that request, performs necessary actions and finally, user gets a list
of books as a response from the server. This is the way how REST API works. An API
stands for Application Programming Interface, which is a set of rules that allows two
applications or programs to interact with each other.
22
REST determines how the API looks like. It stands for “Representational State Transfer”
-an abstract definition of the most popular web service technology. REST is a way for
two computer systems to communicate over HTTP in a similar way to web browsers and
servers. It is a set of rules that developers follow when they create their API.
23
GET api/products Return a list of products under json for-
mat
Table 2 above illustrates all the product related API routes with corresponding method
and description in brief. As can be seen, only user with admin role can perform operation
like creating, deleting and updating to a product. Other public routes can be accessed
wherever and by whatever kind of user even without a signed account.
The author also makes use of router.param method as most of the product API routes
above have a parameter (productid, userId) inside. Router.param finds the product with
that ID and populate its information to request object under product property as figure 15
24
summarizes. This is also applied to other routes which have userId, categoryId and or-
derId as well since it facilitates the logic implementation.
At this moment of the development process, the front-end is not available yet so a third-
party tool called Postman is used to handle API testing.
As can be seen from figure 16, a GET request has been called to the route „api/catego-
ries‟ and been successfully handled. Since this is a public route and categories is not
protected resource, no authorization token in the header is needed. As a result, an array
of json object containing all the categories is returned. Each category object includes all
the properties defined in Mongoose schema like name, timestamps and auto generated
ID.
25
3.2.2 Front-end development
Then Routes.js file is created with the sole purpose of including all the route paths with
their corresponding components by using a package called react-router-dom. Route
component is then rendered by ReactDom as the root component of the application.
Figure 17. A screenshot of Routes.js file, with BrowserRouter wraps around Switch and Route
26
Figure 17 summarizes all the route paths and the component to be render when that
route is accessed. For example, any kind of user can go to public route like „/shop‟ to
access Shop component, but only authenticated user can see Dashboard or Profile com-
ponent as they are protected routes.
Switch and Route are route matchers. When a <Switch> is rendered, it finds the
<Route> element whose path is similar to the current URL. When a <Route> is found, it
renders that <Route> and ignores the rest. This means <Route> with more specific (usu-
ally longer) paths should be written before less-specific ones.
One essential thing to consider when setting up Route is that a Route path matches
the beginning of the URL, not the whole URL. Therefore a <Route path="/"> will match
every URL. That is why <Route> should be located last in the <Switch>, otherwise
<Route exact path="/"> can be used to match the whole URL.
Sign up Component
Although some main pages of this application like Home page, Shop page do not require
the user to sign up in order to enhance user experience, if users want to make a pur-
chase, they have to sign up and log in to their account first. Below is a simple user inter-
face to sign up new users.
27
Figure 18. A screenshot of the Signup page
Figure 18 displays a web page with shared navigation bar and layout. Right below is the
signup form which includes some inputs for name, email and password with a submit
button. Bootstrap class „form-group‟ is applied to facilitate these styling tasks. In this
component, beside the state of each input field there are error and success state which
determine if some alerts should be shown up when user fail or succeed to sign up.
Given the user put in correct data and press submit, fetch method is used to send a
POST request with user data under json format in the body to the back-end API „api/sig-
nup‟. After validation process, a new instance of user model is created based on req.body
and is saved into the database. The server then returns a json file containing user data
without hashed password back to the client. Finally, a success alert is shown up and is
redirecting the user to the sign in page.
Sign in Component
The sign in component is quite similar to the sign up one except the data flow when the
user press submit button. As summarized in chapter 3.2.1.3, after the server handled the
POST request from the client, a token is signed and sent back to the client along with
28
user information. Those data then are passed to authenticate function and stored in the
local storage as jwt.
As shown in listing 6 and figure 19, user data can be saved in local storage and therefore
can be retrieved from there. By using JSON.parse(), user data is converted from json
string back to JavaScript object and can be used to find out the user role (user or admin).
Based on that signing the user in to the corresponding dashboard.
29
3.2.2.3 Dashboard Component
Admin Dashboard
Admin dashboard is accomplished with this component as can be seen in figure 20. It
consists of 2 section elements which both applies Bootstrap class Card. All admin infor-
mation is shown on the right side while some admin actions like creating category and
product, viewing and managing order are on the left. By clicking on tasks link, admin will
be navigated to the matching component where he/she can create a category or a prod-
uct. The admin also has the ability to view orders and manage them, for example setting
the order status from processing to shipped or delivered. Moreover, ManageProduct
component enables the admin user to modify products or even delete them from the
database.
User Dashboard
Generally, the user dashboard component is quite similar to the admin one. Since the
user have less power than an admin, there is fewer actions for a user to perform.
30
Checking out in the Cart page or updating their profiles are the two only user‟s tasks, as
visualized in figure 21.
Unlike admin dashboard, user‟s purchase history is presented under his/her personal
information. This list provides a precise look of order history, such as product name, price
and the time it was performed.
UI Description
Home page, which is the main page of this application is demonstrated by Home com-
ponent. This component is accessible through a public empty URL. It plays an important
role in an e-commerce application.
31
Figure 22. User interface of Home component
An overview of the Home page is described in figure 22. Some of the most fundamental
functionalities of an e-commerce application are shown in this component. As can be
seen, there are 2 lists of products. One is for best sellers, which are those products with
highest sold property, the other is new arrivals, meaning that the createdAt property is
closest to the current time. Each product is presented by a Card component which ap-
plies a Bootstrap class called „card‟. The card header shows the product name while
other information like product image, price, category, timestamps are set in the card
body. In stock feature depends on the quantity property of each product. In the end
comes 2 buttons for user to view each product in detail and to add to cart for payment
and purchase. There is also a search engine rendered by the Search component on top
32
of the page right below the shared layout. Here user can search product based on cate-
gory and by text in name.
A shop page enables user to sort products based on category and price.
UI description
Figure 23 illustrates the Shop component with shared layout and a navigation bar like
other pages, followed by some filter features on the left side and filtered results on the
right side of the page. Card component is again utilized to render products. Category
filter is handled by checkbox component while price filter is presented by radio-box com-
ponent.
UI Description
Cart page is the last page users have to go through to get the purchase done. Beside
some common shared components, there are a Card component which renders the prod-
uct that users want to buy and a check-out component that demonstrates the total
amount, delivery address and a form to fill in with payment information. This Card com-
33
ponent inside Cart is slightly different than the one in Home or Shop component. It has
a remove button to delete the product from the cart and an input field where users can
increase or decrease the quantity of product in the end. Cart component is visualized
clearly in figure 24 below.
34
Chapter 4
4 Discussion
This section illustrates the evaluations of the e-commerce web application. There is also
an in-depth discussion about possible improvements that can be done in the future.
35
Figure 25 provides a view of add-product page, which is only accessible by admin user.
Beside text field, there have also 2 dropdowns option to choose category and shipping
method and a form to upload a book picture.
User orders are saved in the database and are rendered as soon as the Order compo-
nent mounted. Each order contains all the user information and its status can be updated
by the admin as can be seen in figure 26.
Generally, the outcome application achieved all the requirements in case of functionality
for an end-to-end e-commerce application which is visualized from the beginning and it
aims to be suitable for small businesses such as an online bookstore.
Although this application meets all the feature requirements as planned, there are still
some aspects needed to improve. Concerning the Manage Product page in figure 32,
36
the main improvement would be some CSS styling as the update button are in a mess.
Color design should also be taken into account to enhance the user experience.
Figure 27. User interface of ManageProduct component, where admin can update or delete a
product. It also shows the total number of products in the database.
Despite of all the fundamental and useful implemented functionalities in the application,
these features in the following list can be considered for further development:
Eventually, in order for this e-commerce application to switch from development mode
to production mode, testing and deployment have to be handled appropriately as the
development process may have some unseen bugs.
37
Chapter 5
5 Conclusion
The goal of this thesis was to study different characteristic of each technology in the
MERN stack and develop a full-stack e-commerce web application based on it. It took
the author a considerable amount of time to research and study in-depth each modern
technology in order to carry on the web application. All the technologies that comprise
of the MERN stack were discussed precisely, from fundamental concepts to advanced
features as well as their usage in the application to ensure the reader understand about
this paper. The thesis also provided all the steps needed in the development process to
implement an e-commerce application.
The application was successfully developed at the end. A fully functional end-to-end e-
commerce application featuring an online bookstore was released and aimed to help the
startup develop their business strategy in general. This application was meant to solve
the problem that is mentioned in the first section of this thesis: to help the book retailer
startup become more widely known and gain more potential customers. People and book
lovers also have one more source to expand their knowledge.
Overall, the thesis can be used as a tutorial or documentation of the MERN stack in
particular or full-stack web development in general. By researching and studying this
paper, the author gained much more useful knowledge and understood why MERN stack
is rising its popularity and plays a leading role in web development recently. Although
the application still has some drawbacks and needs more further improvements, both in
styling issue and new features, it is a combination of one of the most widely used web
stack technology with one of the most emerging business ideas nowadays – ecommerce.
38
References
1 Hyperion Development (2018). Everything you need to know about the MERN
stack. Available at: https://blog.hyperiondev.com/index.php/2018/09/10/every-
thing-need-know-mern-stack/
9 Node.js Documentation. Update all the Node.js dependencies to their latest ver-
sion. Available at: https://nodejs.dev/learn/update-all-the-nodejs-dependencies-
to-their-latest-version
39
12 Mozilla. Express/Node introduction. Available at: https://developer.mozilla.org/en-
US/docs/Learn/Server-side/Express_Nodejs/Introduction
22 Nick Parsons, Medium (2017). MongoDB Atlas – Technical Overview & Benefits.
Available at: https://medium.com/@nparsons08/mongodb-atlas-technical-over-
view-benefits-9e4cff27a75e
40