Skip to content

Repository files navigation

πŸ’° CashCue

AI-Powered Personal Finance & Tax Optimization Platform

A comprehensive financial management application built with React, TypeScript, and Firebase, featuring real-time Indian stock market integration and AI-driven tax insights.

TypeScript React Firebase Vite Tailwind CSS

πŸ”— Live Demo: https://cashcue.vercel.app/

Features β€’ Demo β€’ Installation β€’ Usage β€’ Tech Stack


🎯 Overview

CashCue is an intelligent financial management platform that helps users track expenses, manage investment portfolios, and optimize taxes using AI-powered insights. With real-time Indian stock market data integration and smart budget tracking, CashCue makes personal finance management effortless.

✨ Features

πŸ“Š Portfolio Management

  • Real-time Stock Prices: Integration with Indian Stock Market API (NSE/BSE)
  • Auto-refresh: Prices update automatically every 5 minutes
  • Manual Refresh: On-demand price updates with loading indicators
  • Market Status: Live display of market hours (9:15 AM - 3:30 PM IST)
  • Tax Classification: Automatic STCG/LTCG classification
  • Performance Metrics: Gain/loss tracking, holding period analysis

πŸ’Έ Expense Tracking

  • Smart Categorization: 7+ categories (Food, Transport, Healthcare, Utilities, etc.)
  • SMS Integration: Auto-parse expense SMS messages
  • Budget Alerts: Real-time budget status and warnings
  • Visual Analytics: Monthly spending charts and trends
  • Date-based Filtering: Track expenses by date range

πŸ€– AI-Powered Insights

  • Tax Optimization: AI-driven tax-loss harvesting recommendations
  • Portfolio Health Score: Comprehensive portfolio analysis
  • Scenario Comparison: What-if analysis for tax planning
  • Urgent Actions: Highlighted time-sensitive recommendations
  • Timeline View: Tax planning calendar and deadlines

πŸ’° Budget Management

  • Monthly Budgets: Set and track monthly spending limits
  • Category Budgets: Individual budgets for each expense category
  • Smart Recommendations: AI-powered budget suggestions
  • Real-time Updates: Live budget status and remaining amounts
  • Overspending Alerts: Proactive warnings when nearing limits

🎨 User Experience

  • Dark Theme: Beautiful, modern dark UI optimized for readability
  • Responsive Design: Works seamlessly on desktop, tablet, and mobile
  • Real-time Sync: Firebase integration for instant data updates
  • Secure Authentication: Firebase Auth with email/password

πŸ–ΌοΈ Demo

πŸ“Ή View Demo Videos & Screenshots


πŸš€ Installation

Prerequisites

  • Node.js 18+ and npm
  • Firebase Account with Firestore database
  • Groq API Key (for AI features)

1. Clone the Repository

git clone https://github.com/amanbangeraa/CashCue.git
cd CashCue

2. Install Dependencies

npm install

3. Configure Environment Variables

Create a .env file in the root directory:

# Groq AI API Key
VITE_GROQ_API_KEY=your_groq_api_key_here

# Firebase Configuration
VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-project.firebasestorage.app
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
VITE_FIREBASE_MEASUREMENT_ID=your_measurement_id

4. Set Up Firebase

  1. Go to Firebase Console
  2. Create a new project (or use existing)
  3. Enable Authentication β†’ Email/Password
  4. Create Firestore Database in production mode
  5. Copy configuration values to .env

5. Start Development Server

npm run dev

Open http://localhost:5173 in your browser.


πŸ“– Usage

First-Time Setup

  1. Sign Up: Create an account using email and password
  2. Add Stocks: Navigate to Portfolio β†’ Add your stock holdings
  3. Track Expenses: Go to Expenses β†’ Add your first expense
  4. Set Budget: Visit Budget β†’ Configure monthly limits

Seeding Demo Data

To quickly populate your portfolio with demo data for testing:

npm run seed-portfolio <your-email> <your-password>

Example:

npm run seed-portfolio demo@test.com MyPassword123

This adds 9 demo stocks (~β‚Ή13.5L portfolio) perfect for AI analysis.

Key Workflows

πŸ“ˆ Portfolio Management

  1. Add stocks with ticker symbols (e.g., INFY.NS, RELIANCE.NS)
  2. Prices auto-refresh every 5 minutes
  3. View gain/loss, tax type (STCG/LTCG)
  4. Get AI-powered tax optimization recommendations

πŸ’³ Expense Tracking

  1. Add expenses manually or via SMS simulator
  2. Categorize spending across 7+ categories
  3. View monthly charts and trends
  4. Get budget warnings in real-time

🎯 Tax Analysis

  1. View portfolio on Dashboard
  2. AI analyzes holdings and generates insights
  3. Review tax-loss harvesting opportunities
  4. Implement recommendations before March 31

πŸ› οΈ Tech Stack

Frontend

  • React 19.2 - UI library
  • TypeScript 5.9 - Type safety
  • Vite 7.3 - Build tool
  • Tailwind CSS 3.4 - Styling
  • Recharts 3.7 - Data visualization
  • Lucide React - Icons

Backend & Services

  • Firebase 12.9
    • Authentication (Email/Password)
    • Firestore (Real-time database)
  • Indian Stock Market API - Real-time NSE/BSE prices
  • Groq SDK - AI-powered insights

Utilities

  • date-fns - Date manipulation
  • tsx - TypeScript execution

πŸ“ Project Structure

cashCue/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/          # React components
β”‚   β”‚   β”œβ”€β”€ ai/             # AI insight components
β”‚   β”‚   β”œβ”€β”€ auth/           # Authentication
β”‚   β”‚   β”œβ”€β”€ budget/         # Budget management
β”‚   β”‚   β”œβ”€β”€ dashboard/      # Dashboard widgets
β”‚   β”‚   β”œβ”€β”€ expenses/       # Expense tracking
β”‚   β”‚   β”œβ”€β”€ income/         # Income sources
β”‚   β”‚   β”œβ”€β”€ portfolio/      # Stock portfolio
β”‚   β”‚   β”œβ”€β”€ shared/         # Shared components
β”‚   β”‚   └── ui/             # UI primitives
β”‚   β”œβ”€β”€ context/            # React Context providers
β”‚   β”œβ”€β”€ lib/                # Firebase configuration
β”‚   β”œβ”€β”€ pages/              # Main page components
β”‚   β”œβ”€β”€ services/           # Business logic
β”‚   β”‚   β”œβ”€β”€ aiAnalyzer.ts   # AI insights
β”‚   β”‚   β”œβ”€β”€ indianStockAPI.ts # Stock API
β”‚   β”‚   β”œβ”€β”€ smsParser.ts     # SMS parsing
β”‚   β”‚   └── autoExpenseTracker.ts
β”‚   β”œβ”€β”€ types/              # TypeScript types
β”‚   β”œβ”€β”€ utils/              # Helper functions
β”‚   └── styles/             # Design system
β”œβ”€β”€ public/                 # Static assets
β”œβ”€β”€ seed-portfolio.ts       # Demo data seeder
β”œβ”€β”€ .env                    # Environment variables
β”œβ”€β”€ package.json            # Dependencies
β”œβ”€β”€ tsconfig.json           # TypeScript config
β”œβ”€β”€ vite.config.ts          # Vite config
└── tailwind.config.js      # Tailwind config

πŸ”§ Available Scripts

Command Description
npm run dev Start development server
npm run build Build for production
npm run preview Preview production build
npm run lint Run ESLint
npm run seed-portfolio Seed demo portfolio data

🌐 API Integration

Indian Stock Market API

Base URL: https://military-jobye-haiqstudios-14f59639.koyeb.app

Features:

  • Free, no authentication required
  • NSE (.NS) and BSE (.BO) support
  • Real-time price data
  • Search functionality

Example Usage:

// Get stock data
GET /stock/INFY.NS

// Search stocks
GET /search?query=infosys

// Multiple stocks
GET /stocks?symbols=INFY.NS,TCS.NS,RELIANCE.NS

πŸ” Security

  • βœ… Environment variables for sensitive data
  • βœ… Firebase Authentication
  • βœ… Firestore security rules (user-scoped data)
  • βœ… No API keys exposed in frontend
  • ⚠️ Note: Never commit .env to version control

πŸš€ Deployment

Vercel (Recommended)

  1. Push code to GitHub
  2. Import project in Vercel
  3. Add environment variables
  4. Deploy!

Manual Build

npm run build
# Deploy dist/ folder to any static hosting

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘¨β€πŸ’» Author

Aman Bangera


πŸ™ Acknowledgments


πŸ“ž Support

For issues or questions:


Made with ❀️ using React, TypeScript, and Firebase

⭐ Star this repo if you find it helpful!

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages