Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Mychatapp

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

A Project report on

CHAT APPLICATION

Ajay Kumar Garg Engineering College-MCA,


Ghaziabad

1
Submitted By:-
Umesh maurya :-1900270140011

Vishakha singh :-190027014001

Submitted To:-
Prof. Arpana Saxena

Dr. A.P.J. Abdul Kalam Technical University,


Uttar Pradesh, Lucknow

TABLE OF CONTENT

Abstract ............................................................................................................................... ii

Acknowledgements……………………………………………………………………….iii

Keywords...........................................................................................................................iv

Summary for Lay Audience............................................................................................... v


Acknowledgements............................................................................................................. vi

Table of Contents............................................................................................................... vii

List of Tables ...................................................................................................................... x

List of Figures................................................................................................................... xii

List of abbreviations……………………………………………………….xiii

2
Chapter 1 – Introduction ..................................................................................................... 1

1.1 Preface...................................................................................................................... 1

1.2 Problem Description and Motivation....................................................................... 3

1.2.1 abcd……………………….

Chapter 2- Background and Related Work……………..

Chapter 3- SRS/ALGORITHM………………

Chapter 4- System design document (DFD,ER DIAGRAM,UML DIAGRAM,STATE


DIAGRAM)………………………

Chapter 5-database Design/Data Set…………………..

Chapter 6- Snapshots of forms……………………

Chapter 7-Snapshots of reports/Results Evaluation, Analysis and Conclusion…..

Chapter 8- Discussion and Future Work……………………


References …………………………

3
Abstract :
The main aim of this project is to provide a platform where the users
can interact with each other by sharing their information or ideas.

ChitChat application is a feature on the Internet to communicate


directly among Internet users who are online or who are equally
using the same application.
These applications allow users to communicate even though from a
great distance. Therefore, this chat application must be real-time
and multi platform to be used by many users.

Modules:
1. User Signup
2. User Login
3. Chat Interface
4. Chat Setting
5. Logout/signout

User SignUp: User must have to open the signup page and fill the information in
signup form.
Information like: full name ,email id, password and then submit the form.

4
User Login: User has to open the login page and fill up the username and password
in the login form or login through gmail account ,once user has entered valid credentials
he navigates on the chat window.

Chat Interface: Once a user enters the chat window, he/she can communicate with
online active users and easily share his/her ideas.

Chat setting: Here we would allow the user to modify the chat UI color and font size
as well other UI settings.

Logout: It is a feature where a user can click on the logout button and he will be
logged out from the chat screen.

So Above are the modules that for now i have planned and future enhancement would
be done and will update the requirement phase accordinlgy.

Technologies Stack:
1. Javascript
2. Reactjs Framework
3. Firebase
4. Nodejs
5. ChatEngine
6. Ant Design
7. HTML5

5
8. CSS3
9. Social Media Login

ACKNOWLEDGEMENT

"I have taken efforts in this project. However, it would not have been
possible without the kind support and help of many individuals and
organisations. I would like to extend my sincere thanks to all of them.

I am highly indebted to Prof. Arpana saxena for their guidance and


constant supervision as well as for providing necessary information
regarding the project & also for their support in completing the project.

I would like to express my gratitude towards my parents for their kind


co-operation and encouragement which help me in completion of this
project.

I would like to express my special gratitude and thanks to industry persons


for giving me such attention and time.

My thanks and appreciation also go to my colleague in developing the


project and people who have willingly helped me out with their abilities."

6
Table of content

S.no Title Page.no

1. Introduction
1.1 Preface 8 -13
1.2 Problem Description and Motivation

2. Algorithm 14-22

3. System design document 23-30

4. Data Set 31-37

5. Snapshot of reports/Result Evaluation, 38-42


Analysis and conclusion

6. Discussion And Future Work 43-44

7
1. Introduction

Communication is a means for people to exchange messages. It has


started since the beginning of human creation. Distant communication
began as early as 1800 century with the introduction of television,
telegraph and then telephony. Interestingly enough, telephone
communication stands out as the fastest growing technology, from fixed
line to mobile wireless, from voice call to data transfer. The emergence
of computer network and telecommunication technologies bears the
same objective : to allow people to communicate. All this while, much
effort has been drawn towards consolidating the device into one and
therefore indiscriminate the services. Chatting is a method of using
technology to bring people and ideas together despite the geographical
barriers. The technology has been available for years but the
acceptance of it was quite recent. Our project is an example of a chat
server. It is made up of applications, the client application which runs
on the server application which runs on any pc on the network. To start
chatting our client should get connected to a server where they can do
Group and private chatting.

8
Purpose and Scope

The purpose of the chat application is to allow users to be able to chat


with each other, like a normal chat application. The users will be able to
chat with each other, most likely only from user to user, no group
chatting will be developed, unless there is time to do so. The chat
application will be written in javascript, but due to the lack of experience
in javascript, while developing the application, practicing techniques with
javascript and working on it as much as possible will help hone some
javascript skills and be more ready to develop the application. For the
scope of the project, the project will be tested as the program is being
developed. A database for the users registered will be developed and
tested, a menu will be developed and tested, a client/server interface will
be developed and tested, and GUI’s will be developed and tested, for the
users’ benefits. When the chat application is near completion, more
testing will be done in order to make it less buggy or more user friendly.

1.1 Preface
1.2Problem Description and Motivation

Problem statement

9
This project is to create a chat application with a server and users to enable
the users to chat with each other. To develop an instant messaging solution to
enable users to seamlessly communicate with each other. The project should
be very easy to use, enablings even a novice person to use it.

1. This project is to create a chat application with a server and clients to


enable the clients to chat with many other clients in the same common
chat group.

2. This project is to simulate multicast chatting. In the case of


multicasting when a message is sent to a group of clients, then only a
single message is sent to the router.

3. The main purpose of this project is to provide multi chatting functionality


through the network.

4. This project can play an important role in the organizational field where
employees can connect together through LAN.

Motivation of the project

The person who has interaction with a lot of people with different
languages faces a lot of issues while communicating.

10
There are a lot of translation applications available in the market to
help solve this issue. In existing applications there is a lot of work to be
done to get the translated text.
This is a hectic and boring process. It also consumes a lot of time.
In the future I plan to use the functionality of google translate and
combine it with the chatting application .
Also on top i will try to give the user the ability to change the preferred
language in which he wants the text message to be.

Project Overview

The functionality of the chat application is to give the ability to chat with whoever
is online on the application. The users and stakeholders will be a small group for
now, The use cases will be what is available to the user, and the
functional/nonfunctional requirements will be covered, as well as the milestones
of the chat application.

Users and Stakeholders

This section will deal with the users and stakeholders. The users will be using the
chat application and the stakeholders will develop, maintain, and test the chat
application.

Myself

11
I will be developing, maintaining, and testing the chat application through its
phases of development.

Users

The users will be anyone who has the chat application and registers for it. Use
cases These are the use cases for the client of the chat application. The server
has access to all of these cases as well.

Main Menu

When the client runs the chat application, the client will see the main menu,
which will welcome them. At the main menu, the client will have the choice to
register for the chat application, login to the chat application, or exit it.

Register/Login/Logout

The user must register in order to login, the user must login in order to send
messages to those who are online, and must be able to logout if the user wants
to logout.

Online menu

12
After the client is logged in, the client can choose to send a message, only if
another client is online, check who is online, and be able to logout when the
client wants to, which will be by logging out by hitting the logout button or by
hitting the exit button.

Users Online

When the client wants to see who is online, the client clicks the “who is online”
button in the online menu, and the client can choose who to message, by double
clicking the name.

Message

When the client wants to message the user, the client clicks on the name, the
user can send a message to another online user. Some character limitations for
typing might be put into place, only if it is necessary.

Chat history

When the client wants to see the chat history, the user will be able to do so. The
user will be able to clear the history if the user wants to.

2- SRS/ALGORITHM

13
Software Requirement Specification

Purpose

However , the purpose of this project is to develop a chat application. The objective of
this process is as follows;
1. To develop an instant messaging solution to enable users to seamlessly communicate
with each other.
2. The project should be very easy to use, enabling even a novice person to use it.

Project Scope & Features

1. Broadcasting Chat Server Application is going to be a text communication software, it


will be able to communicate between two computers using point to point communication
. 2. The limitation of Live Chat is it does not support audio conversations.
To overcome this limitation we are concurrently working on developing better
technologies.

3. Companies would like to have a communication software wherein they can


communicate instantly within their organization.

4. The fact that the software uses an internal network setup within the organization
makes it very secure from outside attacks

Functional and Non Functional Requirements

Functional Requirements

1. User Registration

14
Users must be able to register for the application through a valid phone number.
On installing the application, users must be prompted to register their phone number.
If the user skips this step, the application should close.
The user's phone number will be the unique identifier of his/her account on Chat
Application.

2. Adding New Contacts

The application should detect all contacts from the user's phone book.
If any of the contacts have user accounts with Chat Application, those contacts must
automatically be added to the users contact list on Chat Application.
If any of the contacts have not yet registered on Chat Application, in future users should
be provided with an invite option that sends those contacts a regular text message asking
them to join Chat Application along with a link to the Chat Application on Google
Playstore.

3. Send Message

User should be able to send instant messages to any contact on his/her Chat Application
contact list. Users should be notified when a message is successfully delivered to the
recipient by displaying a tick sign next to the message sent.

4. Broadcast Message

Users should be able to create groups of contacts. User should be able to broadcast
messages to these groups
.
5. Message Status

Users must be able to get information on whether the message sent has been read by the
intended recipient. If the recipient reads the message, 2 ticks must appear next to the
message read.

Non Functional Requirements

15
1. Privacy

Messages shared between users should be encrypted to maintain privacy.

2. Robustness

In case a user's device crashes, a backup of their chat history must be stored on remote
database servers to enable recoverability.

3. Performance

Application must be lightweight and must send messages instantly.

Use Case Table

16
Figure 1: Use Case Table of Chat Application

Use Case Diagram

Authentication System

17
Figure 2: Use Case Diagram of Authentication
System

Contacts Form

18
Figure 3: Use Case Diagram of Contacts Form

Chat Form

19
Figure 4: Use Case Diagram of Chat Form

Maintenance

20
Figure 5: Use Case Diagram of Maintenance

Monitor

21
22
3- System design document (DFD,ER DIAGRAM,UML
DIAGRAM,STATE DIAGRAM)

System Design Document

GUI Module Name and Description

This module deals with the application’s interface with the end user.
All the user inputs (refreshing, connecting, chatting) are captured here.
Design Alternatives
Structured programming approach is used as the tool has been developed in
the Win64 platform.
Design Details
At a minimum, the following should be described -
a) Processing within module
We develop the user interface for the application through which the user
interacts with the tool. It consists of a main window and boxes which are
displayed as per the menu selections made by the user. There are different
controls such as edit controls, buttons etc which are used to get the user
inputs.
b) Error checking
Errors occurring because of connection problems. Errors occurring due to
incorrect input by the user.

Resolving Names Module Name and Description

23
In this module the application resolves the names of the systems connected
to a network. These names are displayed in the form of a list.

Design Alternatives

Structured programming approach is used as the tool has been developed


in the Win64 platform. Object oriented approach is an alternative to this.

Design Details

At a minimum, the following should be described a)Processing within


modules We provide two buttons: Refresh and Connect to the user, to
provide input on the basis of selection using mouse events. This module
consists of the following two sub-modules

REFRESH:

This refreshes the list of names indicating to the respective systems


connected in the network.

CONNECT:

This connects the host system to the selected system (if any) and opens the
next form with this connection. If no system is selected, then an error
message is shown, which tells a user to select a system first.

b) Error checking

Errors occurring during file saving operations

24
Assumptions

All IP addresses fall in the same range. Firewall is turned off for the
intranet.

Connection Modules Names and Description

In this module the user communicates with the desired user in the form of
text. A connection is formed between the host system and the desired user
with the help of sockets which itself uses ports for packet data transfer.

Design Alternatives

Structured programming approach is used as the tool has been developed in


the Win64 platform. An Object Oriented approach is an alternative to this.

Design Details

At a minimum,
the following should be described –

a) Processing within modules


We show a windows form application that makes communication graphic
oriented and user friendly.
Three GUI interfaces are captured under this:
TEXTBOX :
Here the user enters the message to be sent to the remote user.

RICH TEXTBOX:
In this module the message sent is pasted under host name and the message

25
received displayed under the remote user's name.

SEND BUTTON:

When this button is pressed, the message in the textbox is displayed in the
rich textbox under the host’s name and also it is sent over the network to the
remote machine where it is displayed in the textbox under the sender’s
name.

b) Error checking

Errors occurring during file opening operations

Assumptions

All IP addresses fall in the same range. Firewall is turned off for the
intranet.

26
DFD ( Data Flow Diagram )

ZERO LEVEL DFD

27
FIRST LEVEL DFD

28
SECOND LEVEL DFD

29
ER Diagram ( Entity Relationship Diagram )

30
4-Database Design / Data Set

Database design for chat application

Almost any web application that has to be built today has a part that requires an

aspect of users communicating either in a group or a person to person chat.

Most at times, it is not quite easy to set up the Database structure for such an

31
application. When it comes to RDBMS systems such as MySQL, Oracle database

or PostgreSQL, it is not much of a problem as such databases support data

aggregation where with a single query, data can be queried from multiple tables and

combined.

Well if you are new to Web application development, setting up a backend on your

own is not an easy task as you need the server to run 24h/7. Maybe you just want to try

something new and see how it is.

That is where Google’s Firebase (firebase.google.com) comes in. It provides

you with a mobile backend including file storage and crash reporting..

But How Do we structure the database

You have to first note that Firebase is a NoSQL database but unlike MongoDb,it

does not support data aggregation. Your database is simply a large JSON object.

Users Node

When users sign up into a firebase application, each user is usually assigned a

unique id. In this case, you will want to store the user’s information at a users node

where each user is identified by their unique id. Using Firebase Firestore in this case,

the structure will be something like this;

32
In the case of users, as shown above, using Firestore, there is a users collection and

each user’s information is stored in a document identified by their user id. Firebase

firestore consists of alternating collections and documents.

Same can be done with the Firebase Realtime database where users will be stored at

a users endpoint with each user information stored at an endpoint identified by their id.

In this case, grabbing a particular user’s info to fill in their profile will not be a

problem.A sample of how it is done with Kotlin is shown here.

33
val auth = FirebaseAuth.getInstance()

val myUid = auth.currentuser!!.uid

val userInfo =
FirebaseFirestore.getInstance.collection("users").d
ocument(myUid)

Messages Node

The hardest part is deciding how the messages will be stored. One option that you might

decide is that you store all messages at a messages node(with realtime database) or a

messages collection(with firestore). In this case, all messages probably have an id and

an author’s id.

But seriously, your application will crash if it gets large as querying will a particular

user’s conversation requires you walking through the whole messages node.

Solution

Come to think of how Whatsapp person to person conversation works. When A starts

34
conversing with B, a new thread is created for the two of them and so on. I almost found

it impossible to do with Firebase until I got a hack.

In order to model such a structure, when person A starts a conversation with B, you

compare their two ids(which are strings) and you append the greater id to the lower id.

What do I mean.

If person A's id is 'aaabbb' and person B's id is 'eeeeeee', you


create a thread between them with a node 'aaabbbeeeeeee' and all
their messages are stored at that node. In this case, when
loading conversations between the two, say in a list, you query
just that endpoint. An example of setting user endpoint is shown
below

/**Function setsup endpoint for one to one chat**/

private String setOneToOneChat(String uid1, String uid2)

//Check if user1’s id is less than user2's

35
if(uid1 <uid2){

return uid1+uid2;

else{

return uid2+uid1;

36
With this structure, we are sure of always starting a new thread between any pair of
users.

If you need a good mobile or web backend for a start, Firebase is indeed a good
choice.

Firestore is more preferable to the real-time database but it is still in beta mode

37
5- Snapshots of forms

Signup/Login page :

38
Chat window :

➤ Now here we chat with the other user

39
Online /offline status

➤ Green dot showing online or active status of a user


And a red dot showing the offline status of the user.

40
➤ Both the user are online because on the profile of users we see
that the green dot is present .

41
➤ in the above figure we see that when the user is typing or replying then on the
chat window of another user the typing action is shown.

42
6- Future Enhancement Conclusion

There is always room for improvements in any app. Right now we are just dealing with
text communication.

There are several web apps which serve similar purposes as this project, but these
apps were rather difficult to use and provide confusing interfaces.

A positive first impression is essential in human relationship as well as in human


computer interaction.

This project hopes to develop a chat service with high quality user interface.

In future we may be extended to include features such as:

1. Voice Message

2. Video Message

3. Audio Call

4. Video Call

43
5. Group Call

References

https://www.slideshare.net/
https://freeprojectz.com/
https://projects.cecs.pdx.edu/
http://chatengine.ios://
https://reactjs.org/
https://firebase.google.com/

44

You might also like