Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

6 Commits

Folders and files

Repository files navigation

๐Ÿ’ณ PocketPulse

AI-Powered Personal Finance Assistant

Track income and expenses using natural language, get smart categorization, and view clear analytics instantly.

Python Streamlit License Google Sheets Gemini AI


๐ŸŒŸ Overview

PocketPulse is an intelligent personal finance management application that revolutionizes how you track your money. Instead of complex forms and manual categorization, simply describe your transactions in natural language, and let AI handle the rest.

๐ŸŽฏ Key Benefits

  • ๐Ÿค– Conversational Input: Describe transactions naturally - "Spent $50 on groceries yesterday"
  • ๐Ÿง  Smart Categorization: AI automatically assigns categories and subcategories
  • ๐Ÿ“Š Rich Analytics: Comprehensive financial insights with beautiful visualizations
  • โ˜๏ธ Cloud Storage: Secure data persistence with Google Sheets integration
  • ๐Ÿ“ฑ Mobile Friendly: Responsive design works perfectly on all devices

โœจ Features

๐Ÿ—ฃ๏ธ Natural Language Processing

  • Conversational Transaction Entry: Input transactions using everyday language
  • Auto-Date Detection: Automatically extracts dates from conversational text
  • Smart Categorization: AI-powered category assignment and subcategory mapping
  • Context Awareness: Understands transaction context for better accuracy

๐Ÿ’ฐ Transaction Management

  • Multiple Transaction Types:

    • ๐Ÿ’ธ Expenses: Regular spending transactions
    • ๐Ÿ’ต Income: Earnings and revenue
    • โณ To Pay: Pending payments and bills
    • ๐Ÿ“ˆ To Receive: Expected income and receivables
  • Advanced Features:

    • ๐Ÿท๏ธ Hierarchical category system with unlimited subcategories
    • ๐Ÿ“ Detailed notes and descriptions
    • ๐Ÿ“… Flexible date handling with due date tracking
    • ๐Ÿ”„ Transaction state management

๐Ÿ“ˆ Analytics & Insights

๐Ÿ“Š Dashboard Overview

  • Financial Summary: Total income, expenses, and net worth
  • Quick Metrics: Monthly trends and key performance indicators
  • Pending Transactions: Overview of upcoming payments and receivables

๐Ÿ“ˆ Visual Analytics

  • Monthly Trends: Income vs expense patterns over time
  • Category Breakdowns: Visual representation of spending categories
  • Top Sources: Biggest income sources and expense categories
  • Weekly Patterns: Understanding your spending habits by day of week

๐Ÿ’ก Smart Insights

  • Weekday vs Weekend Analysis: Compare spending patterns
  • Fixed vs Variable Expenses: Automatic expense type detection
  • Week-of-Month Trends: Identify spending cycles
  • Anomaly Detection: Spot unusual spending patterns

๐Ÿ“… Flexible Reporting

  • All-Time View: Complete financial history
  • Yearly Reports: Annual financial summaries
  • Monthly Analysis: Month-by-month breakdowns
  • Custom Date Ranges: Analyze any specific time period

๐Ÿš€ Quick Start

Prerequisites

Requirement Version Description
Python 3.8+ Core runtime environment
Google Account - For Google Sheets integration
Gemini API Key - For AI-powered features

Installation

  1. Clone the Repository

    git clone https://github.com/BHARTIYAYASH/PocketPulse.git
    cd expense_tracker
  2. Install Dependencies

    # Install uv package manager
    pip install uv
    
    # Install project dependencies
    uv sync
  3. Configure Environment Create a .env file in the project root:

    GOOGLE_SHEETS_CREDENTIALS=path/to/your/credentials.json
    GOOGLE_SHEET_ID=your_google_sheet_id
    GEMINI_API_KEY=your_gemini_api_key
  4. Run the Application

    uv run streamlit run Home.py

โš™๏ธ Detailed Setup Guide

Google Cloud Platform Setup

Step 1: Create Google Cloud Project

  1. Go to Google Cloud Console
  2. Create a new project or select existing one
  3. Note your project ID

Step 2: Enable Google Sheets API

  1. Navigate to APIs & Services > Library
  2. Search for "Google Sheets API"
  3. Click Enable

Step 3: Create Service Account

  1. Go to APIs & Services > Credentials
  2. Click Create Credentials > Service Account
  3. Fill in service account details:
    • Name: pocketpulse-service
    • Description: Service account for PocketPulse app
  4. Click Create and Continue
  5. Skip role assignment (click Continue)
  6. Click Done

Step 4: Generate Credentials

  1. Find your service account in the credentials list
  2. Click on the service account email
  3. Go to Keys tab
  4. Click Add Key > Create New Key
  5. Select JSON format
  6. Download and save the JSON file securely

Step 5: Set Up Google Sheet

  1. Create a new Google Sheet
  2. Copy the sheet ID from the URL:
    https://docs.google.com/spreadsheets/d/[SHEET_ID]/edit
    
  3. Share the sheet with your service account email
  4. Grant Editor permissions

Gemini AI Setup

  1. Go to Google AI Studio
  2. Click Create API Key
  3. Copy the generated API key
  4. Add it to your .env file

๐ŸŽจ Usage Examples

Transaction Input Examples

# Simple expense
"Spent $25 on lunch at McDonald's"

# Income with date
"Received $5000 salary on December 1st"

# Pending payment
"Need to pay $120 for electricity bill due next week"

# Complex transaction
"Bought groceries for $85.50 at Whole Foods yesterday, mostly organic vegetables"

Category Examples

Income Categories

  • ๐Ÿ’ผ Salary: Regular employment income
  • ๐Ÿ“ˆ Investments: Returns from investments
  • ๐Ÿข Business: Business revenue and profits
  • ๐Ÿ’ฐ Other Income: Freelance, gifts, etc.

Expense Categories

  • ๐Ÿฝ๏ธ Food & Dining: Restaurants, groceries, food delivery
  • ๐Ÿ›๏ธ Shopping: Clothing, electronics, general purchases
  • ๐Ÿš— Transportation: Gas, public transport, ride-sharing
  • ๐Ÿ’ก Bills & Utilities: Electricity, water, internet, phone
  • ๐ŸŽฌ Entertainment: Movies, games, subscriptions
  • ๐Ÿฅ Health & Wellness: Medical expenses, gym, supplements
  • ๐Ÿ“š Other Expenses: Miscellaneous spending

๐Ÿ“ Project Structure

pocket_pulse/
โ”œโ”€โ”€ ๐Ÿ“„ app.py                 # Main Streamlit application
โ”œโ”€โ”€ ๐Ÿ“ config/
โ”‚   โ”œโ”€โ”€ __pycache__/         # Python cache files
โ”‚   โ””โ”€โ”€ constants.py         # Application constants
โ”œโ”€โ”€ ๐Ÿ“„ pyproject.toml        # Project dependencies and configuration
โ”œโ”€โ”€ ๐Ÿ“„ uv.lock              # Dependency lock file
โ”œโ”€โ”€ ๐Ÿ“„ LICENSE              # MIT License
โ””โ”€โ”€ ๐Ÿ“„ README.md            # This file

๐Ÿ› ๏ธ Configuration

Environment Variables

Variable Description Example
GOOGLE_SHEETS_CREDENTIALS Path to Google service account JSON ./credentials.json
GOOGLE_SHEET_ID Google Sheet ID from URL 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms
GEMINI_API_KEY Gemini AI API key AIzaSyBvOkBw...

Customization Options

  • Categories: Modify config/constants.py to add custom categories
  • Date Formats: Adjust date parsing logic for different formats
  • UI Theme: Customize Streamlit theme in app.py

๐Ÿ”ฎ Future Roadmap

Phase 1: Core Enhancements

  • ๐Ÿ” Multi-user Authentication: Role-based access control
  • ๐Ÿ’ณ Budget Management: Set and track spending limits
  • ๐Ÿ”” Smart Alerts: Notifications for unusual spending
  • ๐Ÿ”„ Recurring Transactions: Automatic recurring entry setup

Phase 2: Advanced Features

  • ๐Ÿ“„ Receipt OCR: Upload receipts for automatic processing
  • ๐ŸŒ Multi-Currency Support: Handle multiple currencies with exchange rates
  • ๐Ÿ“ฑ Mobile App: Native iOS/Android applications
  • ๐Ÿ”„ Offline Mode: Cache data for offline access

Phase 3: Intelligence Features

  • ๐ŸŽฏ Savings Goals: Track progress toward financial goals
  • ๐Ÿ” Anomaly Detection: Identify unusual spending patterns
  • ๐Ÿ“Š Financial Forecasting: Predict future financial trends
  • ๐Ÿค– Chat Assistant: Advanced conversational AI for financial advice

๐Ÿ‘ฅ Contributing

We welcome contributions from the community! Here's how you can help:

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests and ensure code quality
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to the branch: git push origin feature/amazing-feature
  7. Open a Pull Request

Contribution Guidelines

  • Follow Python PEP 8 style guidelines
  • Add tests for new features
  • Update documentation for changes
  • Ensure all tests pass before submitting

Team Structure

Contributor Role Focus Area
Sahil Backend Developer Data layer & integrations (services/, pages/)
Amrin Frontend Developer UI/UX & Analytics (typings/, utils/)
Yash Full-Stack Developer Core app logic & NLP parsing (remaining files)

๐Ÿ“„ License

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

License Summary

  • โœ… Commercial use allowed
  • โœ… Modification allowed
  • โœ… Distribution allowed
  • โœ… Private use allowed
  • โŒ No warranty provided

๐Ÿ™ Acknowledgments

Technologies Used

Special Thanks

  • Google AI team for the powerful Gemini API
  • Streamlit team for the amazing web framework
  • Open source community for inspiration and tools

๐Ÿ’ฌ Support & Community

Getting Help

  1. ๐Ÿ“– Check Documentation: Review this README and inline code comments
  2. ๐Ÿ› Report Issues: Open an issue in the GitHub repository
  3. ๐Ÿ’ฌ Community Discussion: Join our discussions for questions and ideas
  4. ๐Ÿ“ง Contact Maintainers: Reach out to the development team

Common Issues

Issue Solution
Google Sheets API errors Verify service account permissions and sheet sharing
Gemini API rate limits Check API key validity and quota limits
Date parsing issues Ensure dates are in recognizable format
Missing dependencies Run uv sync to install all requirements

๐Ÿ”’ Security & Privacy

Data Protection

  • ๐Ÿ” Encrypted Storage: All data encrypted in Google Sheets
  • ๐Ÿ”‘ Secure Authentication: Service account-based authentication
  • ๐Ÿšซ No Data Collection: We don't collect or store personal information
  • ๐Ÿ”„ Regular Updates: Keep dependencies updated for security patches

Best Practices

  • โŒ Never commit .env files or credentials to version control
  • ๐Ÿ”‘ Keep API keys secure and rotate them regularly
  • ๐Ÿ‘ค Use principle of least privilege for service account permissions
  • ๐Ÿ” Regular security audits of dependencies and code

Made with โค๏ธ by the PocketPulse Team

[โญ Star this repo]

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages