Skip to content

CmdShiftExecute/CardPulse

Repository files navigation

πŸ’³ CardPulse

Feel your spending rhythm

A privacy-first credit card expense tracker with smart NLP entry, multi-card billing cycle management, 6 color themes, and deep analytics β€” built entirely offline with no cloud dependencies.

Next.js TypeScript Tailwind CSS SQLite Recharts License: MIT Version


πŸ”’ Your financial data never leaves your machine. No cloud. No API calls. No telemetry. Just you and your SQLite database.


CardPulse Dashboard

✨ Key Features

🧠 Smart Transaction Entry

  • NLP Quick Add β€” type "enoc 200 fab card yesterday" and the offline parser extracts amount, category, card, date, and labels
  • Manual Entry β€” full form with dropdowns for when you want control
  • Self-Learning β€” correct a parse and it remembers for next time
  • 91 pre-seeded keyword rules for popular merchants

πŸ’³ Multi-Card Management

  • Track 5+ credit cards with real billing cycles
  • Statement dates, due dates, credit limits
  • Credit utilization tracking with color-coded thresholds
  • Card aliases for NLP recognition

πŸ“Š Rich Analytics (7 tabs)

  • Trends β€” overall, category, and label spending over time
  • Compare β€” month-vs-month grouped bars and delta tables
  • Monthly Drilldown β€” interactive donut charts
  • Cycles β€” 3-cycle billing timeline per card
  • Cards β€” per-card area charts and grouped bars
  • EMIs β€” installment landscape view
  • Budgets β€” budget vs. actual progress

🎨 Theme System

  • 6 themes β€” Sage, Midnight, Cyberpunk, Molten, Mono, Terminal
  • Dark + Light modes β€” 12 visual combinations
  • CSS variable architecture with instant switching
  • Flash-prevention for seamless page loads

πŸ“¦ EMI Tracker

  • Manage installment plans across cards
  • Auto-generation prompts each billing cycle
  • Progress tracking with completion dates
  • EMI amounts reflected in card cycle estimates

🎯 Budget Management

  • Set monthly budgets per category or subcategory
  • Visual progress bars (🟒 green / 🟑 gold / πŸ”΄ red)
  • Dashboard strip + analytics tab

πŸ“₯ Export Reports

  • Styled XLSX with blue headers, green amounts, label summaries
  • Month selector + currency conversion rate
  • Professional formatting ready for sharing

βš™οΈ Full Settings

  • Currency, date format, number format
  • 6 color themes Γ— 2 modes
  • PIN security (enable/disable/change)
  • Database backup & restore
  • Keyword rules, labels, and categories management

🏠 Smart Dashboard

  • Per-card spending breakdown
  • Payment ticker with due date countdowns
  • Category & label donuts with click-to-drill
  • Credit utilization overview

πŸ“Έ Screenshots

🏠 Dashboard
Dashboard

Dashboard - Category & Label Donuts
⚑ NLP Smart Entry
NLP Quick Add
πŸ“‹ Transaction List
Transactions
πŸ“ˆ Analytics β€” Trends
Trends Area Chart

Trends Overview

Category Trends
πŸ”€ Analytics β€” Compare
Compare Overview

Compare Bars

Compare Delta Table
🍩 Analytics β€” Monthly Drilldown
Monthly Drilldown
⏱️ Analytics β€” Billing Cycles
Billing Cycles
πŸ’³ Analytics β€” Cards
All Cards

Single Card Area Chart
πŸ’³ Card Management
Cards
πŸ“¦ EMI Tracker
EMIs
🎯 Budgets
Budgets

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ (download)
  • npm 9+ (comes with Node.js)

Installation

# Clone the repository
git clone https://github.com/CmdShiftExecute/Personal-Projects.git
cd Personal-Projects/cardpulse

# Install dependencies
npm install

# Start the development server
npm run dev

Open http://localhost:3000 β€” you'll be guided through PIN setup on first launch.

🎬 First Run

Step What Happens
1️⃣ Database auto-created with categories, labels, keyword rules
2️⃣ Create your PIN (4–6 digits, bcrypt-hashed)
3️⃣ Dashboard loads β€” add your first transaction via Quick Add
4️⃣ Explore Analytics once you have a few transactions

πŸ’‘ Tip: The PIN can be disabled from Settings > Security if you're running locally. See the Getting Started guide for details.


πŸ“š Documentation Portal

For detailed information, refer to the guides in the docs/ folder:

Document Target Audience Description
πŸš€ Getting Started New Users Installation, first run, PIN setup, your first transaction
🏠 Dashboard Guide All Users Every dashboard section explained with interactions
✏️ Transaction Entry All Users NLP quick-add, manual entry, learning, bulk operations
πŸ’³ Card Management All Users Credit cards, billing cycles, aliases, utilization
πŸ“¦ EMI Tracker All Users Installment plans, auto-generation, progress tracking
πŸ“Š Analytics Deep Dive All Users All 7 analytics tabs in detail
🎯 Budgets All Users Setting and tracking monthly spending limits
βš™οΈ Settings Reference All Users All 8 settings sections (themes, currency, backup, etc.)
πŸ“₯ Export Reports All Users XLSX export format and options
πŸ—οΈ Architecture Overview Developers Tech stack, DB schema, API routes, system design
🚒 Deployment Guide Developers Local dev, production, VPS, SQLite considerations

πŸ› οΈ Tech Stack

Layer Technology Purpose
Framework Next.js 14 (App Router) Full-stack React with API routes
Language TypeScript (strict mode) Type safety for financial data
Styling Tailwind CSS 3.4 Utility-first with CSS variable themes
Database SQLite via better-sqlite3 Zero config, local-first, single file
ORM Drizzle ORM Lightweight, type-safe, SQLite-native
Charts Recharts Composable React-native charting
NLP/Matching Fuse.js + custom rules Offline fuzzy matching, no LLM
Export ExcelJS Styled XLSX with formatting
Animations Framer Motion Subtle micro-interactions
Icons Lucide React Clean, consistent iconography
Fonts Inter + JetBrains Mono Via next/font/google

πŸ“ Project Structure

cardpulse/
β”œβ”€β”€ πŸ“‚ src/app/                    # Pages + API routes
β”‚   β”œβ”€β”€ dashboard/                 #   Main dashboard
β”‚   β”œβ”€β”€ transactions/              #   Transaction list + entry
β”‚   β”œβ”€β”€ cards/                     #   Card management
β”‚   β”œβ”€β”€ emis/                      #   EMI tracker
β”‚   β”œβ”€β”€ analytics/                 #   7-tab analytics
β”‚   β”œβ”€β”€ budgets/                   #   Budget management
β”‚   β”œβ”€β”€ settings/                  #   8-section settings
β”‚   └── api/                       #   19 API endpoints
β”‚
β”œβ”€β”€ πŸ“‚ src/components/             # React components
β”‚   β”œβ”€β”€ ui/                        #   Reusable primitives
β”‚   β”œβ”€β”€ layout/                    #   Sidebar, header, ticker
β”‚   β”œβ”€β”€ providers/                 #   Theme context
β”‚   β”œβ”€β”€ dashboard/                 #   Dashboard sections
β”‚   β”œβ”€β”€ analytics/                 #   Charts and insight cards
β”‚   └── ...                        #   Cards, EMIs, budgets, etc.
β”‚
β”œβ”€β”€ πŸ“‚ src/lib/                    # Core logic
β”‚   β”œβ”€β”€ db/                        #   Schema, seed, queries
β”‚   β”œβ”€β”€ nlp/                       #   4-stage NLP parser
β”‚   β”œβ”€β”€ export/                    #   XLSX generator
β”‚   β”œβ”€β”€ format.ts                  #   Currency/date formatting
β”‚   β”œβ”€β”€ cycle-utils.ts             #   Billing cycle math
β”‚   └── chart-utils.ts             #   Shared chart helpers
β”‚
β”œβ”€β”€ πŸ“‚ docs/                       # Documentation (11 guides)
β”œβ”€β”€ πŸ“‚ data/                       # SQLite database (gitignored)
└── πŸ“‚ drizzle/                    # Generated migrations

βš™οΈ Configuration

Environment Variables

Variable Default Description
DB_PATH ./data/cardpulse.db Path to the SQLite database file

Set in .env.local:

DB_PATH=./data/cardpulse.db

No other environment variables needed. No API keys, no cloud services.

Application Settings

All settings are configurable from the Settings page:

Setting Default Options
Currency AED AED, USD, EUR, GBP, INR, SAR, ...
Date Format DD/MM DD/MM, MM/DD
Number Format 1,234.56 comma_period, period_comma
Theme Sage Sage, Midnight, Cyberpunk, Molten, Mono, Terminal
Color Mode Dark Dark, Light
PIN Enabled Enable/Disable/Change

πŸ“Š At a Glance

Metric Count
πŸ“„ Pages 9 (Dashboard, Transactions, Cards, EMIs, Analytics, Budgets, Settings, Lock, Setup)
πŸ”Œ API Routes 19 (CRUD + analytics + exports + NLP + auth + settings)
🧩 Components 70+ (UI primitives, page sections, charts, forms)
πŸ—„οΈ DB Tables 11 (cards, transactions, categories, subcategories, labels, keyword_rules, emis, budgets, settings, cycle_payments, transaction_labels)
πŸ” Keyword Rules 91 pre-seeded (popular merchants, banks, services)
🏷️ Labels 25 system labels + unlimited custom
πŸ“‚ Categories 11 main β†’ 68 subcategories
🎨 Themes 6 themes Γ— 2 modes = 12 combinations

🀝 Contributing

CardPulse is a personal project built as a portfolio piece. Contributions, suggestions, and bug reports are welcome! Feel free to open an issue or submit a pull request.


πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


Built with β˜• and πŸ’³ in Dubai, UAE

CardPulse v2.0 β€” developed across 14+ sessions using Claude Code as an AI pair programmer.


Made with Next.js Styled with Tailwind Powered by SQLite

About

A credit card expense tracker with NLP-powered quick entry, billing cycle intelligence, EMI tracking, and rich analytics. Built with Next.js, TypeScript, Tailwind CSS, and SQLite.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors