Professional Documents
Culture Documents
PROJECT REPORT
ON
CHAT SYSTEM
Submitted in partial fulfillment of the requirements for the award of
degree of
ANANDH S (190021092724)
Mrs. RAJASREE G
CERTIFICATE
This is to certify that the project report entitled “CHAT SYSTEM" submitted in partial
fulfillment of the degree of Bachelor of Computer Application from the Mahatma Gandhi
University during the period from December 2021 to May 2022 done by ANANDH S
(190021092724). The matter embodied in this project work has not been submitted earlier for
the award of any degree or diploma to the best of my knowledge and belief.
DECLARATION
Signature :
ACKNOWLEDGEMENT
The word acknowledgement is hardly sufficient to convey the deep sense of gratitude
that we have towards all the people who helped us complete this work successfully. We
express our sincere thanks to the staffs of School of Technology & Applied Sciences
Pathanamthitta for providing us the opportunity to work with their highly esteemed
organization.
I would like to express our heartfelt and profound gratitude to Mrs. RAJASREE G,
Project Guide, School of Technology & Applied Sciences, Pathanamthitta for her valuable
support throughout our project and for providing crucial inputs and support during the course
of our work. It is my prime and sacred duty to offer my sincere gratitude to the Project
Guides , for constant help, guidance and supervision in accomplishing the project work.
I am thankful to my friends for their support and help. This Project has been carried out
as part of the requirement of Bachelor of Computer Application and it is submitted with
extreme pleasure and gratitude.
ANANDH S
TABLE OF CONTENTS
2 SYSTEM STUDY 8
3 PROBLEM ANALYSIS 13
4 REQUIREMENT ENGINEERING 19
5 DESIGN 29
6 DATABASE DESIGN 31
7 DATAFLOW DIAGRAM 33
8 USECASE DIAGRAM 36
9 ER DIAGRAM 39
10 CODING 40
11 TESTING 42
12 SECURITY TESTING 44
14 PERFORMANCE TESTING 44
15 IMPLEMENTATION 46
16 SOURCE CODE 49
17 APPENDIX 54
18 FUTURE ENHANCEMENT 60
19 CONCLUSION 62
20 BIBLIOGRAPHY 64
The proposed system Highly Secure Online Chat System is named as 'iChat'.
iChat also provides all the above mentioned services provided by Whatsapp and
Telegram. And some extra features and service that are lacking in the existing
systems. One of the main disadvantage of Whatsapp and other chat applications is, while
texting we don't know who is reading our messages. We sends some text messages to the
target person and he receives it. A read receipt is displayed to the sender. But we cannot fix that
the text message we send is read by the actual receiver. It might be someone else using the
target's smartphone. For solving that the proposed system "iChat" uses Artificial Intelligence
to constantly check and verify that iChat is used by the original user who is logged into.
Thus we can solve the problem of message leaking. For security purpose, iChat uses OTP
services and Two Factor Authentication as well. The messages send through the chat system
is end to end encrypted. And a lot of additional features are added to iChat, that the existing
chat applications lacks.
2. SYSTEM STUDY
2.1 INTRODUCTION
System analysis is the process of gathering data and facts diagnosing problem to the
system. In the development of software structural analysis is required. During this analysis,
information is collected in the form of answers to the question for collecting information
from existing documents. Analysis specifies what the system should do.
Problem definition deals with defining the actual problem involved in the existing
system or the system to be developed. Studies on various areas covered by the existing system are
classified into various divisions and the actual task to be performed in the new system is
determined. The project will be able to demonstrate the ideas of a website which helps the public.
The website is trying to revitalize and simplify the various functions and activities and make
them more people friendly. We dedicated to providing better and speedy services to the public.
System analysis is the detailed study of various operations and their relationship
within and outside the system. It is the first in the developing and managing systems.
System analysis is concerned with becoming aware of the problem, identifying the relevant
and most decisional variables, analyzing and synthesizing the various factors and determining an
optimal or at least as at is factory solution or program of action. A preliminary study was
conducted in details and several fact-finding techniques like record searching, observation,
comparison etc. were used to reach a better decision. The current system for this each activity
was deeply studied and analyzed. All the forms and other printed or non-printed formats for data
collection were checked accurately and findings were compared. Observation was done to great
extend to see the difficulties of the process and time delay in findings the results. Accurate
study was conducted to know the system in a much better manner.
DISADVANTAGES
The main objective of iChat messenger is to provide maximum security to the user who
uses it. The key feature of iChat is the Face ID or Facial Recognition system. This system
records and stores our facial structure using Artificial Intelligense and Machine Learning. The
recorded facial data is later used for frequently checking if the face of current user matches with
existing one. We uses javascript and python both at the same time to accuire this feature. If the
face doesn't match, we will hide the messenger interface with a blurred background.
ADVANTAGES
• The main advantage of iChat is it's security. Using facial recognition, the app make sure
that it's the correct user who is logged in is using the messenger.
• We can add people who are not even in our contact list through ichat. We can
search through the accounts that are present in the database and select them to chat.
• It's possible to hide our profile picture from some specific contacts which is not possible
in whatsapp.
1. AUTHENTICATION MODULE
In this module the user is been logged in or his new account is created. All these datas are
stores in the database for future reference. Form validations and OTP verfications are also
present in this module.
2. ADMIN MODULE
Admin module is used by the site administrator of ichat messenger. Where he can control all
the activities in the chat app.
3. MESSENGER MODULE
This is the main module in iChat. Where users can view profiles, send text messages, share
locations, photos, videos etc and a lot more.
3. PROBLEM ANALYSIS
The initial investigation points to the question whether the project is feasible. The
easibility is conducted to identify the best system that meets all the requirements. This
includes an identification description, an evaluation of proposed systems and the selection of
the best system for the job. The requirements of the system are specified with a set of constraints
such as system objectives and the description of the output. It is the duty of the analyst to
evaluate the feasibility of the proposed system to generate the above results. Three key
factors are to be considered during the feasibility study.
There are three aspects in the feasibility study portion of the preliminary investigation:
• Technical feasibility
• Economic Feasibility
• Operational
The proposed system “iChat” must be evaluated from the technical point of view
first, and if technically feasible their impact on the organization must be assessed. If
compatible, Technical Feasibility Economic Feasibility Operational operational system can be
devised. Then they must be tested for economic feasibility.
The “Chat System” must be evaluated from the technical viewpoint. The assessment
feasibility must be based on an outline design of the system requirement in the terms of
input, output, programs, procedure and employee. Having identified an outline system, the
investigation must go to suggest the type of the equipment, required method developing the
system, method of running the system once it has been designed. The project should be
developed such that the necessary functions and performance are achieved within the
constraints. Though the system may become obsolete after some period of time, due to the
fact that the newer version software supports the older version, this system may still be used.
used.There are a number of technical issues, which are generally raised during the feasibility
stage of the investigation Chat System. A study of function, performance and constraints that may
affect the ability to achieve an acceptable system. Technical feasibility deals with hardware as
well as software requirements. If the necessary requirements are made available with the system
then the proposed system is said to be technically feasible.
2. The cost of hardware and software for the class of application of the project being considered.
To be judged feasible, a proposal for the specific project must pass all these tests, otherwise it is
not considered as a feasible project.
Proposed projects are beneficial only if they can be turned into information systems that
will meet the operating requirements of the organization. This test of feasibility tasks if the system
will work when it is developed and installed.“Chat System” satisfies all the operational conditions.
One of the main problems faced during development of a new system is getting the
acceptance from the user. They were doubtful about the degree of security provided by our
software. We have considered all the operational aspects. Thus the project is operationally
feasible .People are inherently resistant to change, and computers have been known to facilitate
change. An estimate should be made about the reaction of the user, employee towards
the development of a computerized system.
1. Within the organization: How the project is to be implemented? What are various
constraints? What is market strategy?
2. With respect to the customer: Weekly or timely meetings with the customer with
presentations on status reports. Customer feedback is also taken and further modifications
and developments are done. Project milestones and deliverables are also presented to the
customer.
• Risk management: including risk avoidance, risk detection, risk control and risk
recovery
• Scheduling techniques: including work breakdown structure, activity graph, critical path
method, Gantt chart and Program Evaluation Review Technique.
1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2
Project 6 Months
Requirements
4 Weeks
Modelling
Report Preparation
and 7 Weeks
Implementation
4. REQUIREMENT ENGINEERING
Requirement analysis involves studying the current system to find out how it
works and where improvements could be made. A clear idea about the existing system is
a must for making improvements where it is required. Proper planning and collection of
data serves the purpose. The popularity of this document is to describe all the requirements for
the popularity of the application for Chat System. This application helps send and
receive data in a secure manner.
SOFTWARE REQUIREMENTS
• Database :- SQLITE
HARDWARE REQUIREMENTS
• Processor – i3 or Higher
• Hard Disk – 50 GB
4.3.1 PYTHON
• Python is Interpreted − Python is processed at runtime by the interpreter. You do not need to
compile your program before executing it. This is similar to PERL and PHP.
• Python is Interactive − You can actually sit at a Python prompt and interact with the interpreter
directly to write your programs.
• Python is currently the most widely used multi-purpose, high-level programming language.
• Python language is being used by almost all tech-giant companies like – Google, Amazon,
Facebook, Instagram, Dropbox, Uber… etc.
• The biggest strength of Python is huge collection of standard library which can be used for the
following:
• Machine Learning
Applications of Python
• As mentioned before, Python is one of the most widely used language over the web. I'm going
to list few of them here:
• Easy-to-learn − Python has few keywords, simple structure, and a clearly defined syntax. This
allows the student to pick up the language quickly.
• Easy-to-read − Python code is more clearly defined and visible to the eyes.
• A broad standard library − Python's bulk of the library is very portable and cross-platform
compatible on UNIX, Windows, and Macintosh.
• Interactive Mode − Python has support for an interactive mode which allows interactive testing
and debugging of snippets of code.
• Portable − Python can run on a wide variety of hardware platforms and has the same interface
on all platforms.
• Extendable − You can add low-level modules to the Python interpreter. These modules enable
programmers to add to or customize their tools to be more efficient.
• GUI Programming − Python supports GUI applications that can be created and ported to many
system calls, libraries and windows systems, such as Windows MFC, Macintosh, and the X
Window system of Unix.
• Scalable − Python provides a better structure and support for large programs than shell
scripting.
4.3.2 DJANGO
Django is a Python based free and open-source web framework, which follows the model-
template-view (MTV) architectural pattern. Django's primary goal is to ease the creation of
complex, database driven websites. The framework emphasizes reusability and pluggability of
components, less code, low coupling, rapid development, and the principle of don't repeat
yourself. Python is used throughout, even for settings files and data models. Django also provides
an optional administrative create, read, update and delete interface that is generated dynamically
through introspection and configured via admin models.
Despite having its own nomenclature, such as naming the callable objects generating the HTTP
responses views, the core Django framework can be seen as an MVC architecture. It consists of an
object-relational mapper (ORM) that mediates between data models (defined as Python classes) and
a relational database (Model), a system for processing HTTP requests with a web templating system
(View), and a regular-expression-based URL dispatcher (Controller).
• A form serialization and validation system that can translate between HTML forms and values
suitable for storage in the database.
• A template system that utilizes the concept of inheritance borrowed from object- oriented
programming.
• Support for middleware classes that can intervene at various stages of request processing and
carry out custom functions
• A system for extending the capabilities of the template engine An interface to Python's
built-in unit test framework
• Django REST framework is a powerful and flexible toolkit for building Web APIs
4.3.3 SQLITE
SQLite is a relational database that’s compatible with SQL. Unlike other SQL-based systems
such as MySQL and PostgreSQL, SQLite doesn’t use a client-server architecture. The whole
program is contained in a C library, which gets embedded into applications. The database
becomes an integral part of the program, eliminating resource-intensive standalone processes.
SQLite stores its data in a single cross-platform file. As there’s no dedicated server or
specialized filesystem, “deploying” SQLite is as simple as linking its library and creating a new
regular file. This simplicity has resulted in massive adoption of SQLite as the database system of
choice for applications and embedded devices. It’s thought that the total count of SQLite
deployments exceeds that of every other database engine combined, as it’s bundled with all major
operating systems, most programming languages, a vast list of embedded hardware, and many major
software products.
Applications using SQLite benefit from increased resiliency and reduced development
time. Using an SQLite database instead of text files for configuration and storage unifies data
access across devices and helps maintain consistent performance. Databases come with
protections against corruption that you don’t get from regular files. SQLite is atomic and
transactional, so you can avoid partial success events. If one operation in a transaction fails, any
successful ones are reverted as well, putting the database back into its original state. SQLite is also
resilient to storage errors and out-of-memory scenarios. Databases can recover from total system
crashes and power outages, helping to keep data safe. The codebase is covered by a remarkably
pervasive test suite with 100% coverage.
HTML (HyperText Markup Language) is the most basic building block of the
Web. It defines the meaning and structure of web content. Other technologies besides
HTML are generally used to describe a web page's appearance/presentation (CSS) or
functionality/behavior (JavaScript). "Hypertext" refers to links that connect web pages
to one another, either within a single website or between websites. Links are a
fundamental aspect of the Web. By uploading content to the Internet and linking it to
pages created by other people, you become an active participant in the World Wide Web.
HTML uses "markup" to annotate text, images, and other content for display in a Web
browser. HTML markup includes special "elements" such as <head>, <title>, <body>,
<header>, <footer>, <article>, <section>, <p>, <div>, <span>, <img>, <aside>, <audio>,
<canvas>, <datalist>, <details>, <embed>, <nav>, <output>, <progress>, <video>, <ul>,
<ol>, <li> and many others. An HTML element is set off from other text in a document by "tags",
which consist of the element name surrounded by "<" and ">". The name of an element
inside a tag is case insensitive. That is, it can be written in uppercase, lowercase, or a
mixture. For example, the <title> tag can be written as <Title>, <TITLE>, or in any other
way.
Client-Side JavaScript
Client-side JavaScript is the most common form of the language. The script should be
included in or referenced by an HTML document for the code to be interpreted by the browser. It
means that a web page need not be a static HTML, but can include programs that interact with
the user, control the browser, and dynamically create HTML content. The JavaScript client-side
mechanism provides many advantages over traditional CGI server-side scripts. For example, you
might use JavaScript to check if the user has entered a valid e-mail address in a form field. The
JavaScript code is executed when the user submits the form, and only if all the entries are valid, they
would be submitted to the Web Server. JavaScript can be used to trap user-initiated events
such as button clicks, link navigation, and other actions that the user initiates explicitly or
implicitly.
Advantages of JavaScript
The merits of using JavaScript are −
• Less server interaction − You can validate user input before sending the page off to the server.
This saves server traffic, which means less load on your server.
• Immediate feedback to the visitors − They don't have to wait for a page reload to see if they have
forgotten to enter something.
Visual Studio Code is a code editor in layman’s terms. Visual Studio Code is “a free-
editor that helps the programmer write code, helps in debugging and corrects the code using the
intelli-sense method ”. In normal terms, it facilitates users to write the code in an easy manner.
Many people say that it is half of an IDE and an editor, but the decision is up to to the coders.
Any program/software that we see or use works on the code that runs in the background.
Traditionally coding was used to do in the traditional editors or even in the basic editors like
notepad! These editors used to provide basic support to the coders.
Some of them were so basic that it was very difficult in writing basic English level
programs in them. As time went by, some programming languages needed a specific framework
and support for further coding and development it, which was not possible using these
editors. VI Editor, Sublime Text Editor, is one of the many kinds of editors that came into
existence. The most prominent and which supports almost every coding language is VISUAL
STUDIO CODE. Its features let the user modify the editor as per the usage, which means the
user is able to download the libraries from the internet and integrate it with the code as per his
requirements.
Visual Studio Code has some very unique features. They are listed as below :
• Intelli-Sense: It can detect if any snippet of code is left incomplete. Also, common variable
syntaxes and variable declarations are made automatically. Ex: If a certain variable is being
used in the program and the user has forgotten to declare, intelli-sense will declare it for the
user.
• Extensions and Support: Usually supports all the programming languages but, if the
user/programmer wants to use the programming language which is not supported then,
he can download the extension and use it. And performance-wise, the extension doesn’t
slow down the editor as it rums as a different process.
• Repository: With the ever-increasing demand for the code, secure and timely storage
is equally important. It is connected with Git or can be connected with any other
repository for pulling or saving the instances.
• Web-Support: Comes with built-in support for Web applications. So web applications can
be built and supported in VSC.
• Hierarchy Structure: The code files are located in files and folders. The required code
files also have some files, which may be required for other complex projects. These files
can be deleted as per convenience.
• Improving Code: Some code snippets can be declared a bit differently, which might help
the user in the code. This function prompts the user, wherever necessary, to change it
to the suggested option.
• Terminal Support: Many of the times, the user needs to start from the root of the directory
to start with a particular action, in-built terminal or console provides user support to
not to switch in-between two screens for the same.
• Git Support: Resources can be pulled from Git Hub Repo online and vice-versa; saving
can be done too. Resource pulling also means cloning the code which is made available
on the internet. This code can later be changed and saved.
Another feature that naïve-users or anyone can see instantly different from other
editors is the user-friendliness of the Visual Studio Code. The usability is very easy to
handle. The file is arranged hierarchically and has regular software like a toolbar, status bar,
and a sidebar. It also has a floating windows explorer window, which can be fixed at
one place according to convenience, which consists of the directory structure of files.
These files (code files, image folders, etc.) can be opened or renamed from here, and changes
will automatically get reflected in the storage.
5. DESIGN
Design for WebApps encompasses technical and non technical activities that
include: establsishing the look and feel of the WebApp, creating the aesthetic layout of the user
interface, defining the overall architectural structure, developing the content and functionality
that reside within the architecture, and planning the navigation that occurs within the
WebApp. Design allows you to create a model that can be assessed for quality and improved
before content and code are generated, tests are conducted, and end users become
involved in large numbers. Design is the place where WebApp quality is established.
The system design involves first logical design and then physical construction of the
system. The logical design describes structure and characteristics of features, like the
outputs, inputs, databases and procedures. The physical construction which follows the
logical design produces actual program software files and the working system.
System design sits at the technical kernel of the software engineering and is
applied regardless of the software process model that is used. Beginning once software
requirements have been analyzed and specified, software design is the first technical activity
that is used to build and verify the software. Each activity (designing, coding and
testing) transform information in a manner that ultimately results in validated computer
software.
The most important aspect of building an application is the design of database. The
data they store must be organized according to the user requirement. A well designed
database is essential for the good performance of the system. A database table known as a
relation provides information related to specific entity.
The basic functions involved in a database system related to the information required by the user
are:
TABLE DESCRIPTION
ADMIN_USER
CHATROOM
USER
REPORT
STATUS
The data flow diagram (DFD) is one of the most important tools used by system
analysts. Data flow diagrams are made up of a number of symbols, which
represent system components. Most data flow modeling methods use four kinds of symbols.
These symbols are used to represent four kinds of system components. Possesses, data
stores, data flows and external entities are the components. Circles in DFD
represent a process. Data flow is represented by a thin line in DFD and square or rectangle
represents external entities.
Unlike detailed flow chart, data flow diagrams do not supply detailed description
of the modules but graphically describes a system’s data and how the data interact
with the system.
LEVEL 0
request response
LEVEL 1
etails
signup d
user
st
reque Signup
response
admi
credentials n
user detai
n ls
pass ame/ Admin
User wor Operations
d valid
als
credenti
v er
cred alid Reciever iev
enti Operations rec ails
als det
user
LEVEL 1.1
insert user
Add users
User
response
ser
du
ad
insert chatroom
add chatroom Add
chatroom chatroom
response
Admin
read read reports
repo
rts Read
reports reports
ban response
use
rs
insert ban user
Ban
users banned_users
response
LEVEL 1.2
update profile
Update user
ile Profile
rof
a te p response
upd
insert chat
create new chat
Create
chat chatroom
response
User
upda update status
te sta
tus Update
status status
sh response
are
fil share files
es
Share
Files media
response
Scenario based modeling represents requirements from the point of view of various
system
‘actors’. Requirement modeling begins with the creation of scenarios in the form of use case
diagrams.
The actors are connected by lines to the use cases that they carry out. The use cases are placed
in a rectangle but the actors are not .This rectangle is a visual remainder of the system
boundaries and that the actors are outside the system.
Login
Signup
Face id enrolment
Delete User
Update Profile
User Admin
Add new contacts
Text Message
The entity relationship diagram(ERD) addresses these issues and represents all data
objects that are entered, stored, transformed, and produced within an application. Data
modeling tools provide a software engineer with the ability to represent data object, their
characteristics, and their relationships. Used primarily for large database applications and
other information systems projects, data modeling tools provide an automated means for
creating comprehensive entity relation diagrams, data object dictionaries, and related
models.
An E-R diagram may also indicate the cardinality of a relationship. Cardinality is the
number of instances of one entity that can, or must, be associated with each instance of
another entity. In general we may speak of one-to-one, one-to-many, or many-to-many
relationships.
Lines which link attributes to entity sets and entity sets to relationship sets.
ER Diagram
name image
Add name email
image
id
id phone
User Admin
Delete
password
phone
email location
password
Add privillages
location View
Report
id
reason date_
added
target
time_
added
user
6. CODING
The “Chat System” uses Python as the programming language for coding.
Python is an interpreted, interactive, object-oriented programming language. It incorporates
modules, exceptions, dynamic typing, very high level dynamic data types, and classes. It supports
multiple programming paradigms beyond object-oriented programming, such as procedural and
functional programming. Python combines remarkable power with very clear syntax. It has
interfaces to many system calls and libraries, as well as to various window systems, and is
extensible in C or C++. It is also usable as an extension language for applications that need a
programmable interface. Finally, Python is portable: it runs on many Unix variants including
Linux and macOS, and on Windows.
7.TESTING
The purpose of system testing is to identify and correct errors in the candidate
system. Testing is an important element of the software quality assurance and
represents the ultimate review of specification, design and coding. The increasing visibility of
the software as a system element and the costs associated with a software failure are
motivated forces for well planned, through testing.
The common view of testing held by users is that it is performed to prove that
there are no errors in a program. However, as indicated earlier, this is virtually
impossible, since analyst cannot prove that software is free and clear of errors. The tester, who
may be the program fail. A successful test, then, is one that finds an error. Analysts know that
an effective testing program does not guarantee system reliability. Therefore, reliability
must be designed into the system.
Need of Testing
The turn error is used to refer the difference between the actual output of the software and the
correct output. Fault is a condition that causes the software to fail to perform its
required function. Software reliability is defined as the required function.
Software reliability is defined as the probability that the software will not undergo
failure for a specified time under specified condition. Failure is the inability of a system or a
component to perform a required function according to its specification. Different
levels of testing were employed for software to make an error free, fault free and reliable.
Basically in software testing four type of testing methods are adopted.
Security testing is the process to determine that an information system protects data and
maintain functionality as intended. During security testing, the tester plays roles of the individual
who desires to penetrate the system. The tester may attempt to acquire passwords through
external clerical means; may attack the system with custom software designed to breakdown any
defenses that have been constructed; may overwhelm the system, thereby denying service to
others; may cause system errors, hoping to find the key to system entry. Digital Fortress was
tested for successful acceptance .User can enter to the website without register
This tests the whole end to end scenario (which simulates exactly what the user would be
doing). This (for the most part) goes through all the mouse clicks and keyboard presses the
user goes through to get an action done. If we extend the previous example this would be
invoking the same action except that this time instead of using any test hooks it would be
using the keyboard
Performance testing is designed to test the run time performance of software within the
context of an integrated system. Performance testing occurs throughout all steps in the testing
process. Even at the unit level, performance of individual module may be assessed as white box
tests are conducted, it is not until all system elements are fully integrated that true
performance of a system can be ascertained. This system was tested for successful acceptance
and was found to be working properly.
A test case is a document that describes an input, action or event and an expected
response, to determine if a feature of an application is working correctly. A test case
should contain particulars such as test case identifier, test case name, test conditions, input
data requirements steps, and expected results.
Test cases
Project Title : Online Chat App
Software Tool : HTML, CSS, JavaScript, PYTHON
8. IMPLEMENTATION
Implementation means putting the newly developed system into operation. It is the phase
in the project plan where the theoretical design is put into real test. This is the most crucial stage
in the life cycle of a project. During implementation there has to be a strong interaction
between the developers and the users. This is the phase where the new system is given a
chance to prove its worth and to minimize the reluctance to change. The proposed
system may be entirely new, replacing an existing one or may be modifications to the existing
system. In either case, proper implementation is necessary to generate a confidence among
users. If the users have achieved satisfaction with the new project, then the project can be
termed as successful and then onwards its maintenance and other subsequent works
can be started. The system goes for implementation only after passing through
some rigorous testing, especially when it comes to operating systems and other system
software.
Careful planning.
Investigation of system and constraints.
Design of methods to achieves the changeover.
Training of the staff in the changeover phase.
9. SOURCE CODE
# Signup
def signup(request):
if request.method == 'POST':
phone = request.POST['phone']
email = request.POST['email']
queryset = User.objects.all()
for user in queryset:
if user.phone == phone:
if user.email == email:
return render(request, 'user_exists.html')
image = request.FILES['image']
fs = FileSystemStorage(location='static/temp/')
filename = fs.save(image.name, image)
# path = default_storage.save(f'temp/{image.name}', image)
request.session['image_name'] = image.name
request.session['temp_name'] = request.POST['name']
request.session['temp_about'] = request.POST['about']
request.session['temp_phone'] = request.POST['phone']
request.session['temp_email'] = request.POST['email']
password = request.POST['password']
cpassword = request.POST['cpassword']
if password == cpassword:
request.session['hashed_password'] = make_password(password)
return redirect(verification)
return render(request, 'signup.html')
# Signup End
if request.method == 'POST':
otp = int(request.POST['otp'])
session_otp = request.session['otp']
if otp == session_otp:
image_name = request.session['image_name']
name = request.session['temp_name']
about = request.session['temp_about']
phone = request.session['temp_phone']
email = request.session['temp_email']
hashed_password = request.session['hashed_password']
user = User()
user.image = image_name
user.name = name
user.about = about
user.phone = phone
user.email = email
user.password = hashed_password
user.save()
del request.session['image_name']
del request.session['temp_name']
del request.session['temp_phone']
del request.session['temp_email']
del request.session['hashed_password']
del request.session['otp']
queryset = User.objects.order_by('-id')[:1]
for user in queryset:
request.session['user_id'] = user.id
request.session['user_name'] = user.name
request.session['user_about'] = user.about
request.session['user_image'] = user.image
request.session['user_phone'] = user.phone
request.session['user_email'] = user.email
return redirect(messenger)
else:
return redirect(verification)
# User Verify Phone End
if request.method == 'POST':
otp = int(request.POST['otp'])
session_otp = request.session['otp']
if otp == session_otp:
image_name = request.session['image_name']
name = request.session['temp_name']
about = request.session['temp_about']
phone = request.session['temp_phone']
email = request.session['temp_email']
hashed_password = request.session['hashed_password']
user = User()
user.image = image_name
user.name = name
user.about = about
user.phone = phone
user.email = email
user.password = hashed_password
user.save()
del request.session['image_name']
del request.session['temp_name']
del request.session['temp_phone']
del request.session['temp_email']
del request.session['hashed_password']
del request.session['otp']
queryset = User.objects.order_by('-id')[:1]
for user in queryset:
request.session['user_id'] = user.id
request.session['user_name'] = user.name
request.session['user_about'] = user.about
request.session['user_image'] = user.image
request.session['user_phone'] = user.phone
request.session['user_email'] = user.email
return redirect(messenger)
else:
return redirect(verification)
# User Verify Email End
# Login
def login(request):
if request.method == 'POST':
phone = request.POST['phone']
email = request.POST['email']
password = request.POST['password']
queryset = User.objects.all()
for user in queryset:
if user.phone == phone:
if user.email == email:
if check_password(password, user.password):
request.session['temp_phone'] = phone
request.session['temp_email'] = email
request.session['user_tfa_id'] = user.id
request.session['user_tfa_name'] = user.name
return redirect(tfa)
return redirect(login_failed)
return render(request, 'login.html')
# Login End
10. APPENDIX
APP SCREENSHOTS
HOME PAGE
LOGIN
ADMIN PAGE
CONFIRMATION PAGE
FUTURE ENHANCEMENT
12. CONCLUSION
CONCLUSION
The main objective of the project was to develop a Secure Chat Application. I had taken a
wide range of literature review in order to achieve all the tasks, where I came to know about
some of the products that are existing in the market. I made a detailed research in that path to
cover the loop holes that existing systems are facing and to eradicate them in our application. In
the process of research I came to know about the latest technologies and different algorithms. I
investigated the characteristics of a good software system, and considered what a development
process would need to include to build such software. You saw that there is no single
development process to suit the variety of users’s requirements. However there must be a
disciplined approach to software development, especially in the case of large projects.
I introduced the notion that it is good practice to split a project into smaller, more
manageable activities. When developing good software systems, you should focus on the users’s
needs and, wherever possible, make use of replaceable and reusable modules - components. The
overall software architecture should be constructed around the users’s requirements.
I then introduced the role of modelling in the development of software. In particular, the
concepts of object orientation allow us to represent users’s requirements in a way that reflects our
natural tendency to view the world around us in terms of objects. The way we relate the various
activities of software development and associated artefacts (including models) was then
described.
13. BIBLIOGRAPHY
REFERENCES
WEB
[1] https://stackoverflow.com/
[2] https://www.w3schools.com/
[3] https://en.wikipedia.org/wiki/Main_Page
BOOKS
[1] The Joy of PYTHON Programming: A Beginner’s Guide to Programming Interactive Web
Applications with PYTHON and SQLite
[2] HTML and CSS: Design and Build Websites – by Jon Duckett
[3] Effective JavaScript: 68 specific ways to harness the power of JavaScript by David Herman