MoneyMate is a self-hosted, privacy-focused web application to track your income, expenses, and investments. It runs locally using PHP and SQLite, ensuring your financial data never leaves your machine.
| api | ||
| app | ||
| assets | ||
| .gitignore | ||
| budgets.php | ||
| calendar.php | ||
| docker-compose.yml | ||
| Dockerfile | ||
| goals.php | ||
| index.php | ||
| install.php | ||
| investments.php | ||
| login.php | ||
| logout.php | ||
| manifest.json | ||
| README.md | ||
| recurring.php | ||
| reports.php | ||
| settings.php | ||
| sw.js | ||
| tx_add.php | ||
| tx_list.php | ||
| upgrade_db.php | ||
| users.php | ||
💰 MoneyMate
Your Personal Finance & Investment Portfolio Tracker
MoneyMate is a self-hosted, privacy-focused web application to track your income, expenses, and investments. It runs locally using PHP and SQLite, ensuring your financial data never leaves your machine.
🚀 Key Features
📊 Dashboard & Analytics
- Net Worth Calculator: Live view of your total wealth (Cash + Stocks + Mutual Funds).
- Trend Analysis: Interactive charts showing income vs. expenses over the last 12 months.
- Category Breakdown: See exactly where your money goes.
📈 Investment Portfolio (New!)
- Groww Integration: Seamlessly import your Stock and Mutual Fund "Order History" CSVs from Groww.
- Auto-Calculation: Automatically calculates average buy price, current holdings, and unrealized Profit & Loss.
- Transaction History: Keeps a full record of every Buy, Sell, SIP, and Redemption.
- Duplicate Protection: Smart import logic prevents duplicate entries if you upload the same file twice.
🔄 Automation
- Recurring Transactions: Set up your Salary or Monthly Subscriptions once, and they auto-add to your ledger every month.
📱 Mobile Experience (PWA)
- Installable App: Add to your phone's home screen (Android & iOS).
- App Icon: Dedicated launcher icon.
- Fullscreen Mode: Feels like a native app.
🔒 Security & Data
- Single User: Designed for personal use with a secure login.
- Local DB: Uses SQLite. No external database server required.
- Backup: One-click download of your entire database (
.db) from Settings.
🛠️ Installation (Docker)
The easiest way to run MoneyMate is using Docker.
Prerequisites
- Docker Desktop installed.
Step-by-Step Setup
-
Download the Code Place all the project files in a folder named
MoneyMate. -
Start the Container Open your terminal/command prompt in the folder and run:
docker compose up -d -
Run the Installer Open your browser and visit: http://localhost:8000/install.php
- This will create the database and the default admin user.
- Default Login:
admin - Default Password:
admin123
-
Login Go to
http://localhost:8000/login.phpand sign in.
📖 How to Use
1. Tracking Investments (Groww Import)
MoneyMate is optimized for Groww users.
- Log in to Groww Web.
- Click your profile → Reports.
- Scroll down to Transactions (Important: Do not use "Holdings").
- Download Stocks - Order history and Mutual Funds - Order history.
- Open the downloaded files in Excel/Sheets and Save As CSV (Comma delimited).
- In MoneyMate, go to Investments and upload the CSVs.
- Note: Sold stocks or redeemed funds are automatically hidden from the active portfolio view but saved in history.
2. Setting up Recurring Items
- Go to the Recurring tab.
- Add your Salary (Income) and select the day (e.g., 1st of month).
- Add Subscriptions (Expense) like Netflix, Gym, etc.
- MoneyMate will automatically create these transactions when you visit the dashboard on/after that date.
3. Installing on Mobile
- Android (Chrome): Open the site → Tap "Add to Home screen" prompt or 3-dot menu → Install App.
- iOS (Safari): Tap Share button → "Add to Home Screen".
4. Backups
- Go to Settings.
- Click Download Database. Save this
.dbfile securely. - To restore: Replace the
data/finance.dbfile in your project folder with your backup.
📂 Project Structure
MoneyMate/
├── app/
│ ├── db.php # Database connection
│ ├── auth.php # Login session logic
│ ├── finance.php # Financial calculations & logic
│ └── layout.php # HTML Header/Footer & PWA links
├── assets/ # CSS & Icons
├── data/ # SQLite Database (created after install)
├── api/ # Internal JSON APIs for charts
├── docker-compose.yml # Container config
├── index.php # Dashboard
├── investments.php # Portfolio Manager
├── recurring.php # Recurring Manager
└── sw.js # Service Worker for PWA
⚠️ "Danger Zone"
If your investment data gets messy (e.g., wrong CSV imports):
- Go to the Investments page.
- Scroll to the bottom.
- Click Reset All Data to wipe only the investment tables and start fresh.
Created for personal financial freedom.