How lightbender255/lbff_the_last_caretaker_db works
This is an Electron POI tracker for The Last Caretaker. The primary workflow is a user browsing, filtering, adding, editing, or deleting POIs in the renderer; requests cross a preload IPC bridge to the main process, which reads and writes the local database and asynchronously syncs changes to a remote database. Lookup values support form choices, and a separate command-line sync performs full local-to-remote synchronization. The graph focuses on runtime product behavior; import and schema-migration utilities are peripheral. Source excerpts establish the UI/IPC and sync calls, but do not expose database connection details.
Main entry points: main.js POI handlers · schema.local.prisma Local database · sync.js CLI full sync · renderer.js POI grid and forms
Components 8
Desktop interface
- POI grid and forms
src/electron/renderer.js - IPC bridge
src/electron/preload.js
Application backend
- POI handlers
src/electron/main.js - Startup and CRUD sync
src/electron/main.js - CLI full sync
scripts/sync.js
Data and sync
- Local database
data/schema.local.prisma - Remote database
data/schema.remote.prisma
Other components
- Tracker user
Connections 9
- Tracker user → POI grid and forms: uses
README.md - POI grid and forms → IPC bridge: invokes API
src/electron/renderer.js - IPC bridge → POI handlers: sends IPC
src/electron/preload.js - POI handlers → Local database: queries and writes
src/electron/main.js - POI handlers → Startup and CRUD sync: starts sync
src/electron/main.js - Startup and CRUD sync → Local database: reads and writes
src/electron/main.js - Startup and CRUD sync → Remote database: upserts changes
src/electron/main.js - CLI full sync → Local database: reads records
scripts/sync.js - CLI full sync → Remote database: upserts records
scripts/sync.js