Smart Expense Tracker: Gamified Finance App
Smart Expense Tracker: Gamified Finance App
INTRODUCTION TO PROJECT
The modern landscape of personal finance management demands tools that are not only
accurate but also engaging and instantaneous. This project presents the development of the
"Smart Expense Tracker," a robust mobile application designed to transition personal
financial accountability from tedious manual computation to an efficient, organized, and
rewarding digital process.
The fundamental purpose of this application is to monitor spending, manage individual
budgets, and, critically, incentivize positive financial behavior through a token rewards
system. By eliminating reliance on manual record-keeping or simple spreadsheet-based
tracking, which are known to be time-consuming and error-prone , the Smart Expense
Tracker provides a valuable utility for users seeking to manage and closely supervise their
monetary flows.
Vision: The vision is to be an active financial coaching tool that empowers users to achieve long-term
fiscal health and discipline. This is accomplished by leveraging a novel gamification system to convert
the passive task of tracking into an active, motivating behavioral process. Ultimately, the goal is to
guide users and raise their awareness about daily expenses to help them overcome financial wastage.
Services Offered
The objectives are to provide an accessible interface for users to log income and expenses
instantaneously. To automatically calculate and display daily and monthly spending totals
compared to the monthly salary. To generate clear, graphical representations for
investigating spending patterns. To maintain a detailed, searchable expense history.
Functional Objectives :
The following are some of the functional objectives of expense tracker app –
2
• Real-Time Data Capture: To provide a simple and accessible interface for users to log
income and expenses instantaneously at the point of transaction.
spending totals, comparing them against the user’s designated monthly salary.
• Incentivize Saving: To establish a clear, achievable financial goal (saving ₹2000 or more
every month) and provide immediate, tangible rewards (Tokens) upon meeting that
milestone.
of dopamine associated with achievement —to encourage self-managed goal setting and
consistent expense tracking.
3
CHAPTER - 2 INTRODUCTION TO PROJECT
The "Smart Expense Tracker" is a highly functional Personal Financial Management System (PFMS)
delivered as a cross-platform mobile application. Its central purpose is to solve the pervasive problem
of financial mismanagement rooted in manual, error-prone record-keeping. The application moves
beyond being a mere digital ledger; it is designed to be a behaviorally reinforcing tool that ensures
financial accountability is efficient, organized, and rewarding.
The system is a contemporary evolution of classical accounting principles, modeling income, expenses,
and assets. By demanding real-time logging of transactions, it provides an immediate, accurate snapshot
of the user's financial standing, allowing them to proactively compare their current spending against
planned budgets.
The Smart Expense Tracker project is a robust, cross-platform mobile application designed to redefine
Personal Financial Management (PFM) by transitioning individual financial accountability from
tedious, error-prone manual record-keeping to an efficient, organized, and rewarding digital process.
Its core mission is to monitor spending and manage budgets, but its distinct value proposition lies in its
gamified reward system, which converts the traditionally passive chore of budgeting into an active,
motivating behavioral process.
This system offers users tangible Tokens upon achieving preset savings goals (e.g., saving ₹2000 per
month), serving as a powerful incentive for positive financial behavior and fostering long-term fiscal
discipline, aligning with the project's vision to be an active financial coaching tool.
Functionally, the application provides real-time data capture of income and categorized expenses,
automated calculations of the remaining balance, comprehensive data visualization through graphical
reports, and a detailed audit trail of all transactions.
This is achieved by creating a robust, real-time application that allows users to instantaneously log
income and categorized expenses, automatically calculate their remaining balance against a set salary
benchmark, and generate detailed graphical reports for audit and analysis.
However, the project's purpose extends critically into the behavioral domain: it is designed not merely
as a passive ledger, but as an active financial coaching tool. The core purpose is to modify user habits
by making the act of saving desirable and rewarding.
This is accomplished through a gamified token rewards system that positively reinforces financial
discipline by issuing tokens upon the achievement of measurable savings goals (e.g., saving ₹2000 per
month), ultimately empowering users to foster self-regulation, overcome financial wastage, and achieve
long-term fiscal health.
The scope of the Smart Expense Tracker is deliberately focused on personal financial management for individuals
who require a streamlined, error-minimizing solution.
The primary users are individuals seeking to gain visibility and control over their daily and monthly spending.
This includes people who are currently using error-prone manual methods, resulting in misplaced decimal
points or incorrectly entered figures that lead to significant financial discrepancies. The mobile platform
ensures that tracking can be done "at the point of purchase," eliminating the delay inherent in traditional
month-end reconciliation.
Functional Scope
10
Secure Authentication: Providing registration and login functionality, including the capture of the
user's initial Monthly Salary as the benchmark for budget tracking.
Transaction Management: Allowing users to add new expenses, choose categories, and view a history
of their transactions.1 User-defined categories are included to ensure the system adapts to unique
spending patterns.
Real-Time Dashboard: Displaying the critical financial metrics instantly: Total Salary, Total Expenses,
and Remaining Balance.
Gamified Rewards: Implementing the precise logic for tracking monthly savings against the ₹2000
threshold and issuing Tokens upon achievement.
a) Programming Languages
Backend Python
Library / Purpose
Framework
[Link]
To create charts
c) Backend:
Flask – login
For session management
Visual Studio Code (VS Code) is a free, lightweight, and powerful source code editor
developed by Microsoft. It is widely used for web and software development due to its speed,
simplicity, and wide range of features.
VS Code is the most likely primary tool due to its cross-language flexibility, lightweight
nature, and comprehensive extension support for both the Python backend and the web
frontend.
Primary Purpose: A lightweight, yet powerful source code editor that bridges the gap
between simple text editors and full-fledged IDEs.
Git Integration: Seamless integration with Git, essential for version control and team
collaboration, which is crucial for any substantial project.
The decision to use a cloud-based solution like Firebase, rather than local, device- specific storage
such as SQLite, is critical for addressing fundamental data integrity issues. If data is stored only in a
local SQLite database, the entire history of transactions and rewards "dies with the phone" if the
device is lost or broken. Firebase, conversely, ensures that all expense history, user profiles, and the
crucial Token Rewards ledger are persistently stored in the cloud, guaranteeing cross-device
synchronization and robust data backup.
Authentication: Firebase handles the secure processes required for user registration and login,
which are mandatory features dictated by the screen designs.
Scalable Data Storage (Firestore): Firestore's NoSQL structure offers the flexibility needed to
store structured data like user profiles, categories, and complex transaction entities.
Real-Time Capabilities: The NoSQL database structure facilitates real-time data retrieval,
which is essential for instantly updating the dashboard's key metrics, such as Total Expenses
and Remaining Balance, immediately after a new expense is logged.
14
CHAPTER – 3 REQUIREMENTS
SPECIFICATIONS
Manual systems involve collecting physical receipts, transcribing information into a physical journal
or digital spreadsheet, and periodically reconciling accounts, often at the end of the month. While
simple, these methods are intrinsically limited by their reliance on human discipline and memory.
Simple digital systems, such as non-integrated spreadsheets, offer marginally better calculation
efficiency but still require extensive manual data entry and categorization. Professionals using
these manual classification methods report spending substantial time, averaging between 10 to 15
hours each month, solely on categorizing their expenses.
Furthermore, these systems are often siloed, meaning they do not integrate with other tools, leading to
duplicate data entry and a lack of holistic into spending patterns.
The limitations of existing manual and simple digital expense tracking methods create significant
operational and financial liabilities, justifying the development of a smart, automated solution.
The most significant problem is the high susceptibility to human error. A misplaced decimal point or
an incorrectly entered figure in a manual log can lead to substantial discrepancies in financial
records. Research indicates that approximately 19% of expense reports contain errors, and
correcting each single error requires an additional 18 minutes of work and an average cost of $52.
These mistakes cascade into larger issues, compromising accuracy for budgeting, tax preparations,
or accurate financial analysis.6 Senior financial analysts report spending around 10 hours monthly
just fixing errors that arise from manual data input.
15
Traditional systems inherently suffer from delayed reporting. If expenses are only reconciled at month-
end, users lose the critical opportunity to monitor spending as it happens. This delayed visibility
means that users cannot course-correct their spending behavior in real-time, often discovering
budget overruns too late. Modern finance management requires staying on top of spending
constantly, and the monthly wait time inherent in older systems is no longer competitive.
Manual tracking is tedious and time-consuming, leading to high rates of non- compliance and user
abandonment. Simple trackers lack the intrinsic motivation needed to encourage adherence to
savings or budgeting goals. The process is perceived as a necessary chore rather than a helpful
tool, resulting in users failing to maintain comprehensive documentation, including necessary
receipts and invoices, which further compromises audit trails and financial analysis.
3.3Proposed System
The proposed Smart Expense Tracker system addresses the systemic deficiencies of traditional
methods by implementing a real-time, automated, and behaviorally reinforcing platform.
The proposed system leverages digital data entry and automated calculation workflows to eliminate
human error and ensure immediate data accuracy. By using a centralized cloud database (Firebase),
the system provides instant visibility into spending. Every expense submitted by the user is
immediately recorded and the dashboard metrics (Total Expenses, Remaining Balance) are updated
in real-time. This instantaneous feedback loop allows for better decision-making and continuous
budgetary compliance.
The Mechanism
The primary innovation of the proposed system is the integration of gamification to drive behavioral
change and boost user engagement. This system operates as a positive reinforcement program
designed specifically to incentivize savings.
The core logic is tied to the user's registered Monthly Salary.1 The system defines a clear, numerical
goal: the user must achieve a minimum net saving of ₹2000 per month. The gamification steps are
as follows:
16
Progress Tracking: As the user enters expenses throughout the month, the Remaining
Balance tracks their proximity to the saving
Streaks and Retention: By rewarding this specific positive financial behavior (saving), the
application taps into the human desire for achievement and instantaneous gratification. This
mechanism encourages users to maintain a "streak" of saving, thereby maximizing long-term
user retention and compliance with personal financial goals.
This structure ensures that the system is not merely collecting data; it is actively conditioning users
toward financial discipline through engaging, game-like experiences.
17
3.4 Comparison between Existing and Proposed System
The transformation from manual and simple digital systems to the Smart Expense Tracker is quantified
by specific improvements in efficiency, accuracy, and engagement.
Smart Expense
Manual/Spreadsheet Tracker
Feature/Metric
System (Proposed)
Digital input
Data Entry Manual/Paper-based (Future: OCR
potential)
Excellent
(Automated
Poor (Prone to human
calculation,
Data Accuracy error, high correction
built-in
cost) 6
verification)
28
Real-time
Visibility and Delayed (Month-end (Instant
Feedback reconciliation) 13 dashboard
updates) 1
High
User Engagement Low (Tedious, easily (Gamified
abandoned) rewards,
progress bars,
18
The most significant comparative advantage lies in the minimization of manual tasks, which
previously required 10 to 15 hours per month for categorization alone.29 Automation streamlines
workflows, enforces policy compliance (the savings goal), and minimizes the risk of fraudulent or
erroneous entries.
The successful development and operation of the Smart Expense Tracker are contingent upon the
following software environments and tools:
Framework & Flutter SDK (latest stable channel), Dart SDK (bundled
Language with Flutter) 33
19
3.6Hardware Requirement Specification
The hardware requirements are split into development and runtime specifications.
8 GB or higher for
running multiple
emulators/simulators
RAM
efficiently
(Development) 4 GB
Up to 3 GB of free
space required for
SSD drive for faster
SDKs and tools 17
compilation and IDE
performance
Storage
(Development)
Smartphone
compatible with
Android API
Modern mobile device
20+ or
for optimal experience
Target Device iOS 8+
(Runtime)
20
CHAPTER - 4
FEASIBILITY STUDY OF THE PROJECT
A comprehensive feasibility study was conducted to ascertain the viability of the Smart Expense
Tracker project across technical, operational, and economic dimensions.
A feasibility study is a critical assessment that determines whether a proposed project is viable,
practical, and beneficial. For the Expense Tracker application, this study evaluates the project's
potential to meet user needs while utilizing available resources effectively. The study examines various
aspects including technical feasibility, economic viability, and operational practicality to provide a
comprehensive evaluation of the project's potential for success.
The primary purpose of this feasibility study is to analyze whether Expense Tracker can be developed
and implemented successfully within the constraints of time, budget, and technology. It assesses how
the application will address current problems in financial management and deliver value to users. The
study also considers the resources required for development, including technology, personnel, and
infrastructure, to ensure they are available and sufficient.
The objective of this feasibility study is to develop a structured proposal that outlines the nature, goals,
and scope of the Expense Tracker project. This proposal serves as a foundational document for
decision-making, providing stakeholders with a clear understanding of the project's potential benefits,
challenges, and requirements. It is an essential step in the project development process, helping to
identify potential risks, estimate costs, and determine overall viability before committing significant
resources.
This feasibility study examines multiple dimensions, including technical feasibility (can the application
be built with current technology?), economic feasibility (is the project cost-effective?), and operational
feasibility (will users adopt and benefit from the system?). By evaluating these aspects, the study
ensures that Expense Tracker is not only desirable but also achievable within the given constraints.
21
expertise. The analysis confirms high technical feasibility. The project relies on the Flutter framework
and the Dart language, both of which are mature, well- supported by Google, and possess extensive
community resources and clear documentation. The Flutter platform provides a comprehensive set of
APIs necessary to build complex mobile applications.
Furthermore, the backend relies on Firebase, a stable, cloud-based platform that handles critical services
such as authentication and NoSQL data persistence. This alleviates the need for custom server
infrastructure development, allowing the development team to focus resources on core business logic
and front-end user experience. The technology stack is fully capable of supporting the proposed real-
time calculations and the gamified reward logic.
22
investment cost of the initial development.
23
CHAPTER - 5
SYSTEM DESIGN
2. Transactions Collection
• Records all income and expense transactions
• Fields: transactionId, userId, type (income/expense), amount, category, description,
date, tags
3. Categories Collection
• Defines expense and income categories
• Fields: categoryId, userId, name, type (income/expense), icon, color, budgetLimit
4. Budgets Collection
24
• Stores budget information for different categories and time periods
• Fields: budgetId, userId, categoryId, period (weekly/monthly/yearly), amount, spent,
startDate, endDate
5. Goals Collection
• Tracks financial savings goals
• Fields: goalId, userId, name, targetAmount, currentAmount, targetDate, status
6. Reports Collection
• Stores generated financial reports and analytics
• Fields: reportId, userId, type, period, data, generatedAt
Data Relationships:
• Each user has multiple transactions, categories, budgets, and goals
• Transactions are linked to categories and users
• Budgets are associated with categories and users
• Goals belong to specific users
• Reports are generated for specific users and time periods
Security Rules:
• Users can only access their own financial data
• Authentication is required for all database operations
• Data validation ensures proper formatting of financial information
This database design provides a robust foundation for the Expense Tracker application,
supporting all required functionality while maintaining data integrity and security. The
NoSQL structure allows for flexibility as the application evolves, and Firebase's real-
time capabilities ensure that users always have access to current financial
informationThe database schema is designed to manage four primary entities: User,
Expense, Category, and the specialized Token_Rewards. Firestore (NoSQL) is the
chosen implementation environment, providing flexible document storage that supports
rapid query times for dashboard metrics.
25
The decision to store core financial metrics, specifically the Monthly Salary , within the
User entity, necessitates stringent security measures, including storing a PasswordHash
rather than plaintext. The Monthly Salary serves as the indispensable baseline metric for
calculating the Remaining Balance and determining eligibility for the token reward.
Authenti
UserID cation,
(PK), (1:N) budget
MonthlyS to baseline
alary, Expens data
User
Password e, capture,
Hash, Rewar and
TotalTok ds cumulati
ens ve token
display.1
ExpenseI Detailed
D (PK), tracking
Expense (N)
UserID of
(FK), spending
26
Table Relati Purpose
Name Key onship and
(Collecti Fields to Critical
on) User Fields
CategoryI transacti
D (FK), ons.36
Amount,
Date,
Descripti
on
Customi
(1:N) zable
CategoryI
to classific
Category D (PK),
Expens ation of
Name
e transacti
ons.12
Immutab
RewardI le ledger
D (PK), tracking
UserID specific
(FK), instances
Token_R MonthYe where
(N)
ewards ar, saving
SavingsA $\geq$
mount, ₹2000
TokensEa was
rned achieved
.
27
The requirement to aggregate expenses monthly for the reward calculation means that the
Token_Rewards entry must capture a snapshot of the calculated SavingsAmount for that
specific MonthYear.
Storing this immutable record, similar to an audit trail , provides verifiable evidence of the
user's financial achievement and facilitates tracking positive behavioral streaks.
5.2 E - R DIAGRAM
The Entity-Relationship (ER) Diagram is the blueprint for the Smart Expense Tracker's database. It
visually defines the system's core entities (the data objects) and the precise relationships between them,
ensuring that the financial logic is correctly implemented and all data is accurately tied to the individual
user.
The design relies on two main entities and a critical One-to-Many relationship.
Role in Expense
Attribute Detail
Tracker Application
The main access key. All queries for expense
user_id (PK) Unique Identifier history and summaries are filtered by this ID to
ensure data privacy and separation.
Used by the Login Module to verify identity. The
username &
Authentication password is never stored in plain text, maintaining
hashed_password
security standards.
This is the fixed, initial value used by the
Financial Logic Module. It serves as the 100% cap
monthly_salary Budget Benchmark
against which total expenses are compared to
determine the Remaining Balance.
Stores the cumulative rewards earned. This is the
Gamification goal variable for the Token Rewards Module,
token_count
Tracker which increments this count when the saving goal
is met.
29
Role in Expense
Attribute Tracker Detail
Application
it.
The monetary value used directly by the Financial Logic
amount Calculation Data Module to calculate the sum of all expenses and determine
the current budget status.
Defines the type of spending (e.g., Food, Transport). This
category Reporting Data data is aggregated and passed to the Visualization Module
([Link]) for graphical reports.
Audit & Period Used to filter expenses to ensure calculations (like total
date
Filtering monthly expense) are restricted to the correct time frame.
30
Component Symbol Name
Entity Rectangle
Attribute Ellipsis/Oval
Relationship Diamon
The System Flowchart for Expense Tracker outlines the logical flow of operations within the
application, capturing both user interactions and backend processes. The flowchart begins with user
authentication, followed by the main financial management activities.
User Flow:
1. User Registration/Login: Users create an account or sign in with existing credentials
2. Dashboard Access: Upon authentication, users are directed to their financial dashboard
3. Transaction Management: Users can add, edit, or delete income and expense transactions
4. Categorization: Transactions are automatically or manually categorized
5. Budget Tracking: Users set budget limits and monitor spending against these limits
6. Goal Setting: Users define financial goals and track progress toward achieving them
7. Report Generation: Users generate financial reports and view analytics
8. Data Synchronization: All data is synchronized across devices in real-time
Administrative Flow:
1. User Management: Administrators can manage user accounts and permissions
2. System Monitoring: System performance and usage are monitored
3. Data Backup: Regular backups of financial data are performed
4. Security Management: Security protocols are updated and monitored
31
The flowchart also includes error handling for scenarios such as invalid login credentials, data validation
failures, or synchronization issues. This structured flow helps identify system requirements, improve
usability, and ensure efficient development. Overall, the system flowchart serves as a blueprint for
developers and stakeholders to understand and implement the application's functional processes.
The system flowchart details the processes from user authentication through the critical expense
recording and token reward calculation phase.
Authentication Flow
The process begins with the system start, leading to a decision point: checking for an active
session. If no session exists, the user is directed to the Login or Register screens. 1 Upon
validation of credentials against the Firebase Authentication service, the user is directed to the
main Dashboard.
This systematic flow ensures that the financial data is accurate at all times and that the
motivational rewards are issued based on verified performance metrics.
DFDs illustrate the logical flow of information through the system, independent of physical
implementation.
DFD Level 0 (Context Diagram)
The Context Diagram depicts the Smart Expense Tracker as a single, centralized process
interacting with one external entity: the User.
Input from User: Salary Input, Expense Data, Authentication Credentials.
Output to User: Financial Reports (Charts), Dashboard Metrics, Reward
Notifications.40
Data Flows to/from System: All data, including expense records and user profiles, is
stored within the System’s internal Datastores (D1: User Data, D2: Expense Data, D3:
Reward Ledger).
The following diagram .1 illustrates the notations and symbols used to construct
the DFD:
34
35
5.5 DATA FLOW DIAGRAM
A Data Flow Diagram (DFD) is a graphical tool used to represent the flow of data within a
system at various levels of detail. It visually maps out how data moves between processes,
data stores, and external entities such as users or other systems. Think of a DFD like a road
map for data — it shows all the possible paths that data can take through the system.
For Link People Solutions, the DFD helps illustrate how employee and client information,
job postings, applications, and other data interact within the Employee Management System.
Different hierarchical levels of the DFD provide varying levels of detail, from an overview of
major data flows to in-depth views of specific processes.
The following diagram .1 illustrates the notations and symbols used to construct the DFD:
Figure 5.1: Illustrates the notations and symbols used to construct the DFD
36
5.6 Program Design
o They receive user input, orchestrate the execution of Use Cases from the
Domain Layer, and notify the Views of state changes, making the UI reactive.
37
5.7 Functionality of the Project
This process directly fulfills the behavioral objectives by providing immediate feedback
on hitting a positive financial milestone, thereby fostering independent goal-setting and
positive financial behavior.
38
5.8 Modules of the Project
3. UI/Presentation Module:
o Responsibility: Focuses entirely on the front-end rendering and user
interaction (input capture). It consists of all the Flutter Views and the primary
application navigation logic. This module is subscribed to the View Models
for state updates and is responsible for maintaining UI consistency across all
target platforms.
39
The screen design for Expense Tracker focuses on creating an intuitive, responsive, and
visually appealing user interface that simplifies financial management. The design
follows modern UI/UX principles to ensure a seamless experience across devices.
Key Screens:
1. Login/Registration Screen: Simple, clean interface with email/password fields and
social login options
2. Dashboard: Overview of financial health with key metrics (total income, expenses,
net balance, budget status)
3. Transaction Entry: Form for adding new income/expense transactions with category
selection, amount, date, and description
4. Transaction History: List of all transactions with filtering and sorting options
5. Category Management: Interface for creating and managing expense/income
categories
6. Budget Setup: Screen for setting budget limits for different categories and time
periods
7. Goal Tracking: Interface for creating financial goals and monitoring progress
8. Reports & Analytics: Visual representations of financial data with charts and graphs
9. Settings: User preferences, currency selection, notification settings, and account
management
The design uses a consistent color scheme with financial indicators (green for income,
red for expenses, blue for savings). Interactive elements provide immediate feedback,
and the layout is responsive to work seamlessly on desktop, tablet, and mobile devices.
Navigation is intuitive with a bottom navigation bar on mobile and a sidebar menu on
desktop [Link] screen design directly reflects the visual mockups provided ,
ensuring functional clarity and a consistent, professional user experience (UX).
40
It includes :
1. Registration Screen :
o Inputs: Full Name, Email, Username, Password.
o Critical Input: Monthly Salary (₹). This field is mandatory as it
forms the baseline for all subsequent budgeting and reward calculations.
2. Login Screen :
o Inputs: Username and Password. Provides a link back to the
Registration screen.
3. Dashboard Screen :
o Key Metrics (Top Card): Displays Total Salary (monthly baseline),
Total Expenses (current month aggregate), and Remaining Balance
(Salary - Expenses).
o Reward Notification: Features the dynamic "Congrats! You earned a
token!" banner, which appears only after the TokenRewardCalculator
verifies the achievement.
o Call-to-Action: Prominent 'Add New Expense' button.
41
5.10 Report design (output screen)
Start Frame
Main Frame
42
About us Page
43
CHAPTER – 6
CODING
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<header>
<nav>
</nav>
</header>
44
<section class="hero">
<p>Monitor your spending, manage budgets, and get rewarded when you save ₹2000 or more
every month!</p>
</section>
<footer>
</footer>
</body>
</html>
II. Register
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
*{
margin: 0;
padding: 0;
45
box-sizing: border-box;
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
.container {
background-color: #fff;
width: 420px;
border-radius: 15px;
padding: 30px;
text-align: center;
.container h2 {
margin-bottom: 20px;
color: #333;
46
}
form {
display: flex;
flex-direction: column;
align-items: stretch;
label {
text-align: left;
font-weight: 600;
color: #444;
input {
padding: 10px;
border-radius: 8px;
outline: none;
transition: 0.3s;
input:focus {
47
border-color: #007bff;
button {
color: white;
padding: 10px;
border: none;
border-radius: 8px;
margin-top: 20px;
cursor: pointer;
font-weight: 600;
transition: 0.3s;
button:hover {
transform: translateY(-2px);
.login-link {
margin-top: 15px;
color: #333;
48
font-size: 0.9em;
.login-link a {
color: #007bff;
text-decoration: none;
font-weight: 600;
.login-link a:hover {
text-decoration: underline;
.container {
width: 90%;
padding: 20px;
</style>
</head>
<body>
<div class="container">
<h2>Create an Account</h2>
49
<form action="{{ url_for('register') }}" method="POST">
<label for="email">Email</label>
<label for="username">Username</label>
<label for="password">Password</label>
<button type="submit">Register</button>
</form>
<div class="login-link">
</div>
</div>
50
</body>
</html>
III. Login
<!DOCTYPE html>
<html lang="en">
<head>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
51
.login-container {
background-color: white;
width: 400px;
border-radius: 15px;
padding: 30px;
text-align: center;
.login-container h2 {
margin-bottom: 20px;
color: #333;
form {
display: flex;
flex-direction: column;
label {
text-align: left;
font-weight: 600;
color: #444;
52
}
input {
padding: 10px;
border-radius: 8px;
outline: none;
transition: 0.3s;
input:focus {
border-color: #007bff;
button {
color: white;
padding: 10px;
border: none;
border-radius: 8px;
margin-top: 20px;
cursor: pointer;
font-weight: 600;
transition: 0.3s;
53
}
button:hover {
transform: translateY(-2px);
.register-link {
margin-top: 15px;
color: #333;
font-size: 0.9em;
.register-link a {
color: #007bff;
text-decoration: none;
font-weight: 600;
.register-link a:hover {
text-decoration: underline;
.login-container {
54
width: 90%;
padding: 20px;
</style>
</head>
<body>
<div class="login-container">
<h2>Welcome Back</h2>
<label for="username">Username</label>
<label for="password">Password</label>
<button type="submit">Login</button>
</form>
<div class="register-link">
</div>
</div>
</body>
</html>
55
IV. Dashboard
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<style>
body {
margin: 0;
color: #333;
display: flex;
flex-direction: column;
align-items: center;
padding: 30px;
h1 {
color: white;
margin-bottom: 10px;
56
.summary {
background: white;
padding: 20px;
border-radius: 15px;
display: flex;
justify-content: space-around;
width: 90%;
max-width: 800px;
margin-bottom: 20px;
flex-wrap: wrap;
.card {
text-align: center;
padding: 15px;
flex: 1 1 150px;
margin: 10px;
background: #f8f9fa;
border-radius: 12px;
transition: 0.3s;
.card:hover {
57
background: #e9f5ff;
transform: translateY(-5px);
.card h3 {
margin-bottom: 10px;
color: #007bff;
.token {
background: #d4edda;
color: #155724;
padding: 10px;
border-radius: 8px;
margin-top: 10px;
.expense-form {
background: white;
padding: 20px;
border-radius: 12px;
width: 90%;
max-width: 600px;
margin-bottom: 30px;
58
}
input, select {
width: 100%;
padding: 10px;
margin: 8px 0;
border-radius: 8px;
outline: none;
button {
border: none;
color: white;
border-radius: 8px;
cursor: pointer;
transition: 0.3s;
font-weight: 600;
button:hover {
59
table {
width: 90%;
max-width: 800px;
border-collapse: collapse;
background: white;
border-radius: 12px;
overflow: hidden;
th, td {
text-align: center;
th {
background: #007bff;
color: white;
tr:nth-child(even) {
background: #f2f2f2;
60
.logout {
margin-top: 20px;
background: #ff4d4d;
.logout:hover {
background: #ff6666;
</style>
</head>
<body>
<div class="summary">
<div class="card">
<h3>Total Salary</h3>
</div>
<div class="card">
<h3>Total Expenses</h3>
</div>
<div class="card">
<h3>Remaining Balance</h3>
61
<p>₹{{ savings }}</p>
</div>
<div class="card">
<h3>Token Rewards</h3>
{% if token_earned %}
{% else %}
{% endif %}
</div>
</div>
<div class="expense-form">
<option value="Food">Food</option>
<option value="Transport">Transport</option>
<option value="Shopping">Shopping</option>
<option value="Bills">Bills</option>
<option value="Entertainment">Entertainment</option>
<option value="Others">Others</option>
</select>
62
<input type="number" name="amount" placeholder="Amount (₹)" required>
</form>
</div>
<table>
<tr>
<th>Category</th>
<th>Description</th>
<th>Amount (₹)</th>
<th>Date</th>
</tr>
<tr>
</tr>
{% endfor %}
</table>
63
<button class="logout">Logout</button>
</a>
</body>
</html>
[Link]
// Theme Toggle
if (themeBtn) {
[Link]("click", () => {
[Link]("dark");
});
// Transactions
// Add Transaction
if (transactionForm) {
64
[Link]();
await fetch("/add_transaction", {
method: "POST",
body: [Link](data)
});
[Link](data);
updateUI();
[Link]();
});
function updateUI() {
[Link] = "";
let total = 0;
[Link]((t) => {
const li = [Link]("li");
65
[Link](li);
});
[Link] = ₹${total};
[Link] = "limegreen";
} else {
[Link] = "white";
renderChart();
function renderChart() {
if (!ctx) return;
const income = [Link](t => [Link] === "income").reduce((a, b) => a + [Link], 0);
const expense = [Link](t => [Link] === "expense").reduce((a, b) => a + [Link], 0);
new Chart(ctx, {
type: "doughnut",
data: {
66
labels: ["Income", "Expense"],
datasets: [{
}]
});
body {
background: #f6f8fc;
margin: 0;
color: #333;
header {
background: #4a90e2;
color: #fff;
display: flex;
justify-content: space-between;
align-items: center;
67
header h1 {
font-size: 24px;
margin: 0;
.logout-btn {
background: #fff;
color: #4a90e2;
text-decoration: none;
border-radius: 8px;
font-weight: bold;
.logout-btn:hover {
background: #e9f3ff;
.dashboard-container {
width: 85%;
max-width: 1000px;
68
.summary h2, .add-expense h2, .expense-list h2 {
color: #4a90e2;
.summary-cards {
display: flex;
gap: 20px;
margin-top: 15px;
.card {
flex: 1;
background: #fff;
padding: 20px;
border-radius: 10px;
text-align: center;
.card h3 {
margin-bottom: 10px;
color: #555;
.card p {
69
font-size: 22px;
font-weight: bold;
color: #333;
.token-message {
margin-top: 20px;
background: #e3ffe3;
padding: 15px;
border-radius: 10px;
color: #1b751b;
font-weight: 600;
text-align: center;
.expense-form {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-top: 10px;
.expense-form input {
flex: 1;
70
padding: 10px;
border-radius: 6px;
.expense-form button {
background: #4a90e2;
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
.expense-form button:hover {
background: #377fcc;
table {
width: 100%;
border-collapse: collapse;
margin-top: 15px;
background: #fff;
border-radius: 10px;
71
overflow: hidden;
th, td {
padding: 12px;
text-align: center;
th {
background: #4a90e2;
color: white;
tr:hover {
background: #f1f8ff;
footer {
text-align: center;
margin-top: 30px;
padding: 15px;
background: #4a90e2;
color: white;
72
font-size: 14px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
import sqlite3
import os
app = Flask(_name_)
app.secret_key = 'secret123'
DB_NAME = 'expense_tracker.db'
def get_db_connection():
conn = [Link](DB_NAME)
conn.row_factory = [Link]
return conn
def init_db():
if not [Link](DB_NAME):
conn = get_db_connection()
cur = [Link]()
73
[Link]('''
''')
[Link]('''
description TEXT,
''')
[Link]()
[Link]()
74
# ------------------ ROUTES ------------------
@[Link]('/')
def home():
return render_template('[Link]')
def register():
if [Link] == 'POST':
name = [Link]['name']
email = [Link]['email']
username = [Link]['username']
password = [Link]['password']
salary = [Link]['salary']
conn = get_db_connection()
cur = [Link]()
existing = [Link]()
if existing:
[Link]()
75
[Link]('INSERT INTO users (name, email, username, password, salary) VALUES (?, ?, ?, ?, ?)',
[Link]()
[Link]()
return redirect(url_for('login'))
return render_template('[Link]')
def login():
if [Link] == 'POST':
username = [Link]['username']
password = [Link]['password']
conn = get_db_connection()
cur = [Link]()
user = [Link]()
[Link]()
if user:
session['username'] = user['username']
return redirect(url_for('dashboard'))
76
else:
return render_template('[Link]')
@[Link]('/dashboard')
def dashboard():
return redirect(url_for('login'))
username = session['username']
conn = get_db_connection()
cur = [Link]()
salary = [Link]()[0] or 0
expenses = [Link]()
# Total expenses
77
total_expense = [Link]()[0] or 0
# Category-wise expenses
[Link]("""
FROM expenses
WHERE username=?
GROUP BY category
""", (username,))
category_data = [Link]()
[Link]()
# Calculate balance/savings
return render_template(
'[Link]',
username=username,
salary=salary,
total_expense=total_expense,
savings=savings,
token_earned=token_earned,
category_data=category_data,
78
expenses=expenses
@[Link]('/add_expense', methods=['POST'])
def add_expense():
return redirect(url_for('login'))
username = session['username']
category = [Link]['category']
description = [Link]['description']
amount = float([Link]['amount'])
date = [Link]['date']
conn = get_db_connection()
cur = [Link]()
[Link]()
[Link]()
return redirect(url_for('dashboard'))
@[Link]('/logout')
def logout():
[Link]()
79
return redirect(url_for('login'))
if _name_ == '_main_':
init_db()
[Link](debug=True, port=8080)
80
CHAPTER – 7 TESTING
The purpose of testing in this project is to ensure that the web application is reliable, secure,
and performs as expected across different use cases. It helps identify bugs, inconsistencies, and
usability issues before deployment.
Objectives of Testing
• Verify that all functional requirements are met
• Ensure proper integration of modules
• Validate performance under various loads
• Identify and fix security vulnerabilities
• Provide a smooth user experience iii. Testing Levels Used
• Unit Testing – Testing individual functions or modules (e.g., login, job search)
• Integration Testing – Testing combined modules that interact (e.g., job search + database)
• System Testing – Full application testing in a staging environment
• User Acceptance Testing (UAT) – Performed by real users to ensure requirements are met
Level of Testing:
Testing can be performed in following three levels.
i. Unit testing
ii. Integration testing
iii. System testing
81
Unit Testing
Each program component is tested on its own, isolated from the other components in the
system. Such testing, known as module testing, component testing or unit testing, verifies
that the component functions properly with types of inputs expected from studying the
component design.
Integrated Testing
When all collecting components have been unit tested, the next step is ensuring the interfaces
among the components are defined and handled properly. Integration testing is the process of
verifying that the system components work together as described in the system and program
.
System Testing
System testing focuses on a complete, integrated system to evaluate compliance with specified
requirements. Tests are made on characteristics that are only present when the entire system
is run.
The design of tests for software and other engineered products can be as challenging as the
initial design of the product itself. Yet, for reasons that we have already discussed, software
engineers often treat testing as an afterthought, developing test cases that may "feel right"
but have little assurance of being complete.
A rich variety of test case design methods have evolved for software. These methods provide
the developer with a systematic approach to testing. More important, methods provide a
mechanism that can help to ensure the completeness of tests and provide the highest
likelihood for uncovering errors in software.
82
Any engineered product (and most other things) can be tested in one of two ways:
83
(1) Knowing the specified function that a product has been designed to perform, tests can
be conducted that demonstrate each function is fully operational while at the same time
searching for errors in each function;
(2) Knowing the internal workings of a product, tests can be conducted to ensure that "all
gears mesh," that is, internal operations are performed according to specifications and all
internal components have been adequately exercised.
Here’s a simplified set of test cases for the Employee Management System (EMS), focusing
on the key employee details: name, father's name, date of birth, salary, address, phone,
email, education, designation, Aadhaar number, and employee ID (emp ID).
• Test Objective:
Verify that a new user can be added with correct details.
• Expected Result:
User is added successfully with all details.
The first test approach is called black-box testing and the second, white-box testing. When
computer software is considered, black-box testing alludes to tests that are conducted at the
software interface. Although they are designed to uncover errors, black-box tests are used to
demonstrate that software functions are operational, that input is properly accepted and
output
84
is correctly produced, and that the integrity of external information (e.g., a database) is
maintained.
A black-box test examines some fundamental aspect of a system with little regard for the
internal logical structure of the software.
WHITE-BOX TESTING: sometimes called glass-box testing, is a test case design method
that uses the control structure of the procedural design to derive test cases. Using white-box
testing methods, the software engineer can derive test cases that:
(1) guarantee that all independent paths within a module have been exercised at least once,
(2) exercise all logical decisions on their true and false sides,
(3) execute all loops at their boundaries and within their operational bounds, and
(4) exercise internal data structures to ensure their validity.
85
(5) initialization and termination errors.
86
Unlike white-box testing, which is performed early in the testing process, black-box testing
tends to be applied during later stages of testing. Because black-box testing purposely
disregards control structure, attention is focused on the information domain.
• Automated Testing (Optional): Could include basic scripts using Selenium for
regression testing
User Registration
Admin Login
Add Expenses
87
7.4 Test Plan Summary and Tools
88
CHAPTER – 8
SYSTEM
IMPLEMENTATION
System implementation refers to the process of deploying the developed web application into a
working environment, where users can access and interact with it. In this project,
implementation involved setting up the application on a local development environment for
testing, followed by a migration to a live or production environment. System
implementation covers the deployment environment setup and the necessary steps for both
developers and end-users to install and operate the application.
1. Prerequisites Setup: The developer must first install the prerequisites: the correct
version of the Flutter SDK and its bundled Dart SDK, followed by setting up the
necessary platform tools (Android Studio/SDK or Xcode for iOS development).
2. Environment Configuration: The Flutter bin directory must be added to the system's
PATH environment variable. The developer must then execute flutter doctor in the
command line to validate that all required toolchains, including the VS Code
extensions, are correctly installed and configured.
3. Project Acquisition: Clone the project repository from GitHub to the local machine.
4. Backend Integration: Create a new project in the Firebase console. Integrate the
89
platform- specific configuration files ([Link] for Android and
GoogleService- [Link] for iOS) into the Flutter project directories.
5. Dependency Retrieval: Run flutter pub get in the project root to install all required
Dart and Flutter packages (dependencies).
3. Adding an Expense:
Tap the 'Add New Expense' button.
On the input screen, select the appropriate Category, enter the Amount, the
Date of the transaction, and an optional Description.
Once submitted, the expense is recorded, and the Dashboard metrics are
90
updated instantly.
5. Viewing Reports:
Users can access the Reports section to view categorical spending charts and
review their Token Rewards History, which validates their successful savings
months.
91
CHAPTER - 9
FURTHER SCOPE OF THE PROJECT
2. Proactive Budgeting: The trained model would predict future expenses, allowing the
system to suggest a proactive, data-driven budget to the user. This prediction moves
the system from reactive tracking to proactive financial planning, a significant
advancement in personal finance management.
92
Mechanism: Users would capture a photo of a receipt. The OCR engine would
process the image, automatically extracting key fields such as Merchant,
Amount, and Date.
Efficiency Gain: This automation would eliminate the need for manual data
entry, thereby enhancing the user experience and increasing data accuracy
significantly, as suggested by leading industry solutions.
93
CHAPTER – 10
CONCLUSION
The he Smart Expense Tracker project successfully addresses the challenges of tedious,
error-prone personal finance management by delivering a high-performance, cross- platform
mobile application. Utilizing Flutter and Dart, the project achieved architectural robustness
and ensured UI consistency across Android and iOS devices. The backend, anchored by
Firebase, provides scalable, persistent data storage and secure authentication.
The primary achievement of this project is the successful implementation of a novel
gamification system. By setting a clear, measurable savings goal ($\text{Savings} \geq
₹2000$) and rewarding its achievement with Tokens 1, the application effectively
transformed a passive tracking exercise into an active, motivating behavioral process. The
development of the Expense Tracker and the associated audit ledger ensures that positive
financial habits are reinforced, leading to sustained user engagement and improved financial
discipline.
In conclusion, the Smart Expense Tracker provides a sophisticated and practical solution for
effective money management, validating the technical feasibility of complex, modular
mobile application development and demonstrating the power of behavioral science
integration in Fintech applications.
From this project, we are able to manage and keep tracking the daily expenses as well as
income. While making this project, we gained a lot of experience of working as a team. We
discovered various predicted and unpredicted problems and we enjoyed a lot solving them as
a team. We adopted things like video tutorials, text tutorials, internet and learning materials
to make our project complete. Furthermore, now we know much more about the Android
platform, java language and the SQLite query.
After making this application we assure that this application will help its users to manage the
cost of their daily expenditure. It will guide them and aware them about there daily expenses.
It will prove to be helpful for the people who are frustrated with their daily budget
management, irritated because of amount of expenses and wishes to manage money and to
94
preserve the record of their daily cost which may be useful to change their way of spending
money. In short, this application will help its users to overcome the wastage of money.
The name of our project is " EXPENSE TRACKER" which is basically an Expense Tracker.
It works on the top of latest technology stack and is as interactive and friendly as it is named.
You have to provide the input manually or with the help of your speech (thanks to speechly
for making it happen easily).
The moment you fill in the input manually and click the "CREATE" button or the moment
you provide your voice command, the app stores the data with the help of context that makes
your app faster and the information is easily flowed between the various components of the
app. Then the information is populated in a list which if displayed just below the input
form.
95
CHAPTER – 11
BIBLIOGRAPHY & REFERENCES
11.1 Books
1. Martin, R. C. (2017). Clean Architecture: A Craftsman's Guide to Software Structure
and Design. Prentice Hall.
2. Gamma, E., et al. (1994). Design Patterns: Elements of Reusable Object-
Oriented Software. Addison-Wesley.
3. Freeman, A., & Robson, E. (2019). Pro React 16. Apress.
4. Krug, S. (2014). Don't Make Me Think, Revisited. New Riders.
1. Smith, J., & Johnson, M. (2021). "Machine Learning for Personal Finance Management."
Journal of Financial Technology, 15(3).
2. Patel, R., & Lee, S. (2020). "User Experience Design for Financial Applications."
International Journal of Human-Computer Interaction, 28(4).
3. Garcia, C., & Kim, T. (2019). "Security Challenges in Mobile Financial Applications."
IEEE Security & Privacy, 17(2).
97