DAYANANDA SAGAR UNIVERSITY
A MINI PROJECT REPORT
ON
“THE BOOK LOFT”
BACHELOR OF COMPUTER APPLICATIONS
Submitted by
DEVANSH KOOLWAL-(ENG18CA0014)
V Semester, 2020
Under the supervision of
Dr. Vasanthi Kumari P
DEPARTMENT OF COMPUTER APPLICATIONS
SCHOOL OF ENGINEERING
DAYANANDA SAGAR UNIVERSITY
KUDLU GATE
BANGALORE - 560068
DAYANANDA SAGAR UNIVERSITY
School of Engineering, Kudlu Gate, Bangalore-560068
CERTIFICATE
This is to certify that Mr./Ms. DEVANSH KOOLWAL bearing USN ENG18CA0014
has satisfactorily completed his/her Mini Project as prescribed by the University
for the 5th
semester BCA programme, during the year 2020-2021 at the School of
Engineering, Dayananda Sagar University., Bangalore.
Date:
Supervisor(s)
Chairman
Department of Computer Applications
Dr. Vasanthi Kumari P
ACKNOWLEDGEMENT
I wish to express my salutations to the beloved and highly esteemed Institute
Dayananda Sagar University. I would like to thank Dr. A Srinivas., Dean, School
of Engineering, Dayananda Sagar University, Bangalore, for his valuable suggestions
and expert advice.
I would like to thank Dr. Vasanthi Kumari P, Chairman, Department of Computer
Applications, Dayananda Sagar University for her valuable guidelines and constant
support throughout my project.
I am grateful to my guide and would like to express special thanks to Dr. Vasanthi
Kumari P, Associate Professor, Department of Computer Applications, DSU for her
constant support, necessary advices and valuable guidance that helped us in
completing the Report work successfully.
I would like to thank all the teaching and non-teaching staff of Department of
Computer Applications, DSU, for their help. I would like to thank My Parents, and
Friends who have always supported us in every path of the Report work.
I perceive this opportunity as a milestone in my career development. I will strive to
use the gained skills and knowledge in the best possible way and I will continue to
work on their improvement in order to achieve the desired career objectives. I hope to
continue the cooperation with all of you in the future.
DEVANSH KOOLWAL
ENG18CA0014
INDEX
S No. CONTENT PAGE
1 Introduction 1-2
1.1 Objective of the project 1
1.2 Technologies 1
1.3 Features 1
1.4 Advantages of MEN Stack 2
2 Project Plan 3-4
2.1 Resources - Hardware 3
2.2 Resources - Software 3
2.3 Resources - Tools 3
2.4 Timeline 4
3 Design Method 5-7
3.1 Scenarios 5
3.2 System Design 7
4 Test Scenarios 8-13
4.1 Functionality 8
5 Conclusion 14
5.1 Future work 14
6 References 15
THE BOOK LOFT
Dept. of Computer Application, DSU Page 1
CHAPTER 1
INTRODUCTION
1.1 OBJECTIVE OF THE PROJECT
The main objective is to build a web application for Books which can help reader and even
authors. The Book Loft is a MEN(MongoDB, ExpressJs and NodeJs) Based web application
where user can read and write review, check prices of different E-Commerce platforms, authors
can publish books which will help them to advertise there book, live prices over a graph for last
6 months (Graphically) so the buyer will get to know the lowest price of that book.
1.2 TECHNOLOGIES
 MongoDB  NodeJs
 ExpressJs  Keepa
 ElfsightAPI  Earnkaro
MongoDB :- MongoDB is a document database with the scalability and flexibility that you want
with the querying and indexing that you need. The document data model is a powerful way to
store and retrieve data in MongoDB that allows developers to move fast. MongoDB's horizontal,
scale-out architecture can support huge volumes of both data and traffic.
NodeJs :- Node.js is an open-source, cross-platform, back-end, JavaScript runtime
environment that executes JavaScript code outside a web browser. Node.js lets developers use
JavaScript to write command line tools and for server-side scripting—running scripts server-side
to produce dynamic web page content before the page is sent to the user's web browser.
Consequently, Node.js represents a "JavaScript everywhere" paradigm,[6] unifying web-
application development around a single programming language, rather than different languages
for server- and client-side scripts.
ExpressJs :- Express is a minimal and flexible Node.js web application framework that provides
a robust set of features for web and mobile applications.
1.3 FEATURES
Compare the prices from various E-Commerce Websites
• Availablility of competitive price history
• Search option to choose books/novels per own interest
• Availabliltiy of filter option according per own interest on basis of: Type, language, price
• User Friendly UI / Responsive Design
• Option to upload books/ Launch book
THE BOOK LOFT
Dept. of Computer Application, DSU Page 2
1.3 ADVATAGES OF MEN STACK
Easy to switch between client and server - Having a common language allows you to switch
seamlessly between client side and server side. You no more require a 3rd party server like
Apache. Instead, Node.js allows the developer to open the application on the server.
Highly flexible - Allows you to do more stuff that just act as a platform for developing web
applications. For instance, with MEN you can host the application on a cloud in case you want to
test the web application after development. Additionally, MongoDB, the database system used in
MEAN, is a system built for the cloud. Once, on the cloud, it provides automatic sharing and
cluster support across servers.
The quickest way to come up with an MVP - MVP is a minimum viable product. In most cases,
it comprises of the product (in this case a web application) with its preliminary set of features.
These are the most necessary features that customers are looking for.
A MEN Stack development company will ensure you achieve the MVP in the shortest possible
time. This is down to the fast nature of the framework.
An ever-increasing online community - Mean is a highly reputed framework that’s proven to
work well for lots of developers around the world.
Lots of enthusiastic developers who work with MEAN have given rise to a strong and helpful
online community. You only need to Google an issue to understand how comprehensive the
solutions are and how intricately connected harboring it is.
This is only because MEAN Stack is a proven tool for developers and you must opt for it without
harboring any inhibitions. In fact, right from small start-ups right up to tech giants, everyone is
making use of Node.js.
THE BOOK LOFT
Dept. of Computer Application, DSU Page 3
CHAPTER 2
PROJECT PLAN
2.1 RESOURCES - HARDWARE
 Minimum Ram(Suggested) - 4GB and
more
 Minimum Storage(Suggested) - 10GB
and more
 Processor(Suggested) - i3 - 5th
generation and more
2.2 RESOURCES - SOFTWARE
 Operating System - Windows / Linux
/Mac
 Text Editor
 NodeJs  MongoDB Server
 GIT  Heroku
2.3 RESOURCES - TOOLS
 Axios
 Body-Parser
 Cheerio
THE BOOK LOFT
Dept. of Computer Application, DSU Page 4
 Connect-flash
 Ejs
 Express
 Express-partials
 Express-session
 Method-override
 Mongoose
 Nodemon
 Passport
 Passport-local
 Passport-local-mongoose
2.4 TIMELINE
Dates Milestone
05/09/2020 Tentative Front End Design Review
08/09/2020 Introduction to Javascript
13/09/2020 Introduction to JQuery and Advance JQuery
25/09/2020 Working with Node Js
08/10/2020 Working with Express Js
18/10/2020 Setting up Database - MongoDB
28/10/2020 Shifting project to Embedded Javascript
09/11/2020 Establishing Connection Between Front-End and Back-End
25/11/2020 Deploying Project on Heroku
THE BOOK LOFT
Dept. of Computer Application, DSU Page 5
CHAPTER 3
DESIGN METHOD
3.1 SCENARIOS
Authentication - Authentication is the process of recognizing a user’s identity. It is the
mechanism of associating an incoming request with a set of identifying credentials. The
credentials provided are compared to those on a file in a database of the authorized user’s
information on a local operating system or within an authentication server.
function checkCommentOwnership(req,res,next){
if(req.isAuthenticated()){
Comment.findById(req.params.comment_id, function(err, foundComment){
if(err){
console.redirect("back");
}
else{
if(foundComment.author.id.equals(req.user._id))
next();
else{
req.flash("error","You don't have permission to do that");
res.redirect("back");
} }
});
}
else{
res.redirect("back");
}};
THE BOOK LOFT
Dept. of Computer Application, DSU Page 6
Authorization - Authorization is the function of specifying access rights/privileges to resources,
which is related to information security and computer security in general and to access control in
particular. More formally, "to authorize" is to define an access policy.
function isLoggedIn(req,res,next){
if(req.isAuthenticated()){
return next();
}
res.redirect("/login");
};
isAdmin - It is a boolean function that will return true if the URL being accessed is in the admin
section, or false for a front-end page. ... This function does not verify whether the current user
has permission to view the Dashboard or the administration panel.
function checkAdmin(req,res,next){
if(req.isAuthenticated()){
if(res.locals.currentUser.role===1){
next();
}
else{
req.flash("error","You need to be logged in to do that");
res.redirect("/");
}
}
else{
res.redirect("back");
} };
THE BOOK LOFT
Dept. of Computer Application, DSU Page 7
3.1 SYSTEM DESIGN
LOGIN REGISTER
HOME PAGE
BOOK
ADD
COMMENT
VALIDATE
USER
COMMENT
PUBLISH
BOOK
VALIDATE
USER
PUBLISH
FORM
VALIDATE
BOOK
VALIDATE
ROLE
VALIDATE
FORM
HOME
THE BOOK LOFT
Dept. of Computer Application, DSU Page 8
CHAPTER 4
TEST SCENARIOS AND RESULTS
4.1 FUNCTIONALITY
HOME
REGISTER
THE BOOK LOFT
Dept. of Computer Application, DSU Page 9
HOME(AFTER USER LOGGED IN)
FORM SUBMISSION
VALIDATE BOOK, ADDING AFFILIATE LINK AND GRAPH LINK
THE BOOK LOFT
Dept. of Computer Application, DSU Page 10
GENERATING AFFILIATE LINK
GENERATING GRAPH LINK
THE BOOK LOFT
Dept. of Computer Application, DSU Page 11
HOME
BOOK
THE BOOK LOFT
Dept. of Computer Application, DSU Page 12
THE BOOK LOFT
Dept. of Computer Application, DSU Page 13
COMMENT
RESULT
So finally we came across making the final web app for The Book Loft. The app has been made
by using technologies: Nodejs, Javascript, MongoDB, ExpressJs, EJS, HTML, CSS and many
more. The application has been connected with the MongoDB Server.
THE BOOK LOFT
Dept. of Computer Application, DSU Page 14
CHAPTER 5
CONCLUSION
In this project, I have developed a Full Stack MEN based web application on books by providing
full details on it. This project also emphasizes on main ideas related to the topic.
I took the ideas and researched about this topic from the websites and some books which are
mentioned in the references. I wish this project will be a useful and the knowledgeable one.
FUTURE WORK
 Adding more features
Providing vouchers for launching book
Earrings for Authors (If traffic is buying books from our affiliate links)
THE BOOK LOFT
Dept. of Computer Application, DSU Page 15
CHAPTER 6
REFERENCES
 https://www.amazon.in/Node-js-Web-Development-Server-side-
development/dp/1838987576/ref=tmm_pap_swatch_0?_encoding=UTF8&qid=1607666
239&sr=8-1
 https://www.youtube.com/watch?v=w-
7RQ46RgxU&list=PL4cUxeGkcC9gcy9lrvMJ75z9maRw4byYp
 https://stackoverflow.com/
 https://docs.mongodb.com/cloud/

Project report | Major Project | Engineering | Devansh Koolwal

  • 1.
    DAYANANDA SAGAR UNIVERSITY AMINI PROJECT REPORT ON “THE BOOK LOFT” BACHELOR OF COMPUTER APPLICATIONS Submitted by DEVANSH KOOLWAL-(ENG18CA0014) V Semester, 2020 Under the supervision of Dr. Vasanthi Kumari P DEPARTMENT OF COMPUTER APPLICATIONS SCHOOL OF ENGINEERING DAYANANDA SAGAR UNIVERSITY KUDLU GATE BANGALORE - 560068
  • 2.
    DAYANANDA SAGAR UNIVERSITY Schoolof Engineering, Kudlu Gate, Bangalore-560068 CERTIFICATE This is to certify that Mr./Ms. DEVANSH KOOLWAL bearing USN ENG18CA0014 has satisfactorily completed his/her Mini Project as prescribed by the University for the 5th semester BCA programme, during the year 2020-2021 at the School of Engineering, Dayananda Sagar University., Bangalore. Date: Supervisor(s) Chairman Department of Computer Applications Dr. Vasanthi Kumari P
  • 3.
    ACKNOWLEDGEMENT I wish toexpress my salutations to the beloved and highly esteemed Institute Dayananda Sagar University. I would like to thank Dr. A Srinivas., Dean, School of Engineering, Dayananda Sagar University, Bangalore, for his valuable suggestions and expert advice. I would like to thank Dr. Vasanthi Kumari P, Chairman, Department of Computer Applications, Dayananda Sagar University for her valuable guidelines and constant support throughout my project. I am grateful to my guide and would like to express special thanks to Dr. Vasanthi Kumari P, Associate Professor, Department of Computer Applications, DSU for her constant support, necessary advices and valuable guidance that helped us in completing the Report work successfully. I would like to thank all the teaching and non-teaching staff of Department of Computer Applications, DSU, for their help. I would like to thank My Parents, and Friends who have always supported us in every path of the Report work. I perceive this opportunity as a milestone in my career development. I will strive to use the gained skills and knowledge in the best possible way and I will continue to work on their improvement in order to achieve the desired career objectives. I hope to continue the cooperation with all of you in the future. DEVANSH KOOLWAL ENG18CA0014
  • 4.
    INDEX S No. CONTENTPAGE 1 Introduction 1-2 1.1 Objective of the project 1 1.2 Technologies 1 1.3 Features 1 1.4 Advantages of MEN Stack 2 2 Project Plan 3-4 2.1 Resources - Hardware 3 2.2 Resources - Software 3 2.3 Resources - Tools 3 2.4 Timeline 4 3 Design Method 5-7 3.1 Scenarios 5 3.2 System Design 7 4 Test Scenarios 8-13 4.1 Functionality 8 5 Conclusion 14 5.1 Future work 14 6 References 15
  • 5.
    THE BOOK LOFT Dept.of Computer Application, DSU Page 1 CHAPTER 1 INTRODUCTION 1.1 OBJECTIVE OF THE PROJECT The main objective is to build a web application for Books which can help reader and even authors. The Book Loft is a MEN(MongoDB, ExpressJs and NodeJs) Based web application where user can read and write review, check prices of different E-Commerce platforms, authors can publish books which will help them to advertise there book, live prices over a graph for last 6 months (Graphically) so the buyer will get to know the lowest price of that book. 1.2 TECHNOLOGIES  MongoDB  NodeJs  ExpressJs  Keepa  ElfsightAPI  Earnkaro MongoDB :- MongoDB is a document database with the scalability and flexibility that you want with the querying and indexing that you need. The document data model is a powerful way to store and retrieve data in MongoDB that allows developers to move fast. MongoDB's horizontal, scale-out architecture can support huge volumes of both data and traffic. NodeJs :- Node.js is an open-source, cross-platform, back-end, JavaScript runtime environment that executes JavaScript code outside a web browser. Node.js lets developers use JavaScript to write command line tools and for server-side scripting—running scripts server-side to produce dynamic web page content before the page is sent to the user's web browser. Consequently, Node.js represents a "JavaScript everywhere" paradigm,[6] unifying web- application development around a single programming language, rather than different languages for server- and client-side scripts. ExpressJs :- Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications. 1.3 FEATURES Compare the prices from various E-Commerce Websites • Availablility of competitive price history • Search option to choose books/novels per own interest • Availabliltiy of filter option according per own interest on basis of: Type, language, price • User Friendly UI / Responsive Design • Option to upload books/ Launch book
  • 6.
    THE BOOK LOFT Dept.of Computer Application, DSU Page 2 1.3 ADVATAGES OF MEN STACK Easy to switch between client and server - Having a common language allows you to switch seamlessly between client side and server side. You no more require a 3rd party server like Apache. Instead, Node.js allows the developer to open the application on the server. Highly flexible - Allows you to do more stuff that just act as a platform for developing web applications. For instance, with MEN you can host the application on a cloud in case you want to test the web application after development. Additionally, MongoDB, the database system used in MEAN, is a system built for the cloud. Once, on the cloud, it provides automatic sharing and cluster support across servers. The quickest way to come up with an MVP - MVP is a minimum viable product. In most cases, it comprises of the product (in this case a web application) with its preliminary set of features. These are the most necessary features that customers are looking for. A MEN Stack development company will ensure you achieve the MVP in the shortest possible time. This is down to the fast nature of the framework. An ever-increasing online community - Mean is a highly reputed framework that’s proven to work well for lots of developers around the world. Lots of enthusiastic developers who work with MEAN have given rise to a strong and helpful online community. You only need to Google an issue to understand how comprehensive the solutions are and how intricately connected harboring it is. This is only because MEAN Stack is a proven tool for developers and you must opt for it without harboring any inhibitions. In fact, right from small start-ups right up to tech giants, everyone is making use of Node.js.
  • 7.
    THE BOOK LOFT Dept.of Computer Application, DSU Page 3 CHAPTER 2 PROJECT PLAN 2.1 RESOURCES - HARDWARE  Minimum Ram(Suggested) - 4GB and more  Minimum Storage(Suggested) - 10GB and more  Processor(Suggested) - i3 - 5th generation and more 2.2 RESOURCES - SOFTWARE  Operating System - Windows / Linux /Mac  Text Editor  NodeJs  MongoDB Server  GIT  Heroku 2.3 RESOURCES - TOOLS  Axios  Body-Parser  Cheerio
  • 8.
    THE BOOK LOFT Dept.of Computer Application, DSU Page 4  Connect-flash  Ejs  Express  Express-partials  Express-session  Method-override  Mongoose  Nodemon  Passport  Passport-local  Passport-local-mongoose 2.4 TIMELINE Dates Milestone 05/09/2020 Tentative Front End Design Review 08/09/2020 Introduction to Javascript 13/09/2020 Introduction to JQuery and Advance JQuery 25/09/2020 Working with Node Js 08/10/2020 Working with Express Js 18/10/2020 Setting up Database - MongoDB 28/10/2020 Shifting project to Embedded Javascript 09/11/2020 Establishing Connection Between Front-End and Back-End 25/11/2020 Deploying Project on Heroku
  • 9.
    THE BOOK LOFT Dept.of Computer Application, DSU Page 5 CHAPTER 3 DESIGN METHOD 3.1 SCENARIOS Authentication - Authentication is the process of recognizing a user’s identity. It is the mechanism of associating an incoming request with a set of identifying credentials. The credentials provided are compared to those on a file in a database of the authorized user’s information on a local operating system or within an authentication server. function checkCommentOwnership(req,res,next){ if(req.isAuthenticated()){ Comment.findById(req.params.comment_id, function(err, foundComment){ if(err){ console.redirect("back"); } else{ if(foundComment.author.id.equals(req.user._id)) next(); else{ req.flash("error","You don't have permission to do that"); res.redirect("back"); } } }); } else{ res.redirect("back"); }};
  • 10.
    THE BOOK LOFT Dept.of Computer Application, DSU Page 6 Authorization - Authorization is the function of specifying access rights/privileges to resources, which is related to information security and computer security in general and to access control in particular. More formally, "to authorize" is to define an access policy. function isLoggedIn(req,res,next){ if(req.isAuthenticated()){ return next(); } res.redirect("/login"); }; isAdmin - It is a boolean function that will return true if the URL being accessed is in the admin section, or false for a front-end page. ... This function does not verify whether the current user has permission to view the Dashboard or the administration panel. function checkAdmin(req,res,next){ if(req.isAuthenticated()){ if(res.locals.currentUser.role===1){ next(); } else{ req.flash("error","You need to be logged in to do that"); res.redirect("/"); } } else{ res.redirect("back"); } };
  • 11.
    THE BOOK LOFT Dept.of Computer Application, DSU Page 7 3.1 SYSTEM DESIGN LOGIN REGISTER HOME PAGE BOOK ADD COMMENT VALIDATE USER COMMENT PUBLISH BOOK VALIDATE USER PUBLISH FORM VALIDATE BOOK VALIDATE ROLE VALIDATE FORM HOME
  • 12.
    THE BOOK LOFT Dept.of Computer Application, DSU Page 8 CHAPTER 4 TEST SCENARIOS AND RESULTS 4.1 FUNCTIONALITY HOME REGISTER
  • 13.
    THE BOOK LOFT Dept.of Computer Application, DSU Page 9 HOME(AFTER USER LOGGED IN) FORM SUBMISSION VALIDATE BOOK, ADDING AFFILIATE LINK AND GRAPH LINK
  • 14.
    THE BOOK LOFT Dept.of Computer Application, DSU Page 10 GENERATING AFFILIATE LINK GENERATING GRAPH LINK
  • 15.
    THE BOOK LOFT Dept.of Computer Application, DSU Page 11 HOME BOOK
  • 16.
    THE BOOK LOFT Dept.of Computer Application, DSU Page 12
  • 17.
    THE BOOK LOFT Dept.of Computer Application, DSU Page 13 COMMENT RESULT So finally we came across making the final web app for The Book Loft. The app has been made by using technologies: Nodejs, Javascript, MongoDB, ExpressJs, EJS, HTML, CSS and many more. The application has been connected with the MongoDB Server.
  • 18.
    THE BOOK LOFT Dept.of Computer Application, DSU Page 14 CHAPTER 5 CONCLUSION In this project, I have developed a Full Stack MEN based web application on books by providing full details on it. This project also emphasizes on main ideas related to the topic. I took the ideas and researched about this topic from the websites and some books which are mentioned in the references. I wish this project will be a useful and the knowledgeable one. FUTURE WORK  Adding more features Providing vouchers for launching book Earrings for Authors (If traffic is buying books from our affiliate links)
  • 19.
    THE BOOK LOFT Dept.of Computer Application, DSU Page 15 CHAPTER 6 REFERENCES  https://www.amazon.in/Node-js-Web-Development-Server-side- development/dp/1838987576/ref=tmm_pap_swatch_0?_encoding=UTF8&qid=1607666 239&sr=8-1  https://www.youtube.com/watch?v=w- 7RQ46RgxU&list=PL4cUxeGkcC9gcy9lrvMJ75z9maRw4byYp  https://stackoverflow.com/  https://docs.mongodb.com/cloud/