How fernandofedora/personal-finance-tracker works
Project type and purpose
• This is a client-only, browser-based Personal Finance Tracker.
• It’s a static multi-page frontend app (no backend service), implemented in HTML, JavaScript, and CSS, using Local Storage for persistence, Chart.js for visualization, and Bootstrap for styling.
File structure
• Top-level “frontend” directory contains:
• index.html + main.js – the landing/dashboard page
• credit_card_history.html + credit_card_history.js – credit-card-specific view and logic
• plan_ahorro.html + plan_ahorro.js – a savings-plan view and logic
• There are no server directories or API controllers: all logic lives in JS files.
• Persistence is handled via the browser’s Local Storage API.
• Chart.js is loaded in each page to render visualizations; Bootstrap CSS/JS provides UI styling and components.
README for additional insights
• Features emphasize CRUD operations on transactions, categorization (income/expense), credit-card associations, and interactive bar charts.
• Data entries are JSON objects stored in Local Storage.
• No external services or databases.
a. Main components
1. UI Pages (HTML + CSS + Bootstrap)
– Dashboard (index.html)
– Credit-Card History (credit_card_history.html)
– Savings Plan (plan_ahorro.html)
2. Business Logic Modules (main.js, credit_card_history.js, plan_ahorro.js)
3. Data Store (Browser Local Storage)
4. Visualization Library (Chart.js)
5. External CSS/JS Framework (Bootstrap)
b. Relationships & interactions
• User interacts with UI → triggers event handlers in JS
• JS controllers (each page’s .js) read/write JSON records to Local Storage
• JS retrieves data from Local Storage → passes it to Chart.js → generates charts in the DOM
• UI form inputs → JS validation & persistence → update views and summary panels
c. Architectural patterns / design principles
• Single-page controller per page (each .js file acts as a mini-controller)
• Separation of concerns:
• View layer (HTML/CSS/Bootstrap)
• Controller layer (JavaScript modules)
• Model layer (Local Storage as a key-value store of transaction objects)
• Modular code per feature (transactions, credit cards, savings plans)
d. Key technologies & libraries
• HTML5, CSS3, Bootstrap (Styling & layout)
• Vanilla JavaScript (ES6 modules or namespaced scripts)
• Local Storage API (Persistence)
• Chart.js (Data visualization)
Detail
• That all controllers share the same Local Storage namespace (e.g., a “transactions” key).
• That transaction objects include title, amount, type, creditCard, date.