https://github.com/ledouxm/kysely-monorepo
SQLite browser-backend synchronization PoC
https://github.com/ledouxm/kysely-monorepo
Last synced: about 1 year ago
JSON representation
SQLite browser-backend synchronization PoC
- Host: GitHub
- URL: https://github.com/ledouxm/kysely-monorepo
- Owner: ledouxm
- Created: 2023-12-23T17:45:01.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-23T18:09:19.000Z (over 2 years ago)
- Last Synced: 2024-05-28T15:45:15.699Z (about 2 years ago)
- Language: TypeScript
- Homepage:
- Size: 71.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Typesafe synchronized SQLite db
The frontend package uses `kysely-wasqlite-worker` (which uses `wa-sqlite`) to store an SQLite database using either OPFS or indexedDb
The backend package uses `drizzle` to generate migrations from schema, and `fastify` to serve them to the frontend
- On load, the frontend fetches migrations list and executes missing ones.
- If the frontend has migrations whose name is not on the backend migrations list, then it drops every table and executes every migration it finds