React-ToDoApp 2005608
React-ToDoApp 2005608
React-ToDoApp 2005608
on
Submitted to
BACHELOR’S DEGREE IN
Computer Science Engineering
BY
May 2023
KIIT Deemed to be University
School of Computer Engineering
Bhubaneswar, ODISHA 751024
CERTIFICATE
This is certify that the project entitled
is a record of bonafide work carried out by them, in the partial fulfilment of the
requirement for the award of Degree of Bachelor of Engineering (Computer Sci-
ence & Engineering OR Information Technology) at KIIT Deemed to be university,
Bhubaneswar. This work is done during the year 2022-2023, under our guidance.
Date: 04/05/2023
Sarthak Singh
ABSTRACT
The reason why people turn towards social media is because they want to
connect with both people and ideas. Through our project we have tried to do so
by designing a simple, seamless and interactive platform.
A website where people may communicate with one another and exchange ideas
and experiences is the Social Media App initiative. Users have the ability to set
up profiles, publish updates, like or dislike other users' postings, and follow or
unfollow other users. To ensure that only authorised users may access specific
pages and functions, the app also incorporates security features.
With a simple and contemporary style, the website is made to be simple to use
and comprehend. Users can do a real-time update on user behaviours, receive
notifications, and search and filter content. The software can be modified to
meet various demands because it is flexible and adaptive in design.
The Social Media App is, all things considered, a fantastic tool for individuals
to connect and share their lives with one another in a secure setting.
1.1 Purpose 1
1.2 Objective 1
2 Basic Concepts 3
3 Problem Statement 7
4.1 Methodology 14
4.2 Result Analysis / Screenshots 26
5 Conclusion and Future Scope 32
5.1 Conclusion 32
5.2 Future Scope 32
References 34
35
Plagiarism Report 36
1. Introduction
1.1 PURPOSE:
The proposed end-to-end social media application's goal is to give
users a seamless and engaging platform for social networking and
communication. It was constructed utilising Firebase as the
backend platform. The purpose of the programme is to effectively
link people so they may exchange material, communicate with one
another, and create communities based on common interests.
1.2 OBJECTIVE:
To develop a fully functional social media app using React and
Firebase that allows users to post, view, and interact with content,
while providing a seamless and engaging user experience.
To guarantee that users can register, sign in, and access their
accounts safely, provide authentication and authorization services.
1
To guarantee that users receive updates as they happen, implement
real-time updates using Firebase's real-time database.
2
2. Basic Concepts:
a. Agility:
You can quickly develop and create almost anything you can dream of
thanks to the cloud, which makes it simple to access a wide range of
technologies. From infrastructure services like computation, storage, and
databases to Internet of Things, machine learning, data lakes, and
analytics, you can swiftly spin up resources as you need them.
b. Elasticity:
With cloud computing, you can handle future peaks in company activity
without having to overprovision resources now. As an alternative, you
just supply the resources that you truly require. As your company's needs
change, you can scale these resources up or down to instantly increase
and decrease capacity.
3
2.4 Deploy Globally in minutes:
With the cloud, you can quickly deploy globally and expand to new
geographical areas. For instance, AWS offers infrastructure all around the
world, allowing you to quickly deploy your application in several physical
locations. Applications run more quickly and provide a better experience when
placed close to users.
About Firebase:
a. Firebase Authentication:
Most apps use Firebase authentication to recognise the identity of their
users. This authentication solution includes backend services, simple
Firebase SDKs, and pre-build UI frameworks for authenticating users in
your project.
b. Cloud Firestore:
You probably will want to store your data on the cloud regardless of the
type of app you are creating. If your customers want to access the same
data from multiple devices or want to share their data with others for
engaging in-app collaboration, you may want to accommodate their
requests. In this case , you could get help from the Cloud Firestore.
c. Cloud Storage:
4
A robust user-friendly, and reasonably priced object storage solution
designed for Google Scale is Cloud Storage for Firebase. Regardless of
network condition, the Firebase SDKs for cloud Storage gives Google
Security to file uploads and downloads for your firebase apps.
d. Firebase Hosting:
I. React.js:
It is an open-source javaScript library for creating user interfaces. It was
developed by Facebook, because of its ease of use, adaptability, and
reusability, developers frequently utilise it. React.js enables developers to
construct reusable UI components and updates the UI quickly in response
to data changes using a virtual DOM. It is one of the most widely used
options for creating online applications.
II. Node.js:
Developers may run JavaScript code outside of a web browser thanks to
the open source Node.js runtime environment. It offers a potent collection
of APIs for creating server side applications and is built on top of the
Google V8 Javascript engine. The event-driven design, high scalability,
and a non-blocking I/O paradigm of Node.js make it the perfect platform
for developing real-time and data-intensive apps. It has a sizable and
vibrant developer community and is now a well-liked option for
developing web servers, APIs, and microservices.
5
III. Chakra UI:
6
3. Project Specifications:
7
Phase 4: Testing and Deployment
3.1.4 Resources:
FERN Stack (Firebase, Express, React, Node.js)
8
3.2 PROJECT ANALYSIS (SRS)
3.2.1 Introduction
3.2.2.1 Authentication
Users will be required to sign up and log in to use the
application. The authentication process will be done through
Firebase Authentication. Passwords will be encrypted and stored
securely in Firebase. Users will have the option of registering with
their email-IDs.
3.2.2.4 Security
The application will be secured through Firebase Security
Rules, which will ensure that users can only access their own data
and not that of other users.
9
3.2.3 Non-functional Requirements
a) Performance
A big number of people should be able to utilise the application
simultaneously. The application should load quickly and be speed-
optimised.
b) Usability
The software should be simple to use and navigate. The
application's functionality should be made clear to users through the user
interface design.
c) Reliability
The software must function correctly and always be accessible. In
the event of a system breakdown, the application should have a backup
system in place.
d) Scalability
The application should be scalable and should be able to handle an
increasing number of users.
3.2.4.Constraints
i) Technology Stack:
The application will be built on the FERN stack.
ii) Hosting:
The application will be hosted on cloud-based service -Firebase.
iii) Budget:
The application will be developed within the budget constraints.
10
3.3 System Architecture:
I. Activity Diagram:
11
II. Use-Case Diagram:
12
III. Sequence Diagram:
13
4. Implementation
4.1. Methodology
We created a directory chat-app, then we created a React app inside it using the
command “yarn create react app.”, which creates a react app in the current
directory.
“yarn create react app.” is a command used to create a new React application
with a pre-configure set of tools and dependencies.
I. App.js:
It allows us to write HTML-like code within our javaScript files using JSX
syntax.
14
Fig. Code screenshot of app.js
II. Route.js:
In the ‘lib’ subdirectory we have created routes.js which handles all the routes
for our project and also has the record of all the components to render when a
certain route is triggered.
15
Fig. Code screenshot of login.js
16
Fig. Creating a new Firebase project
17
V. Custom Hooks:
React Hooks are simple JavaScript functions that we can use to isolate the
reusable part from a functional component. Custom react hooks which handles
the CRUD functionalities.
a) auth.js:
This custom hook contains functions which handle all the operations related to
user authorization (Login,Register,Logout).
b)posts.js:
This custom hook contains functions which handle all the operations related to
posts, like adding posts, liking posts and deleting posts.
c) comments.js
This custom hook contains functions which handle all the operations related to
the comments like adding comments, arranging the comments according to their
date, deleting comments.
18
Fig. Code screenshot of comment.js
d) users.js:
This custom hook contains functions which handle all the operations related to
the user, like updating the profile of the user.
VI. Comments:
The Comments subdirectory contains all the js files which handles the frontend
related to Comments.
19
Comment.js: This file defines the Comment component, which is used to render
an individual comment. The component receives a comment prop, which
contains the data for the comment (such as the user who posted it and the text of
the comment). The Comment component renders the comment's data in a
specific format.
20
Fig. Code screenshot of comments.js
Overall, these files work together to provide comment functionality for the
social media app. The CommentSection component is used on a post page to
display the comments, and the CommentForm component is used to create new
comments. The CommentList and Comment components are used to render the
list of comments and each individual comment respectively.
VII. Dashboard:
Overall, `dashboard/index.js` provides the main page for the social media app,
with the ability to create new posts and display a list of existing posts.
21
Fig. Code screenshot of Dashboard
VIII. Layout:
a) Sidebar.js:
The code in Sidebar.js is responsible for rendering the sidebar component of the
application's layout.
22
b) Index.js:
It is responsible for rendering the overall layout of the application, including the
navigation, content, and sidebar.
a)Actions.js:
23
Fig. Code screenshot of actions.js
X. Profile:
The Profile component is the main component, which renders the user's profile
picture, name, and bio, as well as a set of tabs for displaying the user's posts,
liked posts, and followers/following lists.
EditProfile component allows the user to edit their profile information, such as
their profile photo.
24
Fig. Code screenshot of EditProfile.js
25
4.2. Result Analysis:
We have hosted our web app using Firebase’s hosting service and found out that
all its functionalities are all working correctly.
I. Login/Register:
We can see that our database in the firebase is getting updated simultaneously.
26
The new post has been added to the Firestore simultaneously.
27
The comment has been added to the database.
28
IV. Liking a Post:
29
V. Changing our dp:
30
VI. Logging Out:
We can see that the user has been logged out successfully and a ‘Successfully
logged out’ message appears.
31
5. Conclusion and Future Scope:
5.1 Conclusion:
The main functions of the programme, such as the creation of user accounts, the
creation ,editing profile have all been executed to a high degree. Because the
project is well-documented, other developers can easily understand it and
contribute to its ongoing development.
Every software project has an opportunity for development, and the Social
Media Application is no exception. But with continued assistance and
improvement, this project could develop into a well-liked and useful tool for
social media users.
Looking ahead, there are a number of possible areas where the Social Media
Application project might evolve and improve. These regions include, among
others:
32
to follow. Advanced search options include looking for particular sorts of
content or persons.
2. Integration with other social media platforms: The application's reach might
be increased and its use for users who use several social media platforms could
be increased by integrating it with other well-known social media sites, such as
Twitter or Instagram.
3. Greater privacy and security: Although the app already has a number of
security measures in place, there is always opportunity for advancement. The
security of the programme might be improved by incorporating features like
two-factor authentication or stronger password encryption.
The Social Media Application project has a lot of room to expand and improve
in the future. These improvements may increase users' use and enjoyment of the
programme while also assisting it in standing out in the crowded social media
market.
33
6. References:
1. https://react.dev/learn
2. https://nodejs.org/en/docs
3. https://chakra-ui.com/docs/components
4. https://firebase.google.com/docs/
5. https://www.youtube.com/watch?v=1rc2zYqexLI
6. https://www.youtube.com/watch?v=K8YELRmUb5o&t=10s
34
35
Plagiarism-Report
by Research Experts - Turnitin Report
15 %
SIMILARITY INDEX
12%
INTERNET SOURCES
1%
PUBLICATIONS
10%
STUDENT PAPERS
PRIMARY SOURCES
1
www.coursehero.com
Internet Source 5%
www.worldleadershipacademy.live
2 Internet Source 2%
3 Submitted to Asia Pacific University College of
Technology and Innovation (UCTI) 2%
Student Paper
4
Submitted to The University of the South
Pacific 1%
Student Paper