Skip to content

Pg lite - frontend db#1

Draft
krishna-404 wants to merge 3 commits into
mainfrom
pg-lite
Draft

Pg lite - frontend db#1
krishna-404 wants to merge 3 commits into
mainfrom
pg-lite

Conversation

@krishna-404

Copy link
Copy Markdown
Collaborator

Pg lite - frontend db

- add backend sync router with heartbeat SSE endpoint (15s interval)
- create SSE manager in service worker with exponential backoff retry
- replace OfflineBlocker with non-blocking OfflineBanner component
- add SSE status badge to navbars showing connection state
- reorganize service worker files into src/sw/ folder
- add comlink dependency for main thread to SW communication
- fix property naming: unit_size -> unitSize, validity_days -> validityDays
- update signout utility to stop SSE monitoring on logout
- add auth.persistence.ts with localStorage-based session cache
- implement fallback to cached session when offline or server unreachable
- cache user info for welcome back UI on login page
- add clear-cache mode to signout for intentional logout cleanup
- update AGENTS.md with offline auth caching pattern documentation
- mark offline-first feature as partial in DEVELOPMENT_PLAN.md
- add @electric-sql/pglite dependency for browser-based PostgreSQL
- create web worker architecture with Comlink for DB operations
- implement DBManager with IndexedDB persistence (idb:// protocol)
- add journal_entries schema matching backend structure
- create singleton proxy pattern with lazy initialization
- add demo verification with SELECT 1 and INSERT/SELECT tests
- configure vite for worker support and PGlite optimization
- update DEVELOPMENT_PLAN.md and AGENTS.md with offline DB documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant