FAMILY FINANCIAL MAP (FFM) - v2.1.1
A private, offline-first family financial continuity map.
No backend, no accounts, no analytics. Your data lives in an encrypted .ffm file that YOU save and keep.

======================================================================
1. HOW TO OPEN IT  (just double-click "index.html" in this folder)
======================================================================
  - Double-click  index.html  (this folder). It opens the app in your browser.
  - Best on a computer (Chrome, Edge, Firefox, Safari). Phones often block local files:
    on a phone, use the hosted web site instead.
  - First time:  "Create New Map"  ->  set a password  ->  save your 5 recovery keys  ->  Download the .ffm file.
  - Next time:   "Open Existing Map"  ->  choose your .ffm file  ->  enter password or a recovery key.
  - After editing, click SAVE & DOWNLOAD (or press Ctrl+S). Your .ffm file only changes when you download it.

======================================================================
2. WHAT IS IN THIS FOLDER
======================================================================
  index.html   Start here. Opens the app.
  Readme.txt   This file.
  app/         The application itself (the web site). Do not rename or move files inside it.
  docs/        Technical notes, changelog, QA checklist (for the person who deploys the app).
  tests/       Automated checks (developers only; NOT part of the public web site).
               tests/runtime = headless-browser regression tests (needs: npm install).

======================================================================
3. DEPLOYING TO A WEB SITE  (for the owner / developer)
======================================================================
  PUBLISH THE  app  FOLDER  (not the whole package).
  The contents of  app/  must end up at the ROOT of your web address
  (e.g. https://yourdomain.com/index.html), because:
     - sw.js (offline support) must sit at the site root to cover every page
     - _headers (security headers / CSP) must sit at the publish root

  Netlify          : Publish directory = app
  Cloudflare Pages : Build output directory = app   (no build command)
  GitHub Pages     : publish the contents of app/ (e.g. with a Pages workflow, or copy app/* to the branch root).
                     _headers is ignored there; each page already carries the same CSP in a <meta> tag.
  Any static host  : upload everything INSIDE app/ (including the hidden files _headers and .nojekyll).

  If you publish the whole package by mistake, the site still works (the root index.html forwards to /app/),
  but the security headers in app/_headers will NOT be applied. Publish app/ instead.

  Do not tighten connect-src in app/_headers (it also governs sw.js; see docs/README-TECHNICAL.md).
  Turn OFF Cloudflare Web Analytics auto-injection (it contradicts the "no analytics" promise and is blocked by the CSP).

======================================================================
4. RELEASE CHECKLIST (every deploy)
======================================================================
  1. Bump CACHE in app/sw.js (e.g. ffm-v2.1.2-YYYY-MM-DD) and the ?v= in app/assets/js/pwa.js.
  2. If you added/removed files, update the SHELL list in app/sw.js.
  3. Update version and date in app/assets/js/version.js (used by the footer and every printed report) and in this file.
  4. Rebuild the offline copy:   sh docs/build-offline-zip.sh
  5. Run the checks from the package root:
        node tests/smoke-static.mjs
        cd tests/runtime && npm install && npm test        (headless-browser regression tests)
  6. Manual smoke test: create a map -> verify recovery keys -> Save & Download -> reopen -> add a record ->
     open Emergency Mode and return -> print a report to PDF.  (Full list: docs/QA-RELEASE-CHECKLIST.md)

======================================================================
5. KNOWN LIMITS (by design)
======================================================================
  - Lose the password AND all 5 recovery keys = the file cannot be recovered. Nobody can reset it.
  - Reminders appear inside the app only while it is open. There are no notifications, e-mails or SMS.
  - Currency is one per family map (no per-record currency yet).
  - Print to PDF: use each report's Print button and choose "Save as PDF". Running headers/footers with page numbers
    appear in Chrome and Edge (v131+); other browsers print the same header and footer once, inside the document.
  - CSV exports and printed reports are NOT encrypted. Store or dispose of them carefully.
  - The 10-minute idle lock is a privacy screen, not a memory wipe. Use Lock / Sign out on shared computers.
  - Keep at least two copies of your .ffm file (e.g. USB drive + private cloud folder).

Support: info@officesmartapps.com   |   https://www.officesmartapps.com/
