{"id":30102401,"url":"https://github.com/myselfshravan/hdfc-statement-explorer","last_synced_at":"2026-04-14T03:32:51.692Z","repository":{"id":299052610,"uuid":"972181795","full_name":"myselfshravan/hdfc-statement-explorer","owner":"myselfshravan","description":"A tool for efficiently managing HDFC bank statements. It allows users to upload, parse, and consolidate statements, providing transaction summaries, running balances, and secure access.","archived":false,"fork":false,"pushed_at":"2025-08-06T18:59:47.000Z","size":2291,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-06T20:36:35.667Z","etag":null,"topics":["dashboard","dsa-algorithm","hdfc","parser","pgsql","shardcn","statement","supabase","typescript","vite"],"latest_commit_sha":null,"homepage":"https://hdfc-statement-explorer.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/myselfshravan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-24T16:58:54.000Z","updated_at":"2025-08-06T18:59:50.000Z","dependencies_parsed_at":"2025-06-14T11:38:42.192Z","dependency_job_id":"354ec03d-8674-4ce1-8b50-756f40d7bca1","html_url":"https://github.com/myselfshravan/hdfc-statement-explorer","commit_stats":null,"previous_names":["myselfshravan/hdfc-account-explorer","myselfshravan/hdfc-statement-explorer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/myselfshravan/hdfc-statement-explorer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myselfshravan%2Fhdfc-statement-explorer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myselfshravan%2Fhdfc-statement-explorer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myselfshravan%2Fhdfc-statement-explorer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myselfshravan%2Fhdfc-statement-explorer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/myselfshravan","download_url":"https://codeload.github.com/myselfshravan/hdfc-statement-explorer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myselfshravan%2Fhdfc-statement-explorer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31781292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dashboard","dsa-algorithm","hdfc","parser","pgsql","shardcn","statement","supabase","typescript","vite"],"created_at":"2025-08-09T20:01:21.731Z","updated_at":"2026-04-14T03:32:51.676Z","avatar_url":"https://github.com/myselfshravan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HDFC Account Explorer\n\nA revolutionary approach to analyzing HDFC bank statements with intelligent transaction aggregation, global tagging system, and comprehensive analytics.\n\n## 🌟 Key Features\n\n![File Upload Interface](screenshots/file_upload.png)\n\n| ![Anonymous Mode](screenshots/anonymous_mode.png) | ![Anonymous Warning](screenshots/anonymous_warn.png) |\n|:--:|:--:|\n\n![Transaction Analysis](screenshots/transactions.png)\n![Transaction Analysis](screenshots/transaction_analysis.png)\n![Statement Analysis](screenshots/statement_analysis.png)\n![Visualization](screenshots/visualization.png)\n![Tag Management](screenshots/tag_manage.png)\n\n- 📊 Smart statement merging and reconciliation\n- 🔄 Continuous transaction history\n- 🏷️ Global tagging system\n- 📈 Comprehensive financial analytics\n- 🔍 Advanced search and filtering\n- 📱 Responsive design for all devices\n\n## Why HDFC Account Explorer?\n\n- **Never lose transaction history**: Seamlessly merge multiple statements\n- **Community-driven insights**: Share and use tags across users\n- **Intelligent categorization**: Automatic pattern recognition\n- **Data integrity**: Direct balance tracking from bank statements\n- **Privacy focused**: Local processing with secure cloud storage\n\n## Quick Start\n\n### Prerequisites\n\n- Node.js 18+ or Bun runtime\n- PostgreSQL database (with Supabase)\n- Excel files (.xls/.xlsx) from HDFC Bank\n\n### First Steps\n\n1. Sign up for an account\n2. Upload your first HDFC bank statement\n   ![File Upload Interface](screenshots/file_upload.png)\n3. Analyze your spending patterns\n   ![Statement Analysis](screenshots/statement_analysis.png)\n4. Explore transactions with automatic categorization\n   ![Transaction Analysis](screenshots/transactions.png)\n5. Create and manage tags\n   ![Tag Management](screenshots/tag_manage.png)\n\n## Features\n\n### 1. Intelligent Statement Merging \u0026 Aggregation\n\nThe application uses a sophisticated merging algorithm that:\n\n- Identifies overlapping date ranges using a B-tree data structure\n- Deduplicates transactions based on unique reference numbers (chqRefNumber)\n- Uses actual balances from bank statements\n- Supports continuous statement uploads with automatic reconciliation\n\n### 2. Advanced Data Structures \u0026 Algorithms\n\n#### B-tree for Date Range Management\n\n- Uses a B-tree to efficiently store and query date ranges\n- O(log n) complexity for finding overlapping statements\n- Optimizes memory usage for large datasets\n\n#### Transaction Deduplication\n\n- Hash-based transaction identification\n- O(1) lookup time using Map data structures\n- Consistent handling of duplicate entries across multiple statements\n\n#### Batch Processing with Sliding Window\n\n- Implements sliding window algorithm for transaction tags\n- Processes large datasets in configurable batch sizes\n- Prevents memory overload while maintaining performance\n\n### 3. Global Tagging System\n\n- Shared tag repository across users\n- Efficient transaction-tag relationship management\n- Real-time tag updates with optimistic UI\n\n### 4. Performance Optimizations\n\n1. **Batch Processing**\n   - Processes tags in batches of 100 transactions\n   - Implements request throttling to prevent API overload\n   - Uses Map data structure for O(1) lookups\n\n2. **Caching**\n   - In-memory caching of tag data\n   - Optimistic updates for better UX\n   - State management with React Context\n\n3. **Database Design**\n   - Efficient indexing on chqRefNumber\n   - Normalized schema for tags and transactions\n   - Optimized queries for large datasets\n\n## Technical Architecture\n\n### V1 Approach (Legacy)\n\n#### Statement Processing Pipeline (V1)\n\n1. **Upload \u0026 Parse**\n\n   ```plaintext\n   Excel File → Parser → Transaction Objects → Validation → Storage\n   ```\n\n2. **Merging Algorithm**\n\n   ```plaintext\n   New Statement → Find Overlaps → Deduplicate → Validate Balances → Merge\n   ```\n\n3. **Tag Management**\n\n   ```plaintext\n   Global Tags ← → Transaction Tags ← → Batch Processing\n   ```\n\n### V2 Approach (Current)\n\nMy latest approach significantly improves performance and data management:\n\n#### Super Statement Management\n\n```mermaid\ngraph TD\n    A[New Statement] --\u003e B[Extract Transactions]\n    B --\u003e C[Merge with Super Statement]\n    C --\u003e E[Update Summary]\n    E --\u003e F[Save to Database]\n\n    subgraph \"Super Statement Table\"\n        G[JSON Transactions]\n        H[Date Range]\n        I[Summary Stats]\n    end\n\n    F --\u003e G\n    F --\u003e H\n    F --\u003e I\n```\n\nKey Improvements:\n\n- Single table storage instead of multiple statement records\n- Built-in deduplication using chqRefNumber\n- Direct balance tracking from source\n- Efficient JSON-based transaction storage\n- Maintains running balances across merged statements\n\n#### Tag Management System\n\n```mermaid\ngraph TD\n    A[Transaction List] --\u003e B[Bulk Tag Fetch]\n    B --\u003e C[Map Construction]\n    C --\u003e D[Constant Time Tag Lookups]\n    \n    E[Tag Updates] --\u003e F[Optimistic UI Update]\n    F --\u003e G[Background Sync]\n    \n    subgraph \"Memory Cache\"\n        C\n        D\n    end\n    \n    subgraph \"Database\"\n        H[Tags Table]\n        I[Transaction Tags]\n    end\n    \n    G --\u003e H\n    G --\u003e I\n```\n\nKey Features:\n\n- Efficient bulk tag fetching with getAllTransactionTags\n- O(1) tag lookups using Map data structure\n- Batch operations for tag updates\n- Optimistic UI updates for better UX\n- Real-time tag synchronization\n\n### V1 Data Flow (Legacy)\n\n```mermaid\nflowchart LR\n  subgraph V1_Data_Flow_Legacy [\"V1 Data Flow (Legacy)\"]\n    U1[User Upload]\n    P1[Parser]\n    SSM1[Super Statement Manager]\n    TC1[Transaction Context]\n    UI1[UI]\n    SS1[Statement Storage]\n    TM1[Tag Manager]\n\n    U1 --\u003e P1 --\u003e SSM1 --\u003e TC1 --\u003e UI1\n    P1 --\u003e SS1\n    TM1 --\u003e SSM1\n  end\n```\n\n### V2 Data Flow (Current)\n\n```mermaid\nflowchart LR  \n  subgraph V2_Data_Flow_Current [\"V2 Data Flow (Current)\"]\n    U2[User Upload]\n    P2[Parser]\n    SSM2[Super Statement Manager- JSON]\n    TC2[Transaction Context - Map]\n    UI2[UI]\n    TM2[Tag Manager - Batch Ops]\n    OU2[Optimistic Updates]\n\n    U2 --\u003e P2 --\u003e SSM2 --\u003e TC2 --\u003e UI2\n    P2 --\u003e TM2 --\u003e SSM2\n    TC2 --\u003e OU2\n  end\n```\n\n## Revolutionary Aspects\n\n1. **Intelligent Aggregation**\n   - First-of-its-kind continuous statement merging\n   - Accurate balance tracking from source statements\n   - Smart deduplication across multiple statements\n\n2. **Global Tag System**\n   - Community-driven transaction categorization\n   - Shared knowledge base of transaction types\n   - Cross-user tag suggestions\n\n3. **Advanced Analytics**\n   - Comprehensive transaction analysis\n   - Pattern recognition in spending\n   - Historical trend analysis\n\n4. **User Experience**\n   - Seamless statement upload and processing\n   - Real-time feedback and validation\n   - Intuitive tag management\n\n## Implementation Details\n\n### Core Components\n\n1. **SuperStatementManager**\n   - Handles statement merging\n   - Maintains data integrity\n   - Uses B-tree for date range queries\n\n2. **TagManager**\n   - Global tag repository\n   - Efficient batch processing\n   - Real-time updates\n\n3. **StatementParser**\n   - Excel file parsing\n   - Data validation\n   - Transaction normalization\n\n### DSA Concepts Used\n\n1. **Trees**\n   - B-tree for date range management\n   - Tree traversal for finding overlaps\n   - O(log n) operations\n\n2. **Hash Tables**\n   - Transaction deduplication\n   - Tag lookup optimization\n   - O(1) access time\n\n3. **Sliding Window**\n   - Batch processing of transactions\n   - Memory optimization\n   - Network request management\n\n4. **Graphs**\n   - Transaction relationship mapping\n   - Tag relationship analysis\n   - Pattern detection\n\n## DSA Concepts in Action\n\n### Example 1: Statement Merging with B-tree\n\n```typescript\nclass DateRangeNode {\n  startDate: Date;\n  endDate: Date;\n  left?: DateRangeNode;\n  right?: DateRangeNode;\n  \n  // O(log n) insertion\n  insert(node: DateRangeNode) {\n    if (node.startDate \u003c this.startDate) {\n      if (!this.left) this.left = node;\n      else this.left.insert(node);\n    } else {\n      if (!this.right) this.right = node;\n      else this.right.insert(node);\n    }\n  }\n  \n  // O(log n) overlap check\n  findOverlaps(range: DateRange): DateRangeNode[] {\n    const overlaps: DateRangeNode[] = [];\n    if (this.overlaps(range)) overlaps.push(this);\n    if (range.start \u003c this.startDate \u0026\u0026 this.left) {\n      overlaps.push(...this.left.findOverlaps(range));\n    }\n    if (range.end \u003e this.startDate \u0026\u0026 this.right) {\n      overlaps.push(...this.right.findOverlaps(range));\n    }\n    return overlaps;\n  }\n}\n```\n\n### Example 2: Batch Processing with Sliding Window\n\n```typescript\nasync function processTags(transactions: Transaction[]) {\n  const BATCH_SIZE = 100;\n  const WINDOW_DELAY = 200; // ms\n\n  for (let i = 0; i \u003c transactions.length; i += BATCH_SIZE) {\n    const batch = transactions.slice(i, i + BATCH_SIZE);\n    await processTransactionBatch(batch);\n    \n    // Sliding window delay to prevent API overload\n    if (i + BATCH_SIZE \u003c transactions.length) {\n      await new Promise(resolve =\u003e setTimeout(resolve, WINDOW_DELAY));\n    }\n  }\n}\n```\n\n## Comparison with Traditional Methods\n\n| Feature | Traditional Approach | HDFC Account Explorer |\n|---------|-------------------|---------------------|\n| Statement Management | Manual reconciliation | Automatic merging |\n| Transaction History | Limited to single statement | Continuous history |\n| Tagging | Individual categories | Global tag system |\n| Performance | O(n) linear search | O(log n) with B-tree |\n| Deduplication | Manual checking | Automatic with hashing |\n| Scalability | Limited by memory | Batch processing |\n\n## Summary\n\nHDFC 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.\n\nBy 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.\n\nThe 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.\n\n## Architecture Overview\n\n```mermaid\ngraph TD\n    A[Excel Upload] --\u003e B[Statement Parser]\n    B --\u003e C[Super Statement Manager]\n    C --\u003e D[Transaction Context]\n    D --\u003e E[UI Components]\n    \n    F[Tag Manager] --\u003e D\n    C --\u003e G[(Supabase DB)]\n    F --\u003e G\n    \n    subgraph \"Data Processing\"\n        B\n        C\n        F\n    end\n    \n    subgraph \"State Management\"\n        D\n    end\n    \n    subgraph \"Presentation\"\n        E\n    end\n```\n\n## Contributing\n\nWe welcome contributions! Here's how you can help:\n\n1. **Bug Reports**: Open issues with detailed descriptions\n2. **Feature Requests**: Share ideas for improvements\n3. **Code Contributions**:\n   - Fork the repository\n   - Create a feature branch\n   - Submit a pull request\n\n### Development Guidelines\n\n- Follow TypeScript best practices\n- Write tests for new features\n- Update documentation\n- Follow the existing code style\n\n## License\n\nMIT License - feel free to use this project for your personal or commercial needs.\n\n## Support\n\nNeed help? Here's how to get support:\n\n- 📖 [Documentation](README.md)\n- 💬 [Discussions](https://github.com/myselfshravan/hdfc-account-explorer/discussions)\n- 🐛 [Bug Reports](https://github.com/myselfshravan/hdfc-account-explorer/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyselfshravan%2Fhdfc-statement-explorer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyselfshravan%2Fhdfc-statement-explorer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyselfshravan%2Fhdfc-statement-explorer/lists"}