Skip to content

Store namespaces in SQLite and run on Bun - #1

Merged
Overtorment merged 5 commits into
masterfrom
bun-sqlite
Sep 28, 2026
Merged

Overtorment merged 5 commits into
masterfrom
bun-sqlite

Conversation

@GladosBlueWallet

Copy link
Copy Markdown

Summary

  • Run the app with Bun instead of npm, ts-node, and nodemon.
  • Replace Redis with one SQLite file: blob payloads in entries, and an integer namespace counter in sequences.
  • Reject writes to the reserved seqnum key so the counter cannot be overwritten.

Test plan

  • bun install and bun start with DB_PATH set
  • POST a value, GET it back, and confirm namespaceseq increments
  • Confirm a second namespace has its own counter
  • POST to seqnum returns 400 and does not change the sequence
  • Confirm namespacesize matches stored blob lengths plus the sequence digits

Made with Cursor

Replace Redis with one bun:sqlite file so payloads stay blobs and each namespace counter lives in its own table.
@socket-security

socket-security Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

CI checks formatting with Prettier and runs tsc so the Bun SQLite code stays type-safe.
Requests now hit the limiter before a handler sends a response, and packages the server never imported are gone.
Drop the example client and the one-off schema rebuild so a bad body or a spoofed X-Forwarded-For cannot change stored data or the rate limit.
@Overtorment
Overtorment merged commit cdff607 into master Sep 28, 2026
3 checks passed
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.

2 participants