# Budget Dashboard — Setup Guide

## Overview

The dashboard reads from two sheets in a single Google Sheet:
- **Budget** — your monthly budget per category (set-and-forget)
- **Transactions** — where you log spending each month

---

## Step 1 — Create Your Google Sheet

1. Go to [sheets.google.com](https://sheets.google.com) and create a new spreadsheet.
2. Rename the first sheet tab to **Budget** and the second to **Transactions**.

---

## Sheet 1: Budget

Set up these columns exactly (row 1 = headers):

| Type | Expense | Monthly_Budget | Account |
|------|---------|----------------|---------|
| Rent | Rent | 5200 | Joint |
| Food | Food | 1235 | Joint |
| Food | Costco | 65 | Up |
| Insurance | Jason Life Insurance | 235 |
| Insurance | Medibank Private Medical | 400 |
| Cars | Bike Repayments & Insurance | 260 |
| Cars | Extra Bike Payment | 1500 |
| Cars | Hyundai Repayments | 439.83 |
| Cars | Jeep Repayments | 1505.23 |
| Cars | Fuel | 433.33 |
| Cars | Hyundai Insurance | 90 |
| Cars | Jeep Insurance | 83.33 |
| Cars | Jason Parking | 350 |
| Cars Save | Hyundai Maintenance | 166.67 |
| Cars Save | Hyundai Service | 41.67 |
| Cars Save | Hyundai Rego | 66.67 |
| Cars Save | Jeep Maintenance | 166.67 |
| Cars Save | Jeep Service | 41.67 |
| Cars Save | Jeep Rego | 66.67 |
| Utilities | Electricity | 450 |
| Utilities | Water | 150 |
| Comms | Internet | 80 |
| Comms | Sam Cell | 50 |
| Comms | Jason Cell | 50 |
| Comms | Aldi Mobile (Kids) | 48 |
| Kids | Kids Pocket Money | 108.33 |
| Kids | Kids Tuck | 130 |
| Horses | Horses & Chicken Feed | 400.83 |
| Horses | Horses Feet | 325 |
| Horses | Horses Vet | 200 |
| Pets | Yorkies Insurance | 86.67 |
| Pets | Flea Treatment | 32 |
| Pets | Dog Food | 135 |
| Technology | Google Premium Family | 40 |
| Technology | ChatGPT | 0 |
| Technology | Google One | 15 |
| Technology | Wyze | 25 |
| Technology | Microsoft 365 | 17.92 |
| Technology | Netflix | 15 |
| Savings | House Savings | 1500 |
| Family Spending | Family Spending | 750 |
| Debt | Jeep Repayments | 1505.23 |

> **Tip:** You only need to set this up once. Update it whenever your budget changes.

---

## Sheet 2: Transactions

Set up these columns (row 1 = headers):

| Date | Type | Expense | Amount | Account |
|------|------|---------|--------|---------|
| 2026-06-01 | Food | Woolworths | 145.30 | Joint |
| 2026-06-03 | Cars | Fuel | 85.00 | Joint |
| 2026-06-05 | Horses | Feed | 120.00 | Up |

**Column notes:**
- **Date** — use `YYYY-MM-DD` format (e.g. `2026-06-15`). You can also use `DD/MM/YYYY`.
- **Type** — must match exactly what you have in the Budget sheet (e.g. `Cars`, `Food`, `Horses`)
- **Expense** — description of what you bought
- **Amount** — number only, no $ sign (e.g. `145.30`)
- **Account** — `Joint`, `Up`, `Business`, `ING` etc.

You can add all months to the same sheet — the dashboard filters by the selected month automatically.

---

## Step 2 — Publish Your Sheet to the Web

You need to publish **each sheet** as a CSV link so the dashboard can read it.

1. In Google Sheets, go to **File → Share → Publish to web**
2. In the first dropdown, select **Budget**, in the second select **Comma-separated values (.csv)**
3. Click **Publish** and copy the URL — this is your **Budget CSV URL**
4. Repeat: select **Transactions** from the first dropdown → **Comma-separated values (.csv)** → Publish → copy URL

You'll end up with two URLs that look like:
```
https://docs.google.com/spreadsheets/d/YOUR_ID/pub?gid=0&single=true&output=csv
https://docs.google.com/spreadsheets/d/YOUR_ID/pub?gid=123456789&single=true&output=csv
```

---

## Step 3 — Connect the Dashboard

1. Open `index.html` in your browser (double-click the file)
2. Click **⚙ Connect Spreadsheet** in the top right
3. Paste your Budget CSV URL and Transactions CSV URL
4. Click **Save & Load**

Your data should appear! The settings are saved in your browser so you only do this once.

---

## Step 4 — Deploy to Netlify (so Jason can access it)

1. Go to [netlify.com](https://netlify.com) and sign up for a free account
2. Click **Add new site → Deploy manually**
3. Drag the entire **Expenses App** folder onto the upload area
4. Netlify gives you a URL like `https://your-site.netlify.app` — share this with Jason

**To add password protection:**
1. In Netlify, go to your site → **Site configuration → Access & security → Basic auth**
2. Set a username and password
3. Anyone visiting the URL will need to enter these — keep it simple, something you both remember

---

## Day-to-Day Usage

**Adding transactions:** Just add rows to your Transactions sheet. The dashboard updates within a minute or two (Google Sheets publishing has a short cache delay).

**Switching months:** Use the ‹ › arrows in the dashboard header.

**Updating budgets:** Edit the Budget sheet. Changes reflect on next page load.

---

## Salary-Based Contribution Split

Enter your annual salaries in Settings → the dashboard automatically calculates each person's % and shows:

- **Sam's monthly transfer** broken down by account (Joint, Up, ING, etc.)
- **Jason's fortnightly transfer** broken down by account

The math: `Annual salary ÷ combined salaries = your %`. Sam's monthly = `total budget × Sam%`. Jason's fortnightly = `total budget × Jason% × 12 ÷ 26`.

The **Account** column in your Budget sheet is what drives the per-account breakdown — make sure each row has the right account so the transfers add up correctly.
