Build a tracker that works without the network https://patrickz.ai/learn/offline-personal-tracker/ OUTCOME Save, export and restore a small set of local records. STACK TypeScript · IndexedDB TRY PATRICK'S VERSION Open Perfect Zenkai (use “admin preview”): https://perfectz.github.io/PerfectZenkai/ YOU NEED A coding agent, browser and three fictional journal entries. 1. Set your boundary Start with one record type, stable identifiers and local storage. Implement export before adding cloud synchronization. 2. Choose one record type Choose one record type, such as a journal entry, with a stable ID and created and updated timestamps. 3. Save it with IndexedDB Save and query it with IndexedDB. 4. Add export and import Add a JSON export and an import that keeps the same IDs, before any sync. LATER (NOT TODAY) - Module registry: Add a module registry so features can be enabled independently. - Threat-model first: Before adding accounts, threat-model where secrets could leak and how one user could reach another user’s records. - Accounts and cloud tables: Add authentication and per-user cloud tables. - Sync conflicts: Resolve sync conflicts with timestamps and visible status. PROMPT Help me build an offline-first tracker in [TypeScript or JavaScript] in a new practice folder. First version only: one record type, [journal entries], with stable IDs and local storage, and export before any sync. No module registry, accounts, cloud tables or sync conflict rules yet, and no API secrets in client code. List the setup commands before changing any files. Then work in three checkpoints and, after each, tell me how to check it: 1. A data contract with a stable ID, created and updated timestamps and a deletion marker, shown as a TypeScript type. 2. Saving and querying records with IndexedDB, using the indexes you choose. 3. A JSON export and an import that keep the same IDs, plus a test that exports three entries, clears the store, imports them and compares every field. FOLLOW-UP PROMPT Review this local tracker for data loss. List every way a reload, a failed or repeated import, or an edit made offline could discard or duplicate an entry, and the test that would catch each one. EXAMPLE / EXPERIMENT Create three entries, reload, export them, remove only the disposable test copy and import into a fresh practice profile. Compare fields and identifiers. CHECK YOUR RESULT [ ] Reload preserves records. [ ] Export/import restores the same data. [ ] Network loss does not silently discard edits. IF IT FAILS Do not add synchronization until conflict rules are explicit. Never embed production API secrets in client code. MY RESULT / NEXT CHANGE