Skip to content

A local, offline-first budget & expense analyzer that provides clean visualizations, spending insights, and optional Ollama-powered LLM chat for natural language queries. Built with privacy-first design, ideal for personal finance tracking.

Notifications You must be signed in to change notification settings

MananVyas01/LocalBudgetAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💰 LocalBudgetAI

A modern, local-first personal finance dashboard with privacy at its core.


Banner

Python Version Streamlit License: MIT Last Update Powered by Ollama Local AI


📚 Table of Contents


✨ Key Features

  • 📊 Interactive Dashboards: Create stunning, interactive financial dashboards with Plotly. Hover for details, zoom into trends, and export charts with a single click.
  • 🗓️ Financial Analytics: Get a clear view of your finances with monthly and category-wise breakdowns of income, expenses, and savings.
  • 🤖 Natural Language AI Assistant: Chat with your data using a powerful, dual-LLM AI assistant powered by Ollama (Mistral & Llama3). Ask complex questions and get instant insights.
  • 💸 Budget Optimization: Receive AI-driven advice on optimizing your budget, setting financial goals, and understanding your spending behavior.
  • 🔒 Works Fully Offline: Your data is stored locally in a SQLite database. The app works perfectly without an internet connection.
  • 🔐 100% Data Privacy: No cloud servers, no data leaks. All processing happens on your machine, ensuring your financial information remains completely private.

📸 Screenshots

Main Dashboard   Analytics


🎥 Demo Video

Check out the demo video to see LocalBudgetAI in action!

Note: The demo video is located at DEMO/DEMO-VID(V1).mp4


🚀 Getting Started

Prerequisites

  • Python 3.8+
  • pip (Python package manager)
  • An IDE (e.g., VS Code)

1. Clone the Repository

git clone https://www.github.com/MananVyas01/LocalBudgetAI.git
cd LocalBudgetAI

2. Set Up a Virtual Environment

Create and activate a virtual environment to keep dependencies isolated.

# For macOS/Linux
python3 -m venv venv
source venv/bin/activate

# For Windows
python -m venv venv
.\venv\Scripts\activate

3. Install Dependencies

Install all required packages from the requirements.txt file.

pip install -r requirements.txt

4. Run the App

Launch the Streamlit application.

streamlit run app/main.py

5. Set Up Local AI Features

To enable the AI assistant, you need to install Ollama and pull the required models.

  1. Install Ollama: Follow the official instructions at ollama.ai.
  2. Pull Models: Open your terminal and run the following commands:
    ollama pull mistral
    ollama pull llama3

🧠 How the AI Works

LocalBudgetAI uses a sophisticated dual-LLM system via Ollama to provide intelligent financial insights.

  • 🤖 Dual LLMs: The app leverages both Mistral and Llama3 models. If one model fails or provides a poor response, the system automatically retries with the other, ensuring reliability.
  • 🎯 Intent Recognition: The AI is trained to understand financial queries, recognize user intent, and provide context-aware answers based on your data.
  • 📈 Predictive Analytics: The AI can analyze historical data to forecast spending trends and help you plan for future financial goals.

🛠️ Tech Stack

  • Backend: Python
  • Frontend: Streamlit
  • Database: SQLite
  • Data Manipulation: Pandas, NumPy
  • Visualizations: Plotly
  • AI/NLP: Ollama, NLTK, TextBlob
  • Machine Learning: Scikit-learn

🛡️ Privacy & Security

  • 🔒 100% Local Data: Your financial data is stored in a local SQLite database and is never sent to the cloud.
  • ✈️ Offline Mode: The app is fully functional without an internet connection.
  • 🚫 No Third-Party Sharing: We respect your privacy. Your data is never shared with any third parties.

📂 Folder Structure

LocalBudgetAI/
│
├── app/
│   ├── main.py             # Main Streamlit application
│   ├── database.py         # Database connection and queries
│   ├── analyzer.py         # Core data analysis functions
│   ├── plotly_analyzer.py  # Plotly visualization functions
│   ├── llm_helper.py       # Helper for basic AI functionalities
│   └── advanced_llm_helper.py # Helper for advanced AI features
│
├── data/
│   ├── expenses.db         # SQLite database
│   └── README.md
│
├── DEMO/
│   ├── AI-Assistant.png
│   ├── Analytics.png
│   ├── Main-Dashboard.png
│   └── DEMO-VID(V1).mp4
│
├── requirements.txt        # Project dependencies
└── README.md               # This file

🤝 Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue to discuss your ideas.


📄 License

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


🙏 Acknowledgements

  • Streamlit for the amazing web framework.
  • Ollama for making local AI accessible.
  • Plotly for the beautiful and interactive charts.

About

A local, offline-first budget & expense analyzer that provides clean visualizations, spending insights, and optional Ollama-powered LLM chat for natural language queries. Built with privacy-first design, ideal for personal finance tracking.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages