Airgead stores all application state in the current browser’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/airgead-investment-calculator/llms.txt
Use this file to discover all available pages before exploring further.
localStorage. There is no backend, database, or network request involved in reading or writing data — everything lives on the user’s own machine, scoped to the domain the site is served from. Closing and reopening the browser, or refreshing the page, leaves data intact. However, data is not shared across browsers, devices, or private-browsing sessions.
localStorage Keys
The application uses three keys, each owned by a distinct part of the codebase:| Key | Purpose | Written by | Read by |
|---|---|---|---|
airgead_current_calc | Most recent calculation inputs, yearly results, and an ISO timestamp | Calculator page (on “View Details” submit) | Results page on load |
airgead_saved_plans | JSON array of all saved plan objects | Results page (Save Plan button) | Saved Plans page on load |
airgead_user | Email entered in the mock sign-in demo | Login page | Not used for real auth |
The airgead_current_calc Structure
When the user submits the calculator form, saveCurrentCalculation(inputs, results) serialises the following object and stores it under airgead_current_calc:
inputs stores the raw form field strings exactly as entered. results is the full array of year-by-year rows produced by calculateCompoundInterest(). updatedAt is the ISO 8601 timestamp captured at the moment of writing. The results array is truncated above for readability — a 20-year projection would contain 21 rows (year 0 through year 20).
A Saved Plan Object
When the user clicks Save Plan on the Results page, a new entry is appended to theairgead_saved_plans array. Each plan object has the following shape:
id is the numeric timestamp (Date.now().toString()) captured at save time, which serves as a unique identifier. date is the same moment expressed as an ISO string. name is auto-generated from the monthly deposit and duration inputs. data contains the full airgead_current_calc object — inputs, results, and the original updatedAt — embedded directly inside the plan.
Data Lifecycle
BecauselocalStorage is a persistent browser store, data written by Airgead behaves as follows:
- Survives page refreshes — data persists across full reloads of the same tab
- Survives browser restarts — unlike
sessionStorage,localStorageis not cleared when the browser closes - Cleared with site data — if the user clears cookies and site data for the domain (via browser settings), all three keys are deleted
- Not synchronised — data does not travel between different browsers, devices, or user accounts; each browser instance maintains its own independent store
- Not encrypted — values are stored as plain JSON strings; no sensitive financial information should be treated as private in this context
The
airgead_user key is written by the login page purely for demonstration purposes. It stores the email address that was entered in the sign-in form — nothing more. The value is never verified against a user database, never used to gate access to any page, and never transmitted over a network. It is not a substitute for real authentication.CSV Export
CSV export does not interact withlocalStorage at all. When the user clicks Export CSV on the Results page, downloadCsv() in js/lib/calculator.js converts the results array into a comma-separated string, wraps it in a Blob with MIME type text/csv, and passes that blob to URL.createObjectURL() to generate an in-memory object URL. A temporary <a> element is programmatically clicked to trigger the browser’s file download dialogue, and the object URL is immediately revoked afterwards. The file is created and delivered entirely in memory — no data is written to disk by the application, and no localStorage key is touched during the export.