AI-Powered Personal Finance Assistant
Track income and expenses using natural language, get smart categorization, and view clear analytics instantly.
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.
- ๐ค 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
- 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
-
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
- Financial Summary: Total income, expenses, and net worth
- Quick Metrics: Monthly trends and key performance indicators
- Pending Transactions: Overview of upcoming payments and receivables
- 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
- 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
- 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
| Requirement | Version | Description |
|---|---|---|
| Python | 3.8+ | Core runtime environment |
| Google Account | - | For Google Sheets integration |
| Gemini API Key | - | For AI-powered features |
-
Clone the Repository
git clone https://github.com/BHARTIYAYASH/PocketPulse.git cd expense_tracker -
Install Dependencies
# Install uv package manager pip install uv # Install project dependencies uv sync
-
Configure Environment Create a
.envfile 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
-
Run the Application
uv run streamlit run Home.py
- Go to Google Cloud Console
- Create a new project or select existing one
- Note your project ID
- Navigate to APIs & Services > Library
- Search for "Google Sheets API"
- Click Enable
- Go to APIs & Services > Credentials
- Click Create Credentials > Service Account
- Fill in service account details:
- Name:
pocketpulse-service - Description:
Service account for PocketPulse app
- Name:
- Click Create and Continue
- Skip role assignment (click Continue)
- Click Done
- Find your service account in the credentials list
- Click on the service account email
- Go to Keys tab
- Click Add Key > Create New Key
- Select JSON format
- Download and save the JSON file securely
- Create a new Google Sheet
- Copy the sheet ID from the URL:
https://docs.google.com/spreadsheets/d/[SHEET_ID]/edit - Share the sheet with your service account email
- Grant Editor permissions
- Go to Google AI Studio
- Click Create API Key
- Copy the generated API key
- Add it to your
.envfile
# 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"
- ๐ผ Salary: Regular employment income
- ๐ Investments: Returns from investments
- ๐ข Business: Business revenue and profits
- ๐ฐ Other Income: Freelance, gifts, etc.
- ๐ฝ๏ธ 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
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
| 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... |
- Categories: Modify
config/constants.pyto add custom categories - Date Formats: Adjust date parsing logic for different formats
- UI Theme: Customize Streamlit theme in
app.py
- ๐ 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
- ๐ 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
- ๐ฏ 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
We welcome contributions from the community! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Run tests and ensure code quality
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow Python PEP 8 style guidelines
- Add tests for new features
- Update documentation for changes
- Ensure all tests pass before submitting
| 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) |
This project is licensed under the MIT License - see the LICENSE file for details.
- โ Commercial use allowed
- โ Modification allowed
- โ Distribution allowed
- โ Private use allowed
- โ No warranty provided
- Streamlit - Web application framework
- Google Gemini AI - Natural language processing
- Google Sheets API - Data storage
- Plotly - Data visualization
- Python - Core programming language
- Google AI team for the powerful Gemini API
- Streamlit team for the amazing web framework
- Open source community for inspiration and tools
- ๐ Check Documentation: Review this README and inline code comments
- ๐ Report Issues: Open an issue in the GitHub repository
- ๐ฌ Community Discussion: Join our discussions for questions and ideas
- ๐ง Contact Maintainers: Reach out to the development team
| 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 |
- ๐ 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
- โ Never commit
.envfiles 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]