Drop postgres requirement for easier adoption
drew-royster opened ·
Awesome project! While it's in early stages I think this project is most likely to be used single player. With that said making a sqlite adapter I think would be worthwhile.
here's a rough plan from claude
**Add a SQLite storage adapter** for single-user local use. It seems to fit the current design: - One process already owns writes (the writer lease plus the global advisory lock), which is SQLite's normal mode. - The Postgres adapter uses Bun's `SQL`, which also accepts `sqlite://` URLs. `RETURNING`, `ON CONFLICT`, JSON functions and BLOBs work there. - `storageContract` already runs against two adapters, so a third could be proven against it.
The main gotcha: Bun's SQLite mode doesn't queue concurrent `sql.begin()` calls, so the adapter would need to run transactions one at a time. With a simple promise queue, 20 concurrent transactions all succeeded; without it, 19 failed.
- DR
I'm happy to draft a pr for this if there's interest!
MaggieAppletonreferenced this in Triage issues and acknowledge external contributors with Codex #316last month on GitHub
github-actions[bot]added label enhancementlast month on GitHub
github-actions[bot]added label triage/human-responselast month on GitHub
Automated triage here—thanks for outlining a SQLite option for easier single-user setup and offering to draft work. I’m routing this to `triage/human-response`: maintainers need to decide whether SQLite runtime support fits the project and whether the offered work is wanted. The current [storage documentation](https://github.com/githubnext/chopin/blob/main/docs/storage.md#adding-an-adapter) describes PostgreSQL as the only selectable runtime adapter and lists the contract and lifecycle requirements for another provider. Those requirements are useful context, not approval of the proposal or confirmation of the suggested implementation.
> Generated by [Issue triage](https://github.com/githubnext/chopin/actions/runs/37621759756) · ⊞ 18.4K · [◷](https://github.com/search?q=repo%3Agithubnext%2Fchopin+%22gh-aw-workflow-call-id%3A+githubnext%2Fchopin%2Fissue-triage%22&type=issues)
<!-- gh-aw-agentic-workflow: Issue triage, engine: codex, model: gpt-6.1-sol, id: 37621759756, workflow_id: issue-triage, run: https://github.com/githubnext/chopin/actions/runs/37621759756 --> <!-- gh-aw-workflow-call-id: githubnext/chopin/issue-triage -->