u/Skyr3x

I built a zero-dependency "Time Machine" for local SQLite databases. Scrub back to any previous state in seconds.
▲ 7 r/sqlite+1 crossposts

I built a zero-dependency "Time Machine" for local SQLite databases. Scrub back to any previous state in seconds.

!!LOCAL DEV TOOL!!

Hey everyone,

​I wanted to share a local development tool I built because I was tired of manually copying .sqlite.bak files every time I needed to test destructive scripts, run complex migrations, or debug a state issue in my local environment.

​I built the Time-Travel SQLite Debugger – an ultra-lightweight, UI-driven tool that watches your .sqlite file and creates restorable snapshots in real-time. You literally just drag a visual timeline scrubber to travel back in time and instantly restore your database to a previous state.

​🚀 Under the Hood & Stress Tests:

I wanted to make sure it wasn't just a toy, but something that handles heavy local stress without freezing:

​Zero Dependencies: Just pure PHP and a clean Tailwind UI. Drop it in your local server and it works.

​Atomic Swaps: Uses POSIX rename() for atomic file swapping. I stress-tested it with 100 concurrent read/write/restore operations and had exactly 0 lock or corruption errors.

​Highly Efficient: It copies a 190MB binary BLOB database in 136ms using < 2MB of PHP peak memory (it utilizes stream-level kernel pipe buffers instead of loading into memory).

​Chaos Tested: Handled a rapid insertion loop of 500 writes (0.1s sleep) flawlessly, purging old unpinned snapshots while keeping the limit strict.

​Transparency Note: I utilized AI tools as a coding assistant to accelerate the development, personally reviewing, testing, and designing the overall architecture.

​I designed it to run in the background (like a daemon) while you code, providing a safety net for your local DB.

​It's completely open-source and free. I'd love to hear your thoughts, feedback, or any edge cases you think I should test!

​GitHub Repo: https://github.com/nsrht/time-travel-sqlite-debugger

​I am always open to new ideas, feature requests, and suggestions!

​Cheers! ✌️

u/Skyr3x — 11 days ago