Final and Final CLP Document

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 23

A Course Level Project Report

On

BUILDING WEB APPLICATION AND DEPLOYING ON AWS


In partial fulfilment of the requirements for the award of

BACHELOR OF TECHNOLOGY
in

Computer Science and Engineering

R. JAYA PRAKASH (21E51A0598)

S. BHARATH (21E51A05A9)

P. ANIL KUMAR (22E55A0509)

P. NITHIN (22E55A0510)

R. RAVALIKA (22E55A0511)

Under the guidance of

Dr. S V HEMANTH
Associate Professor
Department of CSE, HITAM

HYDERABAD INSTITUTE OF TECHNOLOGY AND MANAGEMENT


Autonomous, Approved by AICTE, Accredited by NAAC A+, NBA.
Basuragadi (Village), Medchal (Mandal), Medchal - Malkajgiri (Dist.), Hyderabad, TS- 501401.

2023–2024
HYDERABAD INSTITUTE OF TECHNOLOGY AND MANAGEMENT
(Autonomous, Approved by AICTE, Accredited by NAAC A+, NBA – TS 501401)

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CERTIFICATE

This is to certify that the course project work entitled “BUILDING WEB APPLICATION AND
DEPLOYING ON AWS" is a bonafide work carried out by R. JAYAPRAKASH bearing Roll No.
(21E51A0598), S.BHARATH bearing Roll No.(21E51A05A9), P.ANILKUMAR bearing Roll No.
(22E55A0509),P.NITHIN, bearing Roll No. (22E55A0510), R.RAVALIKA, bearing Roll No.
(22E55A0511),in partial fulfilment of the requirements for the degree BACHELOR OF TECHNOLOGY in
CSE during the academic year 2023- 2024. The matter contained in this document has not been submitted to
any other University or institute for the award of any degree.

Internal Guide Head of the Department

Dr. S V HEMANTH Dr. T SATHISH KUMAR

Associate Professor Professor

Department of CSE Department of CSE


HYDERABAD INSTITUTE OF TECHNOLOGY AND MANAGEMENT

(AUTONOMOUS)

BASURAGADI– 501401, HYDERABAD, TELANGANA

Department of Computer Science and Engineering

DECLARATION

We “R. JAYA PRAKASH, S.BHARATH, P.ANIL KUMAR, P.NITHIN, R.RAVALIKA” student of


‘Bachelor of Technology in CSE’, session: 2023 - 2024, Hyderabad Institute of Technology and
Management, Dundigal, Hyderabad, Telangana State, hereby declare that the work presented in this course
project work entitled ‘BUILDING WEB APPLICATION AND DEPLOYING ON AWS’ is the outcome
of our own bonafide work in sixth semester and is correct to the best of our knowledge and this work has
been undertaken taking care of engineering ethics. It contains no material previously published or written by
another person nor material which has been accepted for the award of any other degree or diploma of the
university or other institute of higher learning, except where due acknowledgment has been made in the text.

21E51A0598 R.
JAYAPRAKASH
21E51A05A9 S. BHARATH
22E55A0509 P. ANIL KUMAR
22E55A0510 P. NITHIN
22E55A0511 R. RAVALIKA
ACKNOWLEDGEMENT

An endeavour of a long period can be successful only with the advice of many well- wishers.

We would like to thank our chairman Sri Mr. ARUTLA PRASHANTH for providing all
the facilities to carry the internship work successfully.

We would like to thank our Principal Dr. S. ARVIND who has inspired us a lot through
their speeches and provided this opportunity to carry out our project work successfully.

We are very thankful to our Head of the Department, Dr. T. SATHISH KUMAR and B. Tech
Course Level Project Coordinator Dr. S.V. HEMANTH

We would like to specially thank my internal guide Dr. S.V. HEMANTH


for technical guidance, constant encouragement, and enormous support provided to us for
carrying out our internship work.

We wish to convey our gratitude and express sincere thanks to all D.C (Departmental
Committee) and P.R.C (Project Review Committee) members, non- teaching staff for their support
and Cooperation rendered for successful submission of our Course Level Project.

We also want to express our sincere gratitude to all my family members and my friends for
their individual care and everlasting moral support.

21E51A0598 R.
JAYAPRAKASH
21E51A05A9 S. BHARATH
22E55A0509 P. ANIL KUMAR
22E55A0510 P. NITHIN
22E55A0511 R. RAVALIKA
DECLARATION

We hereby declare that the course level project on “BUILDING WEB APPLICATION AND
DEPLOYING ON AWS” was submitted to Hyderabad Institute of Technology and Management.
Hyderabad (AUTONOMOUS) as part of Project-based learning in the academic initiative, is a result of
work done by us in III B.Tech II semester. It is further declared that the project report or any part thereof
has not been previously submitted to any other university or institute.

21E51A0598 R.
JAYAPRAKASH
21E51A05A9 S. BHARATH
22E55A0509 P. ANIL KUMAR
22E55A0510 P. NITHIN
22E55A0511 R. RAVALIKA
CONTENTS

Chapter No Name Page No.

Abstract 1

1 Introduction 2

2 Literature Survey 3

3 Hardware and Software Requirements 4

4 Problem Statement 6

5 Proposed Solution 7

6 Implementation 8

7 Results & Discussion 15

8 Conclusion & Future Scope 16

References
ABSTRACT

This project dives into building and deploying a powerful web application. We'll leverage the versatile
Node.js framework to meticulously craft the application's functionalities and user interface. Next, we'll
seamlessly integrate MongoDB, a NoSQL database, for flexible and scalable data storage. Mongoose, an
object data modelling library, will bridge the gap between Node.js and MongoDB, allowing intuitive data
interaction. Following successful development and integration, we'll deploy the application onto the powerful
Amazon Web Services (AWS) platform. Within AWS, Elastic Beanstalk, renowned for its ease of use, will
manage the deployment. By configuring an Elastic Beanstalk environment, we'll establish a platform for our
Node.js application to reside. This approach abstracts away server management complexities, with Elastic
Beanstalk handling infrastructure provisioning, scaling, and maintenance. The outcome will be a fully
functional and scalable web application built with Node.js, MongoDB, and Mongoose, gracefully running on
the robust and cost-efficient AWS cloud platform. Comprehensive documentation will accompany the project,
meticulously outlining the entire development and deployment journey for future reference and enhancements.

1
1.INTRODUCTION

In today's digital age, businesses need user-friendly web applications to manage content and connect
with customers. This project tackles these needs by proposing a streamlined approach for building and
deploying a blog-posting application. We leverage the power of Node.js, a versatile JavaScript framework, for
efficient development. Express.js, a popular Node.js web framework, facilitates the creation of robust APIs
with clear routing structures, allowing for modular and organized application logic. This project seamlessly
integrates MongoDB, a NoSQL database, through Mongoose for flexible data storage, perfectly suited for
unstructured content like blog posts. Deployment is simplified through AWS Elastic Beanstalk, a Platform-as-
a-Service (PaaS) offering that automates server provisioning, configuration, and scaling, eliminating the need
for manual server management. This approach empowers businesses to focus on content creation and user
engagement, while minimizing the complexities associated with web application development and
deployment.

2
2. LITERATURE SURVEY

2.1 LITERATURE SURVEY 1 (RESEARCH PAPER)


The website ResearchGate is a platform that allows researchers to share their work, collaborate with
peers, and access a vast repository of academic publications. The specific article "Building Web Application
Using Cloud Computing" on ResearchGate discusses the methodologies and advantages of utilizing cloud
computing for developing web applications. This approach enhances scalability, flexibility, and cost-
efficiency by leveraging cloud infrastructure and services.
Cloud computing is attractive to business owners as it eliminates the requirement for users to plan
ahead for provisioning, and allows enterprise to start from the small and increase resources only when there is
a rise in service demand. Overall, AWS businesses with the opportunity to innovate and grow without
being hindered by traditional IT constraints.

2.2 LITERATURE SURVEY 2 (AWS ARTICLE)

Amazon Web Services (AWS) is a cloud computing platform that offers a wide range of services,
including computing power, storage, and database, to help businesses scale and grow. This flexible and cost-
effective model enables organizations to quickly deploy applications and scale their infrastructure without
the need for large upfront investments in hardware.
Additionally, AWS provides a secure and reliable environment for storing and managing data. Overall
AWS empowers businesses to innovate and operate more efficiently by leveraging the power of cloud
computing technology. Cloud computing has emerged as the preeminent computing platform for multiple
enterprises.

2.3 LITERATURE SURVEY 3 (RESEARCH PAPER)


Cloud computing is a technology that allows businesses to access and use computing resources, such
as servers, databases, networking, software, and analytic, over the internet. This means that businesses
no longer need to invest in physical infrastructure or maintain it themselves. Instead, they can rely on
cloud service providers like Amazon Web Services (AWS) to handle the infrastructure and provide
access to these resources on a pay-as-you-go basis. AWS is one of the leading cloud computing platforms
of all sizes and industries. These services include computing power through virtual servers (EC2),

3
storage options (S3), database (RDS), networking solutions (VPS), analytic tools (Redshift), and
machine learning services (Sage Maker), among others.

3. HARDWARE AND SOFTWARE REQURIMENTS

2.1 Hardware Requirement:

Processor : Intel i3 8th gen-8100

RAM : Minimum 4GB (preferably higher)

Hard Disk : 20GB

Internet Connection : A stable and fast internet connection for accessing and scraping

websites.

2.2 Software Requirements:

AWS Applications : S3 Bucket, EC2 Instance, Elastic Beanstalk

Programming Languages : HTML, Tailwind CSS, JavaScript and ReactJS, EJS.

Database : MongoDB

Others : NPM, Node.js, Git, Postman

4
BLOCK DIAGRAM

5
4. PROBLEM STATEMENT

In today's digital landscape, businesses and organizations recognize the power of engaging web
applications to manage content, foster customer interaction, and build brand awareness. However, the
creation and maintenance of these applications can be a significant hurdle. Building a robust web
application traditionally necessitates expertise across diverse fields like front-end development for a user-
friendly interface, back-end development for application logic, database management for efficient data
storage, and server administration to ensure smooth operation. Further complicating matters, conventional
deployment methods often involve manual server setup and configuration, resulting in time-consuming
maintenance and challenges in scaling the application to accommodate increasing user traffic. This project
strives to bridge this gap by proposing a streamlined approach for building and deploying a web application
specifically designed for creating and managing blog posts. Our objective is not only to create a user-
friendly platform for content creation but also to simplify the development and deployment process by
leveraging modern technologies.

6
5. PROPOSED SOLUTION

Existing web application development often suffers from a complex, multi-step process. Traditional
methods require separate teams for front-end and back-end development, leading to communication
challenges and longer development times. Additionally, complex relational databases can struggle to
efficiently manage unstructured content. Deployment further adds to the complexity, involving manual server
setup and ongoing maintenance tasks like scaling and security patching.
This project proposes a streamlined solution that overcomes these limitations. Our approach leverages a
unified development environment using Node.js, eliminating the need for separate development teams.
Additionally, we utilize a NoSQL database, specifically designed for flexible data storage, making it ideal for
content management. Deployment is dramatically simplified through a platform-as-a-service (PaaS) offering,
automating server management and facilitating automatic scaling based on user traffic. This not only reduces
development time and costs but also frees up resources for ongoing development and content creation.

Imagine a Platform-as-a-Service (PaaS) offering that automates the entire server management process
– that's the magic of AWS Elastic Beanstalk. This eliminates the need for manual server setup, configuration,
and ongoing maintenance, freeing up valuable developer resources. Instead of being bogged down by server
complexities, developers can focus on crafting the application logic and building a seamless user experience
for content creation. With AWS Elastic Beanstalk taking care of the infrastructure, our project offers a
streamlined, cost-effective, and highly scalable solution for building and deploying web applications.

In essence, our project offers a more efficient, cost-effective, and scalable solution for building and
deploying web applications, empowering businesses to focus on their core functionalities.

7
6. IMPLEMENTATION

app.js:

require("dotenv").config();

const path = require("path");


const express = require("express");
const mongoose = require("mongoose");
const cookiePaser = require("cookie-parser");

const Blog = require("./models/blog");

const userRoute = require("./routes/user");


const blogRoute = require("./routes/blog");

const {
checkForAuthenticationCookie,
} = require("./middlewares/authentication");
const { configDotenv } = require("dotenv");
const app = express();
const PORT = process.env.PORT || 8000;

mongoose
. connect(process.env.MONGO_URL)
. then((e) => console.log ("MongoDB Connected"));

app.set("view engine", "ejs");


app.set("views", path.resolve("./views"));

app.use(express.urlencoded({ extended: false }));


app.use(cookiePaser());
app.use(checkForAuthenticationCookie("token"));
8
app.use(express.static(path.resolve("./public")));

app.get("/", async (req, res) => {


const allBlogs = await Blog.find({});
res.render("home", {
user: req.user,
blogs: allBlogs,
});
});

app.use("/user", userRoute);
app.use("/blog", blogRoute);

app.listen(PORT, () => console.log(`Server Started at PORT:${PORT}`));


addBlog.ejs:
<!DOCTYPE html>
<html lang="en">
<head>
<%- include('./partials/head') %>
<title>Add New Blog</title>
</head>
<body>
<%- include('./partials/nav') %>

<div class="container mt-3">


<form action="/blog" method="post" enctype="multipart/form-data">
<div class="mb-3">
<label for="coverImage" class="form-label">Cover Image</label>
<input
type="file"
class="form-control"

id="coverImage"
9
name="coverImage"
aria-describedby="coverImage"
/>
</div>
<div class="mb-3">
<label for="title" class="form-label">Title</label>
<input
type="text"
class="form-control"
id="title"
name="title"
aria-describedby="title"
/>
</div>
<div class="mb-3">
<label for="body">Body</label>
<textarea name="body" class="form-control" id="body"></textarea>
</div>
<div class="mb-3">
<button class="btn btn-primary">Submit</button>
</div>

</form>
</div>

<%- include('./partials/scripts') %>


</body>
</html>

Signin.ejs:

10
<!DOCTYPE html>
<html lang="en">
<head>
<%- include('./partials/head') %>
<title>Signin</title>
</head>
<body>
<%- include('./partials/nav') %>

<div class="container mt-4">


<form action="/user/signin" method="post">

<div class="mb-3">
<label for="exampleInputEmail1" class="form-label"
>Email address</label
>
<input
type="email"
name="email"
class="form-control"
id="exampleInputEmail1"
aria-describedby="emailHelp"
/>
<div id="emailHelp" class="form-text">
We'll never share your email with anyone else.
</div>
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Password</label>
<input
name="password"
type="password"
class="form-control"
11
id="exampleInputPassword1"

/>
</div>

<button type="submit" class="btn btn-primary">Submit</button>


</form>
</div>

<%- include('./partials/scripts') %>


</body>
</html>

Signup.ejs:

<!DOCTYPE html>
<html lang="en">
<head>
<%- include('./partials/head') %>
<title>Signup</title>
</head>
<body>
<%- include('./partials/nav') %>

<div class="container mt-4">


<form action="/user/signup" method="post">
<div class="mb-3">
<label for="fullName" class="form-label">Full Name</label>
<input
type="text"
class="form-control"
12
id="fullName"
name="fullName"
aria-describedby="fullName"
/>
</div>
<div class="mb-3">
<label for="exampleInputEmail1" class="form-label"
>Email address</label
>
<input
type="email"
name="email"
class="form-control"

id="exampleInputEmail1"
aria-describedby="emailHelp"
/>
<div id="emailHelp" class="form-text">
We'll never share your email with anyone else.
</div>
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Password</label>
<input
name="password"
type="password"
class="form-control"
id="exampleInputPassword1"
/>
</div>

<button type="submit" class="btn btn-primary">Submit</button>


</form>
13
</div>

<%- include('./partials/scripts') %>

</body>
</html>

14
7. RESULTS & DISCUSSION:

15
8. CONCLUSION AND FUTURE SCOPE

The blog-posting application, developed using Node.js, Express.js, MongoDB, and AWS Elastic
Beanstalk, provides a robust and scalable platform for content management. Its features, including secure
user authentication, efficient data handling, and streamlined deployment, make it a valuable tool for
businesses looking to enhance their digital presence. This application empowers users to focus on creating
and engaging with content while minimizing the complexities associated with web development and
deployment. It stands as a testament to the power of modern web technologies in delivering high-quality
user experiences.

To further enhance the application, we plan to integrate it into a college setting where students can
showcase their projects as blog posts. This will allow students to write about their projects, and lecturers can
review and rate these posts, providing valuable feedback and marks. Additionally, we aim to implement
role-based access control to distinguish between student authors and lecturer reviewers, ensuring a
structured and secure platform.

We envision incorporating advanced analytics to track engagement metrics, which can help in
understanding user interactions and improving content strategy. A companion mobile app can be developed
to increase accessibility and engagement among users. Integrating third-party tools like Google Analytics
will offer in-depth insights, and adding social media sharing features will broaden the reach of the content.

Continual refinement of the user interface and experience, based on user feedback, will ensure the platform
remains user-friendly and visually appealing. These future enhancements will transform the application into
a comprehensive platform for academic and professional use, significantly benefiting educational
institutions and businesses alike.

16
REFERENCES

in Virtualized Cloud”, IEEE 3rd International Conference on Cloud Computing, pp.59-66, 2010.
1. Alex Amies; Harm Sluiman; QiangGuo Tong and GuoNing Liu,” Developing and Hosting Applications
on the Cloud”, ISBN-13: 978-0-13-306684-5, IBM Press, July 2012.

2. ResearchPaper:https://www.researchgate.net/publication/312040779_Building_Web_Application_Us
ing_CloudComputing
3. Rajkumar Buyya and Karthik Sukumar, “Platforms for Building and Deploying Applications for Cloud
Computing", CSI Communications, Vol.35, no.1 pp. 6-11, May 2011.

4. AWS Developer Guide: https://docs.aws.amazon.com/whitepapers/latest/awsoverview/introduction.html

5. Yiduo Mei; Ling Liu; Xing Pu and Sankaran Sivathanu,” Performance Measurements and Analysis of
Network I/O Applications.

17

You might also like