0% found this document useful (0 votes)
12 views28 pages

Cs Project50

Yh

Uploaded by

indhupvt1980
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views28 pages

Cs Project50

Yh

Uploaded by

indhupvt1980
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

lOMoAR cPSD| 51232874

CHELAMMAL VIDHYAASHRAM
CBSE SCHOOL
MUSIRI

COMPUTER SCIENCE PROJECT (2024-25)

TOPIC-FINTASTIC
(Expense Tracker)

SUBMITTED BY
NIRANJAN,
YASVANTH,
JAI KESHWAR
CLASS-XII

Under The Guidance Of


Mrs. ARTHI (PGT C.S)
Mrs. AYESHA (PGT C.S)

11
lOMoAR cPSD| 51232874

1. INTRODUCTION
Daily Expense Tracker System is designed to keep a track of Income-Expense of
an organization on a day-to-day basis. This System divides the Income based on daily
expenses. If exceed day’s expense, system will calculate income and will provide new
daily expense allowed amount. Daily expense tracking System will generate report at
the end of month to show Income-Expense graph. And employees send reports to the
manager for verification. Manager send final reports to administrator. Based on the
final reports system predict the next month expense. It will helps to manage over all
expense and income Businesses utilize expense management software to process, pay,
and audit employee-initiated expenses. The software includes capabilities for
employees to input expenses for approval through a forms. Expense management
software simplifies and automates a business’ expense entry, eliminates paper trail,
and reduces administrative effort. Expense management software allows
administrators to have full visibility of and track employee use of business financial
resources. Expense management software analyzes overall expenses, identifies cost-
saving opportunities, and controls excessive spending
“Expense Tracker” is developed to manage the daily expenses in a more efficient and
manageable way. By using this application, we can reduce the manual calculations of
the daily expenses and keep track of the expenditure. In this application, user can
provide his income to calculate his total expenses per day and these results will be
stored for each user. The application has the provision to predict the income and
expense for the manager using data mining. Budgeting systematically and Expense
Tracking takes a crucial role in managing the expenses of business organizations.
Expense tracking (for managing the employee developed expenses) will bring in
several advantages for an organization. That are helpful for the stake-holders in
processes of expense. The expense tracker will help any organization to deal with all
their expenses more efficiently. By using software for managing expense tracking will
help to control unnecessary expenses. There are several benefits and advantages of
using online expense trackers, expense tracking makes any organization run faster and
smoother.

12
lOMoAR cPSD| 51232874

2. OBJECTIVE

The objective of a daily expense tracker is to help individuals or businesses


monitor and manage their daily spending in a systematic and organized manner. Here
are some key objectives and benefits of using a daily expense tracker:

1. Financial Awareness: One of the primary objectives is to create awareness about


your spending habits. Tracking expenses allows you to see where your money is
going, which can be eye-opening and help you make more informed financial
decisions.

2. Budgeting: A daily expense tracker aids in budgeting by providing a clear picture


of your income and expenditures. It helps you set realistic financial goals and allocate
funds to different expense categories.

3. Financial Planning: By analyzing your spending patterns over time, you can
identify areas where you can cut back or save more. This enables better financial
planning and helps you work towards long-term financial goals.

4. Identifying Trends: Tracking daily expenses helps you identify spending trends
and patterns. This information can be valuable for making adjustments to your
lifestyle or financial habits.

5. Emergency Fund Building: A daily expense tracker helps you allocate a portion
of your income towards an emergency fund. This fund can be crucial in times of
unexpected expenses or financial hardships.

6. Debt Management: If you have outstanding debts, tracking your daily expenses
can help you allocate more funds towards debt repayment. This is essential for
managing and reducing debt over time.

13
lOMoAR cPSD| 51232874

7. Tax Planning: Keeping a record of daily expenses can simplify the process of
preparing for tax season. You can easily identify deductible expenses and have the
necessary documentation in place.

8. Avoiding Overspending: By monitoring your daily expenses, you become more


conscious of your spending habits, making it easier to avoid impulsive purchases and
overspending.

9. Financial Accountability: Recording daily expenses creates a sense of


accountability. It encourages you to take responsibility for your financial decisions
and motivates you to make positive changes.

10. Peace of Mind: Knowing where your money is going and having control over
your finances can lead to a sense of peace and security. It reduces financial stress and
allows you to focus on other aspects of your life.

Ultimately, the objective of a daily expense tracker is to empower individuals or


businesses with the tools and information needed to make informed financial
decisions, save money, and work towards achieving their financial goals.

14
lOMoAR cPSD| 51232874

3. SYSTEM ANALYSIS

System analysis focuses on specifying for what the system or the application is
required to do. It allows the individuals to see the logical elements (what the system
should do) apart from the physical components it uses (computers, terminals and
storage system). It is the process of gathering and interpreting facts, diagnosing
problems and using the information to recommend improvements to the system.

I. Functional Requirements
a. User must have a login id using which they can enter the interface.
b. A module to be able to add a new user details.
c. A module to be able to edit a record.
d. A module to be able to go through user details without modification to its
records.
e. A module to send information automatically to users.
f. Report Generation and transfer over network to users.

II. Non Functional Requirements


a. Accuracy
b. Non-Redundancy
c. Fast response
d. Low maintenance cost
e. Must not be heavy on the server

15
lOMoAR cPSD| 51232874

3.1 System Analysis


System Analysis phase is divided into many sub-phases to make analysis work
easy. This phase is not easy phase, but very cumbersome and complex. This phase of
SDLC is tricky and time consuming also.

3.2 Feasibility Study


A feasibility study is a test of a system proposal according to its workability
impact on organization, ability to meet user needs and effective use of resources. The
objective of a feasibility study is not to solve a problem but to acquire a sense of its
scope. During the study, the problem definition is crystallized and the aspects of the
problem to be included in the system are determined. After the initial investigation of
the system that helped to have indepth study of the existing system, understanding its
strength and weaknesses and the requirements for the new proposed system.

Feasibility study was done in three phases documented below:


a. Operational feasibility
b. Technical feasibility
c. Economical feasibility

16
lOMoAR cPSD| 51232874

a. Operational feasibility
People are inherently resistant to change and computers have been known to
facilitate change. There is always some reluctance among the users against the
introduction of new system but they were told that this system would eliminate the
unnecessary overhead of database migration and conversion, which presently had to
be carried out on daily basis to facilitate transactions between the different
departments. The objective this feasibility phase is to take the operational staff into
confidence. As the success of a good system depends upon the willingness of the
operating staff, they were taken into full confidence that the new proposed system
would make their jobs easier, relieve them from the unnecessary overheads and reduce
the possibility of errors creeping into the system.

b. Technical feasibility
Technical feasibility centre’s on the existing computer system. (Hardware /
software) and to what extent it can support the proposed addition also the organization
already has sufficient high-end machines to serve the processing requirements of the
proposed system. So there is no need to purchase new software as the organization has
necessary software. Having gone through the steps of the overall analysis and
feasibility study the next step was to carry out a detailed system analysis. The project
analysis phase was conducted to learn about the proposed system, to study the
problems and finally select a system that would take care of the problems identified in
the working of the present system.

c. Economic feasibility:
Economic feasibility is the most frequently used method for evaluating the
effectiveness of the candidate system. More commonly known as cost\benefit analysis,
the procedure is to determine the benefits and savings that are expected from a
candidate system and compare them with the costs. If benefits outweigh the costs,
then the decision is made to design and implement the system. A cost\benefit analysis
was done for the proposed system to evaluate whether it would be economically viable
or not. The organization has in store many machines with high processing power
necessary to implement the system. Also the organization has necessary software or
hardware to support the system. Considering the programmer time and the negligible
hardware/software cost required for developing the system, it was found that the
benefits in terms of reduced overhead as a result of elimination of the requirement of
database migration and conversion was more than the cost.

17
lOMoAR cPSD| 51232874

4. SOURCE CODE

Database

import mysql.connector
from datetime import datetime

class Database:
def __init__(self):
self.config = {
'host': 'mysql-be87924-twinnroshan-cb1d.e.aivencloud.com',
'port':13800,
'user': 'avnadmin',
'password': 'AVNS_-YIlZA7a6LJpLNE7OS7',
'database': 'defaultdb'
}
self.init_db()

def init_db(self):
conn = mysql.connector.connect(**self.config)
cursor = conn.cursor()

# Create expenses table


cursor.execute('''
CREATE TABLE IF NOT EXISTS expenses (
id INT AUTO_INCREMENT PRIMARY KEY,
date DATE,
category VARCHAR(50),
item_name VARCHAR(255),
amount DECIMAL(10,2)
)
''')

# Create todos table


cursor.execute('''
CREATE TABLE IF NOT EXISTS todos (
id INT AUTO_INCREMENT PRIMARY KEY,
task VARCHAR(255),
due_date DATE,
completed BOOLEAN DEFAULT FALSE
)
''')

conn.commit()
conn.close()

18
lOMoAR cPSD| 51232874

def add_expense(self, date, category, item_name, amount):


try:
conn = mysql.connector.connect(**self.config)
cursor = conn.cursor()

cursor.execute(
'INSERT INTO expenses (date, category, item_name, amount) VALUES
(%s, %s, %s, %s)',
(date, category, item_name, amount)
)

conn.commit()
return True
except Exception as e:
print(f"Error adding expense: {e}")
return False
finally:
conn.close()

def get_expenses(self, start_date, end_date, category=None):


try:
conn = mysql.connector.connect(**self.config)
cursor = conn.cursor(dictionary=True)

if category:
cursor.execute(
'''SELECT * FROM expenses
WHERE date BETWEEN %s AND %s
AND category = %s
ORDER BY date''',
(start_date, end_date, category)
)
else:
cursor.execute(
'''SELECT * FROM expenses
WHERE date BETWEEN %s AND %s
ORDER BY date''',
(start_date, end_date)
)

return cursor.fetchall()
finally:
conn.close()

def add_todo(self, task, due_date):


try:
conn = mysql.connector.connect(**self.config)

19
lOMoAR cPSD| 51232874

cursor = conn.cursor()

cursor.execute(
'INSERT INTO todos (task, due_date) VALUES (%s, %s)',
(task, due_date)
)

conn.commit()
return True
except Exception as e:
print(f"Error adding todo: {e}")
return False
finally:
conn.close()

def get_todos(self):
try:
conn = mysql.connector.connect(**self.config)
cursor = conn.cursor(dictionary=True)

cursor.execute('SELECT * FROM todos ORDER BY due_date')


return cursor.fetchall()
finally:
conn.close()

# Add these methods to your Database class

def toggle_todo(self, todo_id):


try:
conn = mysql.connector.connect(**self.config)
cursor = conn.cursor()

cursor.execute(
'UPDATE todos SET completed = NOT completed WHERE id = %s',
(todo_id,)
)

conn.commit()
return True
except Exception as e:
print(f"Error toggling todo: {e}")
return False
finally:
conn.close()

def delete_todo(self, todo_id):


try:

20
lOMoAR cPSD| 51232874

conn = mysql.connector.connect(**self.config)
cursor = conn.cursor()

cursor.execute('DELETE FROM todos WHERE id = %s', (todo_id,))

conn.commit()
return True
except Exception as e:
print(f"Error deleting todo: {e}")
return False
finally:
conn.close()

def get_total_expenses(self, start_date, end_date):


try:
conn = mysql.connector.connect(**self.config)
cursor = conn.cursor()

cursor.execute(
'SELECT SUM(amount) FROM expenses WHERE date BETWEEN %s
AND %s',
(start_date, end_date)
)

result = cursor.fetchone()[0]
return float(result) if result else 0
finally:
conn.close()

def get_pending_tasks_count(self):
try:
conn = mysql.connector.connect(**self.config)
cursor = conn.cursor()

cursor.execute('SELECT COUNT(*) FROM todos WHERE completed =


FALSE')

return cursor.fetchone()[0]
finally:
conn.close()

def get_recent_expenses(self, limit):


try:
conn = mysql.connector.connect(**self.config)
cursor = conn.cursor(dictionary=True)

21
lOMoAR cPSD| 51232874

cursor.execute(
'SELECT * FROM expenses ORDER BY date DESC LIMIT %s',
(limit,)
)

return cursor.fetchall()
finally:
conn.close()

def get_category_totals(self, start_date, end_date):


try:
conn = mysql.connector.connect(**self.config)
cursor = conn.cursor()

cursor.execute(
'''SELECT category, SUM(amount)
FROM expenses
WHERE date BETWEEN %s AND %s
GROUP BY category''',
(start_date, end_date)
)

return dict(cursor.fetchall())
finally:
conn.close()

Server

from flask import Flask, render_template, request, jsonify


from database import Database
from datetime import datetime
import os

app = Flask(__name__)
application = app
db = Database()

@app.route('/index.html')
def index():
return render_template('index.html')

@app.route('/add_expense', methods=['GET', 'POST'])


def add_expense():
if request.method == 'POST':
data = request.get_json()
date = data['date']
category = data['category']

22
lOMoAR cPSD| 51232874

item_name = data['itemName']
amount = float(data['amount'])

success = db.add_expense(date, category, item_name, amount)


return jsonify({'success': success})

return render_template('add_expense.html')

@app.route('/view_report')
def view_report():
return render_template('view_report.html')

@app.route('/get_expenses', methods=['POST'])
def get_expenses():
data = request.get_json()
start_date = data['startDate']
end_date = data['endDate']
category = data.get('category', None)

expenses = db.get_expenses(start_date, end_date, category)


return jsonify(expenses)

@app.route('/todo', methods=['GET', 'POST'])


def todo():
if request.method == 'POST':
data = request.get_json()
task = data['task']
due_date = data['dueDate']

success = db.add_todo(task, due_date)


return jsonify({'success': success})

todos = db.get_todos()
return render_template('todo.html', todos=todos)

# Add these routes to your existing app.py

@app.route('/todo/<int:id>/toggle', methods=['POST'])
def toggle_todo(id):
success = db.toggle_todo(id)
return jsonify({'success': success})

@app.route('/todo/<int:id>', methods=['DELETE'])
def delete_todo(id):
success = db.delete_todo(id)
return jsonify({'success': success})

@app.route('/api/dashboard-data')

23
lOMoAR cPSD| 51232874

def dashboard_data():
try:
today = datetime.now().date()
month_start = today.replace(day=1)

# Get today's total


today_total = db.get_total_expenses(today, today)

# Get month's total


month_total = db.get_total_expenses(month_start, today)

# Get pending tasks count


pending_tasks = db.get_pending_tasks_count()

# Get recent expenses (last 5)


recent_expenses = db.get_recent_expenses(4)

# Get category totals for current month


category_totals = db.get_category_totals(month_start, today)

return jsonify({
'todayTotal': today_total,
'monthTotal': month_total,
'pendingTasks': pending_tasks,
'recentExpenses': recent_expenses,
'categoryTotals': category_totals
})
except Exception as e:
print(f"Error getting dashboard data: {e}")
return jsonify({
'todayTotal': 0,
'monthTotal': 0,
'pendingTasks': 0,
'recentExpenses': [],
'categoryTotals': {}
})

if __name__ == '__main__':
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port, debug=True)

24
lOMoAR cPSD| 51232874

6. REQUIREMENT SPECIFICATION
Hardware Configuration:

Client Side:

RAM 512 MB
Hard disk 10 GB
Processor 1.0 GHz

Server side:

RAM 1 GB

Hard disk 20 GB

Processor 2.0 GHz

Software Requirement:

Client Side:

Google Chrome or any compatible


Web Browser
browser

Operating System Windows or any equivalent OS

Server Side:

Web Server FLASK

Server side Language PHP5.6 or above version

Database Server MYSQL


Google Chrome or any compatible
Web Browser
browser
Operating System Windows or any equivalent OS

25
lOMoAR cPSD| 51232874

7. PHP

➢ PHP stands for PHP: Hypertext Preprocessor.

➢ PHP is a server-side scripting language, like ASP.

➢ PHP scripts are executed on the server.

➢ PHP supports many databases (MYSQL, Informix, Oracle, Sybase, Solid,


Generic ODBC, etc.).

➢ PHP is an open source software.

➢ PHP is free to download and use.

26
lOMoAR cPSD| 51232874

7.1. MYSQL
➢ MYSQL is a database server

➢ MYSQL is ideal for both small and large applications

➢ MYSQL supports standard SQL

➢ MYSQL compiles on a number of platforms

➢ MYSQL is free to download and use

27
lOMoAR cPSD| 51232874

8. ANALYSIS AND DESIGN

Analysis:
In present all work done on the paper. The whole details is stored in the registers.
We can’t generate reports as per our requirements because its take more time to make
report of old people.

Disadvantage of present system:

❖ Not user friendly: The present system not user friendly because data is not
stored in structure and proper format.

❖ Manual Control: All report calculation is done manually so there is a chance


of error.

❖ Lots of paper work: Attendance maintain in the register so lots of paper


require storing

❖ attendance.

❖ Time consuming

8.1. Design Introduction:


Design is the first step in the development phase for any techniques and principles for
the purpose of defining a device, a process or system in sufficient detail to permit its
physical realization.

Once the software requirements have been analyzed and specified the software design
involves three technical activities - design, coding, implementation and testing that
are required to build and verify the software.

The design activities are of main importance in this phase, because in this activity,
decisions ultimately affecting the success of the software implementation and its ease
of maintenance are made. These decisions have the final bearing upon reliability and
maintainability of the system. Design is the only way to accurately translate the
customer’s requirements into finished software or a system.

Design is the place where quality is fostered in development. Software design is a


process through which requirements are translated into a representation of software.

28
lOMoAR cPSD| 51232874

9.2. CLASS DIAGRAM

A description of set of objects that share the same attributes operations,


relationships, and semantics.

18
lOMoAR cPSD| 51232874

12. DESIGN IMPLEMENTATION AND


RESULTS
Design implementation refers to the real live running of the designed program.
This section consists of the program modules, showing what they do, and how the
system can be deployed.

Dashboard page

Expense page
lOMoAR cPSD| 51232874

Expense Details

Date wise expense report


lOMoAR cPSD| 51232874

13. TESTING

Software testing is any activity aimed at evaluating an attribute or capability of a


program or system and determining that it meets its required results. Although crucial
to software quality and widely deployed by programmers and testers, software testing
still remains an art, due to limited understanding of the principles of software. The
difficulty in software testing systems from the complexity of software: we cannot
completely test a program with moderate complexity. Testing is more than just
debugging. The purpose of testing can be quality assurance, verification and
validation or reliability estimation. Testing can be used as a generic metric as well.
Correctness testing and reliability testing are two major areas of testing. Software
testing is a trade-off between budget, time and quality.

Testing Objectives
The main objective of testing is to uncover a host of errors, systematically and with
minimum effort and time. Stating formally, we can say,
❖ Testing is a process of executing a program with the intent of finding an
error.
❖ A successful test is one that uncovers an as yet undiscovered error.
❖ A good test case is one that has a high probability of finding error, if it
exists.
❖ The tests are inadequate to detect possibly present errors.
❖ The software more or less confirms to the quality and reliable standards.

Types of test performed


The tests are performed at two levels:
Module
Project level
lOMoAR cPSD| 51232874

13.1. Unit testing


Unit testing focuses verification effort on the smallest unit of software i.e. the
module. Using the detailed design and the process specifications testing is done to
uncover errors within the boundary of the module. All modules must be successful in
the unit test before the start of the integration testing begins.

In this project each service can be thought of a module. There are so many
modules like Login, Registration, Homepage, and Normal User. Giving different sets
of inputs has tested each module. When developing the module as well as finishing
the development so that each module works without any error. The inputs are validated
when accepting from the user.

In this application developer tests the programs up as system. Software units in a


system are the modules and routines that are assembled and integrated to form a
specific function. Unit testing is first done on modules, independent of one another to
locate errors. This enables to detect errors. Through this error resulting from
interaction between modules initially avoided.
lOMoAR cPSD| 51232874

13.2 Integration testing


Integration testing is a type of testing which involves testing the integrity of various
modules
i.e. whether several different modules or units outputs desired result when they are
integrated or made to work together or not.

In this project integrating all the modules forms the main system. When integrating
all the modules I have checked whether the integration effects working of any of the
services by giving different combinations of inputs.

The purpose of integration testing is to verify the functional, performance, and


reliability between the modules that are integrated.
lOMoAR cPSD| 51232874

13.3. System testing

System Testing (ST) is a black box testing technique performed to evaluate the
complete system the system's compliance against specified requirements. In System
testing, the functionalities of the system are tested from an end-to-end perspective.

System Testing is usually carried out by a team that is independent of the


development team in order to measure the quality of the system unbiased. It includes
both functional and NonFunctional testing.
lOMoAR cPSD| 51232874

17. CONCLUSION

The application was designed in such a way that future modifications can be done easily.
The following conclusion can be deduced from the development of the project.

❖ Automation of the entire system improves the efficiency.

❖ It provides a friendly graphical user interface which proves to be better when


compared to the
▪ existing system.

❖ It gives appropriate access to the authorized users depending on their


permissions.

❖ It effectively overcomes the delay in communications.

❖ Updating of information becomes so easier.

❖ System security, data security and reliability are the striking features.

❖ The System has adequate scope for modification in future if it is necessary.


lOMoAR cPSD| 51232874

18. BIBILIOGRAPHY

➢ Python

➢ Mysql

➢ Class 12 computer science book

➢ Web browser

You might also like