Cs Project50
Cs Project50
CHELAMMAL VIDHYAASHRAM
CBSE SCHOOL
MUSIRI
TOPIC-FINTASTIC
(Expense Tracker)
SUBMITTED BY
NIRANJAN,
YASVANTH,
JAI KESHWAR
CLASS-XII
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
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.
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.
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.
15
lOMoAR cPSD| 51232874
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()
conn.commit()
conn.close()
18
lOMoAR cPSD| 51232874
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()
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()
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(
'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()
20
lOMoAR cPSD| 51232874
conn = mysql.connector.connect(**self.config)
cursor = conn.cursor()
conn.commit()
return True
except Exception as e:
print(f"Error deleting todo: {e}")
return False
finally:
conn.close()
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()
return cursor.fetchone()[0]
finally:
conn.close()
21
lOMoAR cPSD| 51232874
cursor.execute(
'SELECT * FROM expenses ORDER BY date DESC LIMIT %s',
(limit,)
)
return cursor.fetchall()
finally:
conn.close()
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
app = Flask(__name__)
application = app
db = Database()
@app.route('/index.html')
def index():
return render_template('index.html')
22
lOMoAR cPSD| 51232874
item_name = data['itemName']
amount = float(data['amount'])
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)
todos = db.get_todos()
return render_template('todo.html', todos=todos)
@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)
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
Software Requirement:
Client Side:
Server Side:
25
lOMoAR cPSD| 51232874
7. PHP
26
lOMoAR cPSD| 51232874
7.1. MYSQL
➢ MYSQL is a database server
27
lOMoAR cPSD| 51232874
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.
❖ Not user friendly: The present system not user friendly because data is not
stored in structure and proper format.
❖ attendance.
❖ Time consuming
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.
28
lOMoAR cPSD| 51232874
18
lOMoAR cPSD| 51232874
Dashboard page
Expense page
lOMoAR cPSD| 51232874
Expense Details
13. TESTING
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.
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 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.
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.
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.
❖ System security, data security and reliability are the striking features.
18. BIBILIOGRAPHY
➢ Python
➢ Mysql
➢ Web browser