How lucas-hwang04/ezhousing works
Project type and purpose
• This is a lightweight, client-only single-page web application (“Expense Tracker Lite”) built with plain HTML, CSS, and JavaScript.
• It provides users a way to add, view, search, and delete expense/income transactions, display summary cards and charts, and persist data locally via browser localStorage.
File structure
• Top-level files only:
• index.html – the sole HTML entry point and UI container
• styles.css – dark-themed custom styling
• app.js – all front-end logic, including data model, UI updates, and chart rendering
• README.md – documentation
• No backend, no build or deployment scripts; optionally served via a simple Python static server.
Extract key insights from the README
• Tech stack: HTML5, CSS3, JS (ES6+), Chart.js (via CDN)
• Data model: each transaction stored as an object in localStorage
• Features include real-time search/filter, KPIs, pie and line charts
Main components
a. UI Layer
• index.html (markup containers for forms, transaction list, summary cards, chart canvases)
• styles.css (layout, theming)
b. Application Logic
• app.js
– Controller functions (addTransaction, deleteTransaction, filterTransactions)
– Model abstraction over localStorage (CRUD operations)
– View updates (DOM manipulation)
– Chart rendering module (invoking Chart.js APIs)
c. Persistence Layer
• Browser localStorage (JSON array of transaction objects)
d. External Library
• Chart.js (loaded via CDN)
e. (Optional) Static File Server
• Python HTTP server for local hosting
Relationships and data flows
• User → UI form (index.html)
• UI form submit → app.js controller → model (localStorage) → view (DOM update + charts)
• Search input → app.js filter → view update
• Delete action → app.js controller → model → view
• app.js → Chart.js library → chart canvases update
Architectural patterns & design principles
• Simple MVC-style separation:
• Model: localStorage data wrapper
• View: HTML/CSS + DOM update routines
• Controller: event handlers in app.js
• Single Page Application (SPA) without routing
• No build step, direct browser execution
Components
• Clear labels: index.html, styles.css, app.js, localStorage, Chart.js
• Rectangles for code modules