Core module
| Module | Role |
|---|---|
legal-consent.js | current Terms/Privacy version dates, accepted-version storage, modal rendering, and re-consent trigger |
app-foundation-modules.js | imports the legal gate early during startup |
changelog.js / tour modules | must wait behind the legal gate instead of competing with it |
Stored consent
The browser stores accepted Terms and Privacy version dates locally. If either current version changes, the user is asked to accept the updated versions again on that browser. This is intentionally local. getbased has no user account to attach consent to.Startup ordering
Startup ordering is part of the legal-consent contract; keep startup ordering explicit when adding or moving startup prompts. Legal consent appears before normal startup overlays, including:- first-run tour;
- changelog modal;
- backup/encryption nudges;
- other onboarding prompts.
Content boundary
The legal gate should clearly say:- getbased is an educational/wellness tool, not a medical device;
- it does not provide diagnosis or medical advice;
- data is local by default, with opt-in network features;
- Anonymous Usage Stats may be collected on the hosted app and can be disabled in Settings → Privacy;
- the user must accept Terms and Privacy to continue.
Version bump procedure
When Terms or Privacy copy changes materially:- Update the public Terms/Privacy document.
- Bump the corresponding current version date in
legal-consent.js. - Verify first launch shows the gate on a fresh profile/browser.
- Verify existing accepted browsers see re-consent after the version bump.
- Verify changelog/tour/backup prompts wait until consent is accepted.
- Verify Settings → Privacy still exposes the analytics toggle.
Tests and smoke checks
Before shipping a legal-gate change:- run unit/browser tests that cover first-launch modal rendering and accepted-version storage;
- smoke-test a fresh browser profile;
- smoke-test an existing profile with old accepted versions;
- check focus trapping, keyboard close behavior, and mobile viewport layout;
- verify analytics notice text still matches the privacy guide.