Video Demo: https://youtu.be/gNMQEYg4LTY
CashCompass is a personal financial management web application designed to help users track their income, expenses, savings, and debt, and gain insights into their financial health. It features an AI Financial Advisor powered by Google's Gemini API, providing personalized financial advice based on your aggregated data.
- Financial Dashboard: A comprehensive overview of your financial metrics, including Net Worth, Cash Flow, Savings, Liabilities, Income, and Expenses.
- Income & Expense Tracking: Easily record and categorize all your financial transactions.
- Savings Goals: Set and track progress towards your financial goals.
- Debt Management: Keep tabs on your liabilities and plan for repayment.
- AI Financial Advisor: Get personalized financial advice and actionable recommendations powered by cutting-edge AI (Google Gemini).
- User Profiles: Manage personal details and account settings.
- Responsive Design: Optimized for seamless use across various devices.
Follow these steps to get CashCompass up and running on your local machine.
- Python 3.8+
- pip (Python package installer)
git clone <your-repository-url>
cd CashCompasspython3 -m venv venv-
On macOS/Linux:
source venv/bin/activate -
On Windows (Command Prompt):
venv\Scripts\activate.bat
-
On Windows (PowerShell):
.\venv\Scripts\Activate.ps1
pip install -r requirements.txtYou can generate
requirements.txtby running:
pip freeze > requirements.txtInclude packages such as Flask, requests, markdown, python-dotenv, cs50, Flask-Session, and Werkzeug.
CashCompass uses environment variables to securely store sensitive information.
In your project's root directory:
GEMINI_API_KEY="YOUR_ACTUAL_GOOGLE_GEMINI_API_KEY"
DATABASE_URL="sqlite:///cashcompass.db"
MAIL_SERVER="your.smtp.server"
MAIL_PORT=587
MAIL_USE_TLS=True
MAIL_USE_SSL=False
MAIL_USERNAME="your_smtp_username"
MAIL_PASSWORD="your_smtp_password"
MAIL_DEFAULT_SENDER="your_verified_sender@example.com"
SECRET_KEY="your_secret_key"Important: Add
.envto your.gitignoreto keep it out of version control.
CashCompass uses SQLite. Create a schema.sql file with the following:
-- Users
CREATE TABLE IF NOT EXISTS users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
username TEXT NOT NULL UNIQUE,
hash TEXT NOT NULL,
email TEXT UNIQUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Income
CREATE TABLE IF NOT EXISTS income (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
amount NUMERIC NOT NULL,
category TEXT NOT NULL,
date DATE NOT NULL,
description TEXT,
FOREIGN KEY (user_id) REFERENCES users(id)
);
-- Expenses
CREATE TABLE IF NOT EXISTS expenses (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
amount NUMERIC NOT NULL,
category TEXT NOT NULL,
date DATE NOT NULL,
description TEXT,
FOREIGN KEY (user_id) REFERENCES users(id)
);
-- Savings
CREATE TABLE IF NOT EXISTS savings (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
goal TEXT NOT NULL,
amount NUMERIC NOT NULL DEFAULT 0,
target_amount NUMERIC NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(id)
);
-- Debt
CREATE TABLE IF NOT EXISTS debt (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
debt_name TEXT NOT NULL,
original_balance NUMERIC NOT NULL,
current_balance NUMERIC NOT NULL,
interest_rate NUMERIC,
minimum_payment NUMERIC,
due_date DATE,
FOREIGN KEY (user_id) REFERENCES users(id)
);
-- Budget
CREATE TABLE IF NOT EXISTS budget (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
category TEXT NOT NULL,
amount NUMERIC NOT NULL,
date DATE NOT NULL,
FOREIGN KEY (user_id) REFERENCES users(id)
);
-- Alerts
CREATE TABLE IF NOT EXISTS alerts (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
alert_hash TEXT NOT NULL UNIQUE,
dismissed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(id)
);sqlite3 database.db < schema.sqlOr using Python:
python -c "from app import db; db.execute(open('schema.sql').read())"flask runVisit: http://127.0.0.1:5000/
- Register/Login: Access your personal dashboard.
- Record Data: Add income, expenses, savings, and debts.
- View Dashboard: Monitor your financial health.
- AI Advisor: Navigate to "AI Financial Advisor" and click "Generate Advice".
- Manage Profile: Update your settings and user info.
- "Forgot Password" is currently now functional .
- Backend: Flask (Python)
- Database: PostGRE SQL
- Frontend: HTML, CSS, JavaScript (Bootstrap 5, Font Awesome)
- AI Integration: Google Gemini API
- Environment Management: python-dotenv
- Markdown Rendering: python-markdown
© 2025 CashCompass. All rights reserved.
Your path to financial freedom.