A revolutionary approach to analyzing HDFC bank statements with intelligent transaction aggregation, global tagging system, and comprehensive analytics.
![]() |
![]() |
---|
- π Smart statement merging and reconciliation
- π Continuous transaction history
- π·οΈ Global tagging system
- π Comprehensive financial analytics
- π Advanced search and filtering
- π± Responsive design for all devices
- Never lose transaction history: Seamlessly merge multiple statements
- Community-driven insights: Share and use tags across users
- Intelligent categorization: Automatic pattern recognition
- Data integrity: Direct balance tracking from bank statements
- Privacy focused: Local processing with secure cloud storage
- Node.js 18+ or Bun runtime
- PostgreSQL database (with Supabase)
- Excel files (.xls/.xlsx) from HDFC Bank
- Sign up for an account
- Upload your first HDFC bank statement
- Analyze your spending patterns
- Explore transactions with automatic categorization
- Create and manage tags
The application uses a sophisticated merging algorithm that:
- Identifies overlapping date ranges using a B-tree data structure
- Deduplicates transactions based on unique reference numbers (chqRefNumber)
- Uses actual balances from bank statements
- Supports continuous statement uploads with automatic reconciliation
- Uses a B-tree to efficiently store and query date ranges
- O(log n) complexity for finding overlapping statements
- Optimizes memory usage for large datasets
- Hash-based transaction identification
- O(1) lookup time using Map data structures
- Consistent handling of duplicate entries across multiple statements
- Implements sliding window algorithm for transaction tags
- Processes large datasets in configurable batch sizes
- Prevents memory overload while maintaining performance
- Shared tag repository across users
- Efficient transaction-tag relationship management
- Real-time tag updates with optimistic UI
-
Batch Processing
- Processes tags in batches of 100 transactions
- Implements request throttling to prevent API overload
- Uses Map data structure for O(1) lookups
-
Caching
- In-memory caching of tag data
- Optimistic updates for better UX
- State management with React Context
-
Database Design
- Efficient indexing on chqRefNumber
- Normalized schema for tags and transactions
- Optimized queries for large datasets
-
Upload & Parse
Excel File β Parser β Transaction Objects β Validation β Storage
-
Merging Algorithm
New Statement β Find Overlaps β Deduplicate β Validate Balances β Merge
-
Tag Management
Global Tags β β Transaction Tags β β Batch Processing
My latest approach significantly improves performance and data management:
graph TD
A[New Statement] --> B[Extract Transactions]
B --> C[Merge with Super Statement]
C --> E[Update Summary]
E --> F[Save to Database]
subgraph "Super Statement Table"
G[JSON Transactions]
H[Date Range]
I[Summary Stats]
end
F --> G
F --> H
F --> I
Key Improvements:
- Single table storage instead of multiple statement records
- Built-in deduplication using chqRefNumber
- Direct balance tracking from source
- Efficient JSON-based transaction storage
- Maintains running balances across merged statements
graph TD
A[Transaction List] --> B[Bulk Tag Fetch]
B --> C[Map Construction]
C --> D[Constant Time Tag Lookups]
E[Tag Updates] --> F[Optimistic UI Update]
F --> G[Background Sync]
subgraph "Memory Cache"
C
D
end
subgraph "Database"
H[Tags Table]
I[Transaction Tags]
end
G --> H
G --> I
Key Features:
- Efficient bulk tag fetching with getAllTransactionTags
- O(1) tag lookups using Map data structure
- Batch operations for tag updates
- Optimistic UI updates for better UX
- Real-time tag synchronization
flowchart LR
subgraph V1_Data_Flow_Legacy ["V1 Data Flow (Legacy)"]
U1[User Upload]
P1[Parser]
SSM1[Super Statement Manager]
TC1[Transaction Context]
UI1[UI]
SS1[Statement Storage]
TM1[Tag Manager]
U1 --> P1 --> SSM1 --> TC1 --> UI1
P1 --> SS1
TM1 --> SSM1
end
flowchart LR
subgraph V2_Data_Flow_Current ["V2 Data Flow (Current)"]
U2[User Upload]
P2[Parser]
SSM2[Super Statement Manager- JSON]
TC2[Transaction Context - Map]
UI2[UI]
TM2[Tag Manager - Batch Ops]
OU2[Optimistic Updates]
U2 --> P2 --> SSM2 --> TC2 --> UI2
P2 --> TM2 --> SSM2
TC2 --> OU2
end
-
Intelligent Aggregation
- First-of-its-kind continuous statement merging
- Accurate balance tracking from source statements
- Smart deduplication across multiple statements
-
Global Tag System
- Community-driven transaction categorization
- Shared knowledge base of transaction types
- Cross-user tag suggestions
-
Advanced Analytics
- Comprehensive transaction analysis
- Pattern recognition in spending
- Historical trend analysis
-
User Experience
- Seamless statement upload and processing
- Real-time feedback and validation
- Intuitive tag management
-
SuperStatementManager
- Handles statement merging
- Maintains data integrity
- Uses B-tree for date range queries
-
TagManager
- Global tag repository
- Efficient batch processing
- Real-time updates
-
StatementParser
- Excel file parsing
- Data validation
- Transaction normalization
-
Trees
- B-tree for date range management
- Tree traversal for finding overlaps
- O(log n) operations
-
Hash Tables
- Transaction deduplication
- Tag lookup optimization
- O(1) access time
-
Sliding Window
- Batch processing of transactions
- Memory optimization
- Network request management
-
Graphs
- Transaction relationship mapping
- Tag relationship analysis
- Pattern detection
class DateRangeNode {
startDate: Date;
endDate: Date;
left?: DateRangeNode;
right?: DateRangeNode;
// O(log n) insertion
insert(node: DateRangeNode) {
if (node.startDate < this.startDate) {
if (!this.left) this.left = node;
else this.left.insert(node);
} else {
if (!this.right) this.right = node;
else this.right.insert(node);
}
}
// O(log n) overlap check
findOverlaps(range: DateRange): DateRangeNode[] {
const overlaps: DateRangeNode[] = [];
if (this.overlaps(range)) overlaps.push(this);
if (range.start < this.startDate && this.left) {
overlaps.push(...this.left.findOverlaps(range));
}
if (range.end > this.startDate && this.right) {
overlaps.push(...this.right.findOverlaps(range));
}
return overlaps;
}
}
async function processTags(transactions: Transaction[]) {
const BATCH_SIZE = 100;
const WINDOW_DELAY = 200; // ms
for (let i = 0; i < transactions.length; i += BATCH_SIZE) {
const batch = transactions.slice(i, i + BATCH_SIZE);
await processTransactionBatch(batch);
// Sliding window delay to prevent API overload
if (i + BATCH_SIZE < transactions.length) {
await new Promise(resolve => setTimeout(resolve, WINDOW_DELAY));
}
}
}
Feature | Traditional Approach | HDFC Account Explorer |
---|---|---|
Statement Management | Manual reconciliation | Automatic merging |
Transaction History | Limited to single statement | Continuous history |
Tagging | Individual categories | Global tag system |
Performance | O(n) linear search | O(log n) with B-tree |
Deduplication | Manual checking | Automatic with hashing |
Scalability | Limited by memory | Batch processing |
HDFC Account Explorer represents a revolutionary approach to bank statement analysis by combining advanced data structures, efficient algorithms, and user-friendly features. The application's ability to intelligently merge statements, manage global tags, and provide comprehensive analytics makes it a powerful tool for personal finance management.
By leveraging sophisticated DSA concepts like B-trees, sliding windows, and hash-based deduplication, we've created a scalable solution that handles large datasets efficiently while maintaining excellent performance.
The use of sophisticated DSA concepts ensures optimal performance and scalability, while the thoughtful architecture provides a seamless user experience. This makes it not just a statement viewer, but a comprehensive financial analysis platform.
graph TD
A[Excel Upload] --> B[Statement Parser]
B --> C[Super Statement Manager]
C --> D[Transaction Context]
D --> E[UI Components]
F[Tag Manager] --> D
C --> G[(Supabase DB)]
F --> G
subgraph "Data Processing"
B
C
F
end
subgraph "State Management"
D
end
subgraph "Presentation"
E
end
We welcome contributions! Here's how you can help:
- Bug Reports: Open issues with detailed descriptions
- Feature Requests: Share ideas for improvements
- Code Contributions:
- Fork the repository
- Create a feature branch
- Submit a pull request
- Follow TypeScript best practices
- Write tests for new features
- Update documentation
- Follow the existing code style
MIT License - feel free to use this project for your personal or commercial needs.
Need help? Here's how to get support:
- π Documentation
- π¬ Discussions
- π Bug Reports