Final Document
Final Document
PROJECT REPORT
ON
“SMART SPEND APP”
(23248-CS-009)
SANJANA
(Assistant Professor)
Department of CSE
i
CERTIFICATE
This is to certify that the Project report on “SMART SPEND APP” is a Bonafide work
carried out by BARU TULASI RAM (23248-CS-009), in partial fulfillment for the
requirement of the award of Diploma in Computer Science and Engineering, Teegala
Krishna Reddy Engineering College, Hyderabad, affiliated to State Board of Technical
Education and Training, Hyderabad under my guidance and supervision.
The result of investigation enclosed in this report have been verified and found satisfactory.
The results embodied in the project work have not been submitted to any other University
for the award of any degree.
ii
DECLARATION
I hereby declare that the Project report entitled “SMART SPEND APP” is
done under the guidance of SANJANA, Assistant Professor, Department of Computer
Science, Teegala Krishna Reddy Engineering College, is submitted in partial fulfillment of
the requirements for the award of the DIPLOMA IN COMPUTER SCIENCE from
SBTET (State Board of Technical Education and Training) Telangana, Hyderabad.
This is a record of Bonafide work carried out by me in Teegala Krishna Reddy
Engineering College and the results embodied in this project have not been reproduced or
copied from any source.
SUBMITTED BY
B. TULASI RAM
(23248-CS-009)
iii
ACKNOWLEDGEMENT
The satisfaction and euphoria that accompanies the successful completion of any task
would be incomplete without the mention of the people who made it possible and whose
encouragement and guidance have crowned our efforts with success.
Finally, I express thanks to one and all that have helped me in successfully completing
this project. Further I would like to thank my family and friends for their moral support and
encouragement.
SUBMITTED BY
B. TULASI RAM
(23248-CS-009)
iv
ABSTRACT
Managing personal finances has become challenging due to the increasing use of digital payment
methods and the growing complexity of financial planning. Many individuals find it difficult to track
their daily expenses, plan investments, and estimate taxes accurately because existing solutions either
require manual effort or provide limited insights. This often leads to poor financial awareness and
inefficient money management.
This project presents an Automatic Personal Expense Tracker with Investment Guidance and
Tax Estimation, a mobile application designed to simplify personal finance management through
automation and intelligent analysis. The application automatically detects financial transactions by
analyzing transaction alerts generated on the user’s mobile device, eliminating the need for manual
expense entry. These transactions are processed and categorized to provide users with a clear
understanding of their spending patterns.
The system analyzes historical expense data to generate meaningful insights such as spending trends
and expense summaries, helping users make better financial decisions. In addition to expense
tracking, the application offers investment guidance based on the user’s financial behavior, capacity,
and risk preference. Rather than executing investments directly, the system provides advisory-level
suggestions to support safe and informed investment planning.
The application also includes a tax estimation module that calculates the user’s potential tax liability
by considering income details and applicable tax rules. It allows users to compare tax regimes and
identify possible tax-saving opportunities, enabling proactive financial planning. Security and privacy
are prioritized by avoiding direct bank credential access and handling sensitive data responsibly.
Overall, the proposed system aims to provide a user-friendly and reliable solution for automatic
expense tracking, investment guidance, and tax estimation, thereby improving financial awareness
and promoting better long-term financial well-being.
v
TABLE OF CONTENTS
1. INTRODUCTION 1-3
1.1 GENERAL 1
1.2 SCOPE OF THE PROJECT 2
1.3 OBJECTIVE 3
3.
SYSTEM ANALYSIS 6-8
3.1 EXISTING SYSTEM 6
vi
SYSTEM DESIGN
4.1 UML DIAGRAMS 09 - 17
4.1.1 USE CASE DIAGRAM 09
5.9 Summary 20
vi
6. TESTING 45-47
6.1 TESTING AND IMPLEMENTATION 45
6.2 TYPES OF TESTS 45
6.2.1 UNIT TESTING 45
6.2.2 FUNCTION TESTING 46
6.2.3 SYSTEM TESTING 46
6.2.4 PERFORMANCE TESTING 46
6.2.5 INTEGRATION TESTING 47
6.2.6 ACCEPTANCE TESTING 47
6.2.7 BUILD THE TEST PLAN 47
vi
7. OUTPUT SCREENS 49-51
8. FUTURE ENHANCEMENT 52
9. CONCLUSION 53
10 REFERENCE 54
viii
LIST OF FIGURES
ix
CHAPTER-1
INTRODUCTION
INTRODUCTION:
Managing personal finances has become an important part of everyday life. With multiple
digital payment options such as UPI, debit cards, and online banking, people make several
transactions daily but often fail to track where their money is actually spent. Most individuals
either do not record their expenses regularly or depend on manual methods, which are time-
consuming and difficult to maintain. As a result, they lack a clear understanding of their
spending habits, savings, investments, and tax obligations.
To address this problem, this project introduces an Automatic Personal Expense Tracker with
Investment Guidance and Tax Estimation, a mobile application designed to make personal
finance management simple and user-friendly. The main goal of the application is to reduce
manual effort and help users gain better control over their finances through automation and
intelligent analysis.
The application automatically detects financial transactions by analyzing transaction alerts
generated on the user’s mobile device. This removes the need for users to manually enter each
expense. The detected transactions are then organized and categorized to provide a clear
picture of the user’s spending behaviour. By analysing past transaction data, the system
identifies spending patterns and highlights areas where expenses are increasing, helping users
make more informed financial decisions.
In addition to expense tracking, the application provides investment guidance based on the
user’s spending behaviour, financial capacity, and risk preference. Instead of directly executing
investments, the system offers suggestions such as suitable investment types and goal-based
saving plans. This approach keeps the system safe and compliant while still assisting users in
planning their investments effectively.
The application also includes a tax estimation feature that helps users understand their possible
tax liability. By considering income details and applicable tax rules, the system estimates taxes
under different regimes and highlights potential tax-saving opportunities. This enables users to
plan their finances throughout the year rather than waiting until the time of tax filing.
1
1.1 SCOPE OF THE PROJECT
The scope of this project focuses on developing a mobile application that simplifies personal
financial management through automation, analysis, and user-friendly design. The application
is designed to assist individuals in tracking their expenses, planning investments, and
estimating tax liabilities in an efficient and reliable manner. The system primarily targets
users who perform frequent digital transactions and require a consolidated view of their
financial activities.
The project includes automatic detection of financial transactions by analysing transaction
alerts generated on the user’s mobile device. This enables the system to record expenses and
income without manual input, reducing user effort and improving accuracy. The application
processes and categorizes transaction data to present structured summaries of daily, monthly,
and category-wise spending.
Another important aspect of the project scope is financial analysis. The system analyses
historical expense data to identify spending patterns, trends, and irregularities. These insights
help users understand their financial behaviour and take corrective actions when necessary.
Budget tracking and spending summaries further enhance financial awareness.
The project also covers investment guidance, where users receive advisory-level suggestions
based on their spending behaviour, financial capacity, and risk preference. The application
supports goal-based planning and provides guidance without executing actual investments,
ensuring regulatory safety.
Additionally, the project includes a tax estimation module that calculates potential tax
liability based on user-provided income details and applicable tax rules. The system allows
users to compare different tax regimes and identify tax-saving opportunities, supporting better
financial planning throughout the year.
The scope of the project is limited to providing financial insights and guidance rather than
performing direct banking operations, investment transactions, or tax filing. Security and
privacy considerations are incorporated by avoiding direct bank credential access and
ensuring responsible data handling. Overall, the project aims to deliver a practical, automated,
and user-centric personal finance management solution suitable for real-world usage.
2
1.2 OBJECTIVE
The main objective of this project is to design and develop an intelligent personal finance
management application that helps users effectively track their expenses, plan investments,
and estimate taxes in an automated and user-friendly manner. The application aims to
simplify financial management by reducing manual effort and improving financial
awareness.
One of the primary objectives is to automate expense tracking by detecting and recording
financial transactions from transaction alerts, minimizing the need for manual data entry.
This helps users maintain accurate and up-to-date financial records with minimal effort.
Another objective is to categorize expenses and income systematically to provide clear
insights into spending patterns. By analysing categorized data, the application helps users
understand where their money is being spent and identify areas where expenses can be
controlled.
The project also aims to provide meaningful financial analysis by generating summaries,
reports, and visual representations of expenses over daily, monthly, and yearly periods. This
objective supports better budgeting and financial decision-making.
An important objective of the system is to offer investment guidance based on the user’s
financial behaviour, income, and spending capacity. The application suggests suitable
investment options and savings strategies to help users achieve financial goals without
directly executing transactions.
Additionally, the project focuses on estimating tax liability by calculating approximate taxes
based on user-entered income details and applicable tax rules. This objective helps users
plan tax savings and avoid last-minute financial stress.
Another objective is to ensure data security and user privacy by avoiding direct bank
account access and implementing safe data handling practices. The system is designed to
provide guidance and insights rather than performing financial transactions.
Overall, the objective of this project is to create a reliable, automated, and intelligent
personal finance assistant that supports users in managing their finances efficiently and
responsibly.
3
CHAPTER-2
LITERATURE SURVEY
2.1 Introduction
The rapid growth of digital payment systems and online banking has led to an increase in financial
transactions in everyday life. Managing personal finances manually has become difficult for
individuals due to multiple spending sources such as bank transfers, UPI payments, wallets, and card
transactions. As a result, there is a growing demand for intelligent personal finance management
applications that can automate expense tracking and provide meaningful financial insights.
5
CHAPTER-3
SYSTEM ANALYSIS
The existing personal finance management systems mainly rely on manual expense
tracking or partially automated applications. In manual systems, users record their daily
require continuous user effort and are prone to errors due to missed or incorrect entries.
Some modern applications automatically track expenses by reading SMS transaction alerts
sent by banks and digital wallets. Applications such as Money View categorize expenses
and show spending patterns. However, these systems have limitations such as dependency
on SMS formats, limited personalization, basic investment guidance, and simplified tax
The proposed system, Smart Spend – Intelligent Personal Finance Tracker, is designed
tracker that reads transaction-related SMS messages from the user’s mobile device to
provides meaningful insights. In addition to expense tracking, the proposed system includes
6
investment guidance and tax estimation features to help users make informed financial
decisions. The application focuses on automation, user convenience, data security, and
The Incremental Model is used for developing the Smart Spend application.
In this model, the system is developed and delivered in small increments. Each increment
adds new features and improves existing functionality. This model is suitable for the
proposed system because the application contains multiple modules such as expense
Justification:
Thus, the Incremental Model ensures flexibility, reliability, and efficient development of
7
3.4 HARDWARE REQUIREMENTS
The minimum hardware requirements for running the Smart Spend application are:
Android smartphone
Minimum 2 GB RAM
The software requirements for developing and running the application are:
8
CHAPTER-4
SYSTEM DESIGN
The main purpose of a use case diagram is to show what system functions are performed for
which actor. Roles of the actors in the system can be depicted. The above diagram consists of
user as actor. Each will play a certain role achieve the concept.
9
4.1.2 CLASS DIAGRAM:
In this class diagram represents how the classes with attributes and methods are linked together
to perform the verification with security. From the above diagram shown the various classes
involved in our project.
10
4.1.3 OBJECT DIAGRAM:
In the above digram tells about the flow of objects between the classes. It is a diagram that
shows a complete or partial view of the structure of a modeled system. In this object diagram
represents how the classes with attributes and methods are linked together to perform the
verification with security.
11
4.1.4 STATE DIAGRAM
State diagram are a loosely defined diagram to show workflows of stepwise activities and
actions, with support for choice, iteration and concurrency.
12
4.1.5 ACTIVITY DIAGRAM:
A sequence diagram in Unified Modeling Language (UML) is a kind of interaction diagram that
shows how processes operate with one another and in what order. It is a construct of a Message
Sequence Chart. A sequence diagram shows object interactions arranged in time sequence. It depicts
the objects and classes involved in the scenario and the sequence of messages exchanged between
the objects needed to carry out the functionality of the scenario.
14
4.1.7 COMPONENT DIAGRAM :
In the Unified Modeling Language, a component diagram depicts how components are wired
together to form larger components and or software systems. They are used to illustrate the
structure of arbitrarily complex systems. User gives main query and it converted into sub
queries and sends through data dissemination to data aggregators. Results are to be showed to
user by data aggregators. All boxes are components and arrow indicates dependencies.
15
4.1.8 COLLABORATION DIAGRAM:
Illustration in interaction.
Deployment Diagram is a type of diagram that specifies the physical hardware on which the software
system will execute. It also determines how the software is deployed on the underlying hardware.
16
4.2 SYSTEM ARCHITECTURE:
17
CHAPTER-5
IMPLEMENTATION
The implementation of the Smart Spend application focuses on automating personal expense
tracking using an Android-based mobile platform. The system is implemented using Java,
Android SDK, and Capacitor plugins to access device-level features. The implementation is
modular, ensuring clarity, maintainability, and ease of future enhancements.
The core functionality of the application is automatic expense detection using SMS transaction
alerts. The system uses a custom Capacitor plugin (SMSPlugin) to access SMS inbox data after
obtaining user permission. The plugin reads recent SMS messages from the device and filters
transaction-related messages using predefined keywords such as “debited,” “credited,” “INR,”
and “Rs”.
Once a relevant message is identified, essential transaction details such as sender address,
message content, and timestamp are extracted. This approach avoids direct bank account
integration while still enabling automated expense tracking.
Extracted SMS data is processed to identify transaction type (credit or debit) and amount. The
system applies rule-based logic to categorize transactions into expense categories such as food,
travel, shopping, and utilities. This categorization helps in organizing raw transaction data into
meaningful financial records.
Each processed transaction is converted into a structured transaction object, which is then stored
locally for further analysis.
18
5.3 EXPENSE MANAGEMENT MODULE
The Expense Management module maintains a list of categorized transactions and calculates
total expenses over different time periods such as daily, monthly, and yearly. It provides
summary data that is used to display spending information on the application dashboard.
This module acts as a bridge between raw transaction data and analytical components of the
system.
The Analytics module analyzes historical expense data to identify spending patterns and trends.
It generates summaries such as category-wise spending, monthly expense comparison, and
overall expenditure reports. These insights help users understand their financial behavior and
identify areas where expenses can be controlled.
The analytical results are presented in a simple and user-friendly format for easy understanding.
The Investment Guidance module provides advisory-level suggestions based on the user’s
spending behavior, income level, and savings capacity. Instead of executing real investments, the
system suggests suitable investment types and saving strategies. This ensures regulatory safety
while still assisting users in financial planning.
The Tax Estimation module calculates approximate tax liability using user-provided income
details and predefined tax rules. It allows users to estimate taxes under different tax regimes and
identify potential tax-saving opportunities. This feature helps users plan finances throughout the
year.
19
5.7 DATA STORAGE AND SECURITY
All financial data is stored locally using a lightweight database to ensure fast access and
improved privacy. The application does not store bank credentials or perform financial
transactions, reducing security risks. Permission-based access ensures that user consent is
obtained before reading SMS data.
The user interface is designed to be simple and intuitive. It provides dashboards, summaries, and
insights in an easily understandable manner. The interface allows users to view expenses,
analyze spending patterns, and access investment and tax-related information with minimal
interaction.
5.9 SUMMARY
The Smart Spend application is implemented as a modular, secure, and automated personal
finance management system. By combining SMS-based transaction detection, expense
categorization, analytics, investment guidance, and tax estimation, the system provides a
practical and user-friendly solution for managing personal finances.
Main Activity
package [Link];
import [Link];
import [Link];
@Override
public void onCreate(Bundle savedInstanceState) {
20
[Link](savedInstanceState);
registerPlugin([Link]);
registerPlugin([Link]);
}
}
SMS Plugin
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
@CapacitorPlugin(
name = "SMSPlugin",
permissions = {
@Permission(
alias = "sms",
strings = {[Link].READ_SMS}
)
}
)
public class SMSPlugin extends Plugin {
@PluginMethod
public void getRecentSMS(PluginCall call) {
if (getPermissionState("sms") != [Link]) {
requestPermissionForAlias("sms", call, "smsCallback");
} else {
loadSMS(call);
}
}
@PermissionCallback
public void smsCallback(PluginCall call) {
if (getPermissionState("sms") == [Link]) {
loadSMS(call);
21
} else {
[Link]("SMS permission was denied");
}
}
if (cur != null) {
int totalProcessed = 0;
int messagesFound = 0;
while ([Link]() && messagesFound < 100 && totalProcessed < 1000) {
totalProcessed++;
if (body == null) {
continue;
}
String lowerBody = [Link]();
// Spam detection
boolean isSpam = [Link]("offer") || [Link]("promo")
|| [Link]("discount") || [Link]("win")
|| [Link]("lottery") || [Link]("vouchers")
|| [Link]("free") || [Link]("sale")
|| [Link]("congrats");
if (isBankMessage) {
JSObject msg = new JSObject();
[Link]("address", address);
[Link]("body", body);
[Link]("date", date);
[Link](msg);
messagesFound++;
}
}
}
Transaction
useEffect(() => {
if (user) {
loadData();
}
}, [user]);
await [Link](
user!.id,
'DELETE_TRANSACTION',
'transaction',
id,
{ amount: [Link], description: [Link] }
);
loadData();
};
if (loading) {
return (
<div className="flex items-center justify-center h-96">
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"></div>
</div>
);
}
return (
<div className="space-y-6">
<div className="flex items-center justify-between">
<div>
<h1 className="text-3xl font-bold text-gray-900 mb-2">Transactions</h1>
25
<p className="text-gray-600">Manage all your income and expenses</p>
</div>
<div className="flex gap-2 min-w-0">
<button
onClick={() => exportTransactionsToPDF(filteredTransactions)}
className="flex items-center justify-center gap-2 bg-white border border-gray-200 text-gray-700
px-3 md:px-6 py-3 rounded-lg font-semibold hover:bg-gray-50 transition-all shadow-sm"
title="Export PDF"
>
<Download className="w-5 h-5" />
<span className="hidden md:inline">Export PDF</span>
</button>
<button
onClick={() => exportTransactionsToExcel(filteredTransactions)}
className="flex items-center justify-center gap-2 bg-white border border-gray-200 text-gray-700
px-3 md:px-6 py-3 rounded-lg font-semibold hover:bg-gray-50 transition-all shadow-sm"
title="Export Excel"
>
<FileSpreadsheet className="w-5 h-5 text-emerald-600" />
<span className="hidden md:inline">Export Excel</span>
</button>
<button
onClick={() => setShowModal(true)}
className="flex items-center justify-center gap-2 bg-gradient-to-r from-blue-600 to-emerald-600
text-white px-3 md:px-6 py-3 rounded-lg font-semibold hover:from-blue-700 hover:to-emerald-700
transition-all shadow-lg hover:shadow-xl whitespace-nowrap"
>
<Plus className="w-5 h-5" />
<span className="hidden md:inline">Add Transaction</span>
<span className="md:hidden">Add</span>
</button>
</div>
</div>
<select
26
value={filterType}
onChange={(e) => setFilterType([Link] as 'all' | 'expense' | 'income')}
className="px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500
focus:border-transparent"
>
<option value="all">All Types</option>
<option value="expense">Expenses</option>
<option value="income">Income</option>
</select>
<select
value={filterCategory}
onChange={(e) => setFilterCategory([Link])}
className="px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500
focus:border-transparent"
>
<option value="all">All Categories</option>
{[Link](cat => (
<option key={[Link]} value={[Link]}>{[Link]}</option>
))}
</select>
<div className="flex items-center gap-2 text-sm bg-emerald-50 px-4 py-2 rounded-lg border
border-emerald-100 sm:col-span-2 md:col-span-1">
<ArrowUpCircle className="w-4 h-4 text-emerald-600 flex-shrink-0" />
<span className="text-gray-600 whitespace-nowrap">Income:</span>
<span className="font-semibold text-emerald-600 truncate">₹{[Link](2)}</span>
</div>
</div>
{[Link] === 0 ? (
<div className="text-center py-12">
<p className="text-gray-500 mb-4">No transactions found</p>
<button
onClick={() => setShowModal(true)}
className="text-blue-600 hover:text-blue-700 font-semibold"
>
Add your first transaction
</button>
</div>
):(
<>
{/* Desktop Table View */}
<div className="hidden md:block overflow-x-auto">
<table className="w-full">
<thead className="bg-gray-50 border-b border-gray-200">
<tr>
<th className="px-4 py-3 text-left text-xs font-semibold text-gray-600 uppercase">Date</th>
<th className="px-4 py-3 text-left text-xs font-semibold text-gray-600
27
uppercase">Description</th>
<th className="px-4 py-3 text-left text-xs font-semibold text-gray-600
uppercase">Category</th>
<th className="px-4 py-3 text-left text-xs font-semibold text-gray-600
uppercase">Account</th>
<th className="px-4 py-3 text-right text-xs font-semibold text-gray-600
uppercase">Amount</th>
<th className="px-4 py-3 text-right text-xs font-semibold text-gray-600
uppercase">Actions</th>
</tr>
</thead>
<tbody className="divide-y divide-gray-200">
{[Link](transaction => (
<tr key={[Link]} className="hover:bg-gray-50">
<td className="px-4 py-3 text-sm text-gray-600">
{new Date([Link]).toLocaleDateString()}
</td>
<td className="px-4 py-3">
<div>
<p className="font-medium text-gray-900">{[Link]}</p>
{[Link] && (
<p className="text-xs text-gray-500">{[Link]}</p>
)}
</div>
</td>
<td className="px-4 py-3">
<span
className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium"
style={{
backgroundColor: `${[Link]?.color}20`,
color: [Link]?.color,
}}
>
{[Link]?.name}
</span>
</td>
<td className="px-4 py-3 text-sm text-gray-600">
{[Link]?.name}
</td>
<td className={`px-4 py-3 text-right font-semibold ${[Link] === 'income' ? 'text-
emerald-600' : 'text-red-600'
}`}>
{[Link] === 'income' ? '+' : '-'}₹{[Link](2)}
</td>
<td className="px-4 py-3 text-right">
<div className="flex items-center justify-end gap-2">
<button
onClick={() => handleEdit(transaction)}
className="p-1 hover:bg-gray-100 rounded transition-colors"
28
>
<Edit2 className="w-4 h-4 text-gray-600" />
</button>
<button
onClick={() => handleDelete([Link])}
className="p-1 hover:bg-red-50 rounded transition-colors"
>
<Trash2 className="w-4 h-4 text-red-600" />
</button>
</div>
</td>
</tr>
))}
</tbody>
</table>
</div>
29
{[Link] && (
<p className="text-xs text-gray-500 mb-3 italic">{[Link]}</p>
)}
{showModal && (
<TransactionModal
transaction={editingTransaction}
categories={categories}
accounts={accounts}
onClose={handleModalClose}
/>
)}
</div>
);
}
Expense Manager
import { useState, useEffect } from 'react';
import { supabase } from '../../lib/supabase';
import { useAuth } from '../../contexts/AuthContext';
import { Category } from '../../types';
import { Plus, Trash2, Tag } from 'lucide-react';
useEffect(() => {
if (user) loadCategories();
}, [user]);
try {
const newCategory = {
user_id: user!.id,
name: [Link](),
type: newCategoryType,
icon: 'Tag', // Default icon
color: '#6366f1', // Default color
is_system: false
};
setNewCategoryName('');
loadCategories();
} catch (error) {
[Link]('Error adding category:', error);
31
alert('Failed to add category');
} finally {
setSaving(false);
}
};
try {
const { error } = await supabase
.from('categories')
.delete()
.eq('id', id)
.eq('user_id', user!.id); // Security check
return (
<div className="bg-white rounded-xl shadow-sm p-6">
<h2 className="text-xl font-semibold text-gray-900 mb-4">Manage Categories</h2>
Analytics Engine
import { useState, useEffect } from 'react';
import { supabase } from '../../lib/supabase';
import { useAuth } from '../../contexts/AuthContext';
import { Transaction } from '../../types';
import { BarChart, Bar, LineChart, Line, PieChart, Pie, Cell, XAxis, YAxis, CartesianGrid, Tooltip,
Legend, ResponsiveContainer } from 'recharts';
import { TrendingUp, TrendingDown } from 'lucide-react';
33
interface AnalyticsData {
label: string;
expense: number;
income: number;
}
interface CategorySpending {
name: string;
value: number;
color: string;
}
useEffect(() => {
if (!user) return;
loadData();
}, [user, timeRange]);
if (cached) {
const { timestamp, data } = [Link](cached);
const cacheDate = new Date(timestamp);
const diffHours = ([Link]() - [Link]()) / (1000 * 60 * 60);
processCategoryData(txns);
calculateStats(txns);
// Note: We'd ideally wait for all state updates to finish before caching,
// but in this simple implementation we just cache the input data
// and assume the process functions work.
} catch (error) {
[Link]('Error loading analytics:', error);
} finally {
setLoading(false);
}
};
[Link]((txn) => {
const date = new Date([Link]);
const key = [Link]('en-US', { weekday: 'short', day: 'numeric' });
const data = [Link](key);
if (data) {
if ([Link] === 'expense') [Link] += [Link];
else [Link] += [Link];
}
});
setDailyData(
[Link]([Link]()).map(([label, data]) => ({
label,
...data,
}))
);
};
[Link]((txn) => {
const date = new Date([Link]);
const day = [Link]();
const diff = [Link]() - day;
const weekStart = new Date([Link](diff));
const key = `Wk ${[Link]('en-US', { month: 'short', day: 'numeric' })}`;
const data = [Link](key);
if (data) {
if ([Link] === 'expense') [Link] += [Link];
else [Link] += [Link];
}
});
setWeeklyData(
36
[Link]([Link]()).map(([label, data]) => ({
label,
...data,
}))
);
};
[Link]((txn) => {
const date = new Date([Link]);
if (date > new Date([Link](), [Link]() - 11, 1)) {
const key = [Link]('en-US', { month: 'short', year: '2-digit' });
const data = [Link](key);
if (data) {
if ([Link] === 'expense') [Link] += [Link];
else [Link] += [Link];
}
}
});
setMonthlyData(
[Link]([Link]()).map(([label, data]) => ({
label,
...data,
}))
);
};
txns
.filter((t) => new Date([Link]).getFullYear() === [Link]())
37
.forEach((txn) => {
const date = new Date([Link]);
const key = [Link]('en-US', { month: 'long' });
const data = [Link](key);
if (data) {
if ([Link] === 'expense') [Link] += [Link];
else [Link] += [Link];
}
});
setYearlyData(
[Link]([Link]()).map(([label, data]) => ({
label,
...data,
}))
);
};
txns
.filter((t) => [Link] === 'expense' && new Date([Link]) >= monthAgo)
.forEach((txn) => {
const current = [Link](txn.category_id) || 0;
[Link](txn.category_id, current + [Link]);
});
setStats({
totalExpense: [Link](totalExpense * 100) / 100,
totalIncome: [Link](totalIncome * 100) / 100,
netSavings: [Link]((totalIncome - totalExpense) * 100) / 100,
});
};
if (loading) {
return <div className="p-6 text-center text-gray-600">Loading analytics...</div>;
}
const displayData =
timeRange === 'day' ? dailyData :
timeRange === 'week' ? weeklyData :
timeRange === 'month' ? monthlyData :
yearlyData;
return (
<div className="space-y-6">
<div className="flex items-center justify-between">
<div>
<h1 className="text-3xl font-bold text-gray-900">Analytics & Reports</h1>
{lastCalculated && (
<p className="text-[10px] text-gray-400 font-bold uppercase tracking-widest mt-1">
• Cached data last computed {new Date(lastCalculated).toLocaleTimeString()}
</p>
)}
</div>
<div className="flex gap-2 bg-gray-100 p-1 rounded-xl">
<button
onClick={() => setTimeRange('day')}
className={`px-4 py-2 rounded-lg font-medium transition-all text-sm ${timeRange === 'day'
? 'bg-white shadow-sm text-blue-600'
: 'text-gray-500 hover:text-gray-700'
}`}
>
Daily
</button>
<button
onClick={() => setTimeRange('week')}
className={`px-4 py-2 rounded-lg font-medium transition-all text-sm ${timeRange === 'week'
? 'bg-white shadow-sm text-blue-600'
: 'text-gray-500 hover:text-gray-700'
}`}
>
Weekly
</button>
39
<button
onClick={() => setTimeRange('month')}
className={`px-4 py-2 rounded-lg font-medium transition-all text-sm ${timeRange === 'month'
? 'bg-white shadow-sm text-blue-600'
: 'text-gray-500 hover:text-gray-700'
}`}
>
Monthly
</button>
<button
onClick={() => setTimeRange('year')}
className={`px-4 py-2 rounded-lg font-medium transition-all text-sm ${timeRange === 'year'
? 'bg-white shadow-sm text-blue-600'
: 'text-gray-500 hover:text-gray-700'
}`}
>
Yearly
</button>
</div>
</div>
Investment Advisor
return (
<div className="space-y-8 p-6 bg-white rounded-[2.5rem] shadow-xl border border-gray-100">
<div className="flex items-center gap-4 mb-2">
<div className="bg-emerald-50 p-4 rounded-2xl">
<Shield className="w-8 h-8 text-emerald-600" />
</div>
<div>
<h2 className="text-2xl font-black text-gray-900 leading-tight">Security Hub</h2>
<p className="text-gray-500 font-medium">Professional Trust & Privacy Protocol</p>
</div>
</div>
User
createRoot([Link]('root')!).render(
<StrictMode>
<AuthProvider>
<App />
</AuthProvider>
</StrictMode>
);
44
CHAPTER-6
TESTING
During implementation, each module was tested individually before integrating it with other
modules. Special attention was given to SMS-based transaction detection, since it depends on
device permissions and different SMS formats. The testing process ensured that the
application handles permissions properly, processes data accurately, and provides correct
financial insights to the user.
Unit testing was performed to test individual components of the application in isolation.
Modules such as SMS reading, transaction parsing, expense categorization, analytics
calculations, investment guidance logic, and tax estimation were tested separately.
Each unit was provided with valid and invalid inputs to verify correct output and error
handling. Unit testing helped identify logical errors, incorrect calculations, and data-handling
issues before module integration. This testing improved code reliability and simplified
debugging.
45
6.2.2 Functional test
Functional testing was conducted to verify that each feature of the application works
according to the functional requirements. This includes testing automatic expense
detection, category assignment, expense summaries, dashboard display, investment
suggestions, and tax estimation results.
Various scenarios were tested, such as receiving multiple transaction SMS messages,
handling permission denial, and processing different transaction types. Functional testing
ensured that all features behave correctly from the user’s perspective.
System testing was performed after integrating all modules into a complete system. The entire
application was tested as a single unit to ensure smooth interaction between components such as
SMSPlugin, Expense Manager, Analytics Engine, and Database module.
This testing verified end-to-end functionality, from receiving an SMS to displaying analyzed
results on the user interface. System testing ensured that the application meets overall system
requirements and performs reliably in a real device environment.
Performance testing was carried out to evaluate the speed, responsiveness, and efficiency of the
Smart Spend application. The application was tested under normal and heavy data conditions,
such as processing multiple SMS messages and generating reports.
This testing ensured that the application loads quickly, processes transactions efficiently, and
does not consume excessive memory or battery power. Performance testing confirmed that the
application performs well on devices with limited hardware resources.
46
6.2.5 Integration Testing
Integration testing focused on verifying the data flow and interaction between different
modules of the system. The integration between SMSPlugin and Expense Manager, Expense
Manager and Analytics Engine, and Analytics Engine with Investment and Tax modules was
tested.
This testing ensured that transaction data extracted from SMS messages is correctly passed
through all modules without loss or corruption. Integration testing helped identify interface
mismatches and data dependency issues.
Users were able to track expenses automatically, view spending summaries, receive
investment guidance, and estimate taxes without difficulty. Successful acceptance testing
indicated that the system is ready for practical use and deployment.
A detailed test plan was prepared to guide the testing process. The test plan defines
the testing objectives, scope, test scenarios, test cases, testing environment, and expected
results.
The test plan ensures systematic and organized testing of the Smart Spend application.
It also helps track testing progress and ensures that all functional and non-functional
requirements are thoroughly tested before deployment.
47
. CHAPTER-7
OUTPUT SCREENS
48
REPORTS PAGE
ACCOUNTS PAGE
TRANSACTION PAGE
49
GOALS PAGE WEALTH CENTRE PAGE
PREDICATION PAGE
50
LOGIN PAGE MORE BUTTONS PAGE
SETTING/PROFILE PAGE
51
CHAPTER-8
FUTURE ENHANCEMENT
Although the Smart Spend application provides an effective solution for automatic expense
tracking, investment guidance, and tax estimation, there is significant scope for further
improvement and expansion. Future enhancements can make the system more intelligent,
secure, and user-friendly.
One major enhancement is the integration of machine learning techniques to improve
expense categorization and spending analysis. Currently, the system uses rule-based logic for
categorizing transactions. In the future, machine learning models can be trained using user
behavior to provide more accurate and personalized categorization and predictions.
Another possible enhancement is bank API integration using secure and government-
approved frameworks. This would allow real-time transaction synchronization directly from
bank accounts, reducing dependency on SMS-based alerts. Such integration can improve
accuracy and provide more detailed transaction information, subject to regulatory
compliance.
The application can also be enhanced by adding advanced budgeting features, such as smart
budget recommendations, overspending alerts, and goal-based budget planning. These
features would help users better control their expenses and achieve financial goals more
efficiently.
Future versions of the system can include investment portfolio tracking, where users can
manually add their investments and monitor performance over time. This would provide a
more comprehensive view of the user’s financial health in a single application.
CONCLUSION
52
The Smart Spend application successfully achieves its objective of providing an automated and
user-friendly personal finance management solution. The project addresses common financial
challenges faced by individuals, such as difficulty in tracking expenses, lack of financial awareness,
and limited understanding of investment planning and tax estimation.
By using SMS-based transaction detection, the system reduces the need for manual expense entry
and ensures accurate recording of financial transactions. The application effectively categorizes
expenses, analyses spending patterns, and presents meaningful insights that help users understand
and control their financial behaviour.
The inclusion of investment guidance and tax estimation features further enhances the usefulness of
the application. These features support informed financial planning without performing direct
financial transactions, ensuring safety, privacy, and regulatory compliance. The modular design of
the system allows easy maintenance and future enhancements.
53
REFERENCES
1. Android Developers,
Android SMS Permissions and Content Provider Documentation,
Available at: [Link]
2. Capacitor,
Capacitor Plugin Development Guide,
Available at: [Link]
3. Money View,
Expense Tracking and Financial Insights Features,
Available at: [Link]
4. Oracle,
Java Programming Language Documentation,
Available at: [Link]
5. GeeksforGeeks,
Android Development and Software Engineering Concepts,
Available at: [Link]
6. Investopedia,
Personal Finance, Investment, and Taxation Concepts,
Available at: [Link]
7. Open Source Initiative,
Software Development Models and Best Practices,
Available at: [Link]
54