From edbd05a3c949b21b343911d93c5f6acc418f3a74 Mon Sep 17 00:00:00 2001 From: shaebali Date: Fri, 18 Sep 2026 22:05:47 +0000 Subject: [PATCH] Rename to Tally; add Beauty category, Housing -> Household --- README.md | 4 ++-- app.js | 16 ++++++++++++---- expo-app/App.js | 2 +- expo-app/README.md | 6 +++--- expo-app/app.json | 2 +- expo-app/src/categories.js | 3 ++- expo-app/src/logic.js | 2 +- expo-app/src/storage.js | 9 ++++++++- index.html | 4 ++-- server.py | 2 +- 10 files changed, 33 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 884b5e9..fe4630c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Pin & Penny +# Tally Daily, weekly and monthly expense tracking. Data is saved privately (local storage on web, on-device storage in the app). No account. @@ -20,7 +20,7 @@ To use another port: `PORT=8080 python3 server.py`. ## Features - **Sidebar views** — Daily, Weekly, Monthly and All expenses with live counts, each group with its own total. -- **Categories** — Food, Transport, Housing, Utilities, Shopping, Health, Entertainment, Other. +- **Categories** — Food, Transport, Household, Utilities, Shopping, Health, Beauty, Entertainment, Other. - **Repeats** — mark an expense Daily, Weekly or Monthly. Repeating entries appear under “Repeating expenses” with the next due date and a one-click **Log next occurrence** button. - **Summary** — totals plus a per-category spending breakdown for whatever is shown. - **INR amounts** — everything is shown in rupees (₹) with Indian digit grouping. diff --git a/app.js b/app.js index a1153ef..034ea45 100644 --- a/app.js +++ b/app.js @@ -1,4 +1,4 @@ -/* Pin & Penny: daily / weekly / monthly views + repeating expenses. +/* Tally: daily / weekly / monthly views + repeating expenses. Stored privately in localStorage; no network calls. */ "use strict"; @@ -7,10 +7,11 @@ var CATS = { Food: "#9ed6a4", Transport: "#a9c8f0", - Housing: "#eab88f", + Household: "#eab88f", Utilities: "#8fd8c4", Shopping: "#f5b98a", Health: "#f2a3a3", + Beauty: "#dba9e8", Entertainment: "#f2cd88", Other: "#c9c9c9" }; @@ -110,7 +111,14 @@ function load() { return seed; } var arr = JSON.parse(raw); - return Array.isArray(arr) ? arr : []; + if (!Array.isArray(arr)) return []; + /* Migrate the Housing -> Household rename in stored entries. */ + var changed = false; + arr.forEach(function (e) { + if (e && e.category === "Housing") { e.category = "Household"; changed = true; } + }); + if (changed) { try { save(arr); } catch (err) { /* keep the in-memory list */ } } + return arr; } catch (e) { return []; } @@ -138,7 +146,7 @@ function seedSamples() { mk("New shoes", 79.99, "Shopping", addDaysStr(t, -8)), mk("Team lunch", 13.4, "Food", addDaysStr(t, -9), "weekly"), mk("Internet", 59.99, "Utilities", addDaysStr(t, -12), "monthly"), - mk("Rent", 1200.0, "Housing", first, "monthly"), + mk("Rent", 1200.0, "Household", first, "monthly"), mk("Concert ticket", 45.0, "Entertainment", addDaysStr(t, -20)), mk("Groceries", 62.1, "Food", addDaysStr(t, -33)) ]; diff --git a/expo-app/App.js b/expo-app/App.js index e786361..e5a6276 100644 --- a/expo-app/App.js +++ b/expo-app/App.js @@ -156,7 +156,7 @@ export default function App() { - Pin & Penny + Tally setMenuOpen(!menuOpen)} accessibilityLabel={menuOpen ? "Close menu" : "Open records menu"}> {menuOpen ? "\u2715" : "\u2630"} diff --git a/expo-app/README.md b/expo-app/README.md index 46e1bec..8bcecc0 100644 --- a/expo-app/README.md +++ b/expo-app/README.md @@ -1,4 +1,4 @@ -# Pin & Penny — Expo app (web + mobile from one codebase) +# Tally — Expo app (web + mobile from one codebase) React Native (Expo SDK 57) version of the expense tracker. The same code runs as a website, an iOS app and an Android app. Data is stored on-device with AsyncStorage, @@ -11,8 +11,8 @@ working as before; this folder is the future-proof rewrite. - **Daily / Weekly / Monthly tabs** — the same expenses regrouped by day, by week (Monday–Sunday) or by month, each group with its own total. -- **Categories** — Food, Transport, Housing, Utilities, Shopping, Health, - Entertainment, Other. +- **Categories** — Food, Transport, Household, Utilities, Shopping, Health, + Beauty, Entertainment, Other. - **Repeats** — mark an expense Daily, Weekly or Monthly. They appear under “Repeating expenses” with the next due date and a **Log next occurrence** button. - **Summary** — totals plus a per-category spending breakdown of whatever is shown. diff --git a/expo-app/app.json b/expo-app/app.json index a2a8782..bde10c7 100644 --- a/expo-app/app.json +++ b/expo-app/app.json @@ -1,6 +1,6 @@ { "expo": { - "name": "Pin & Penny", + "name": "Tally", "slug": "expense-tracker", "version": "1.0.0", "orientation": "portrait", diff --git a/expo-app/src/categories.js b/expo-app/src/categories.js index 02fe22b..72a99ac 100644 --- a/expo-app/src/categories.js +++ b/expo-app/src/categories.js @@ -3,10 +3,11 @@ export const CATEGORIES = [ { name: "Food", color: "#9ed6a4" }, { name: "Transport", color: "#a9c8f0" }, - { name: "Housing", color: "#eab88f" }, + { name: "Household", color: "#eab88f" }, { name: "Utilities", color: "#8fd8c4" }, { name: "Shopping", color: "#f5b98a" }, { name: "Health", color: "#f2a3a3" }, + { name: "Beauty", color: "#dba9e8" }, { name: "Entertainment", color: "#f2cd88" }, { name: "Other", color: "#c9c9c9" }, ]; diff --git a/expo-app/src/logic.js b/expo-app/src/logic.js index 0932855..25b27ad 100644 --- a/expo-app/src/logic.js +++ b/expo-app/src/logic.js @@ -176,7 +176,7 @@ export function seedSamples() { mk("New shoes", 79.99, "Shopping", addDaysStr(t, -8)), mk("Team lunch", 13.4, "Food", addDaysStr(t, -9), "weekly"), mk("Internet", 59.99, "Utilities", addDaysStr(t, -12), "monthly"), - mk("Rent", 1200.0, "Housing", first, "monthly"), + mk("Rent", 1200.0, "Household", first, "monthly"), mk("Concert ticket", 45.0, "Entertainment", addDaysStr(t, -20)), mk("Groceries", 62.1, "Food", addDaysStr(t, -33)), ]; diff --git a/expo-app/src/storage.js b/expo-app/src/storage.js index f9bb3f9..d8e8f83 100644 --- a/expo-app/src/storage.js +++ b/expo-app/src/storage.js @@ -14,7 +14,14 @@ export async function loadExpenses() { return seed; } const arr = JSON.parse(raw); - return Array.isArray(arr) ? arr : []; + if (!Array.isArray(arr)) return []; + // Migrate the Housing -> Household rename in stored entries. + let changed = false; + arr.forEach((e) => { + if (e && e.category === "Housing") { e.category = "Household"; changed = true; } + }); + if (changed) await saveExpenses(arr); + return arr; } catch (e) { return []; } diff --git a/index.html b/index.html index c1bf656..8dfa0ff 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ -Pin & Penny — Daily, Weekly, Monthly +Tally — Daily, Weekly, Monthly @@ -14,7 +14,7 @@ - Pin & Penny + Tally $0.00 diff --git a/server.py b/server.py index 2997509..6182fff 100644 --- a/server.py +++ b/server.py @@ -13,7 +13,7 @@ handler = functools.partial( ) server = http.server.ThreadingHTTPServer((HOST, PORT), handler) print( - "Pin & Penny running at http://%s:%d (open http://localhost:%d in your browser)" + "Tally running at http://%s:%d (open http://localhost:%d in your browser)" % (HOST, PORT, PORT), flush=True, )