Inspiration

Every developer has been there — a production database update goes wrong, and you're left asking "what changed, when, and why?" Traditional databases overwrite state. There's no undo, no history, no way to rewind. We wanted to build the "git for databases" — a tool that captures every mutation as an immutable event, letting you scrub through time like a video timeline.

What it does

Rewind is a time-travel debugging platform for databases. It captures every CREATE, UPDATE, and DELETE as an immutable event with full before/after payloads. Key features:

  • Timeline Scrubber — Navigate an entity's history and reconstruct state at any millisecond
  • Deterministic Diffing — Compare any two points in time to see exactly what changed
  • AI Explanation — Click "Explain with AI" on any event to get a plain-language analysis of what likely caused the change
  • Anomaly Detection — Automatically flags suspicious patterns like negative inventory, zeroed prices, or unusual write velocity
  • Branch Reality — Fork an entity's history, remove or inject events, and simulate alternate outcomes without touching the database
  • SDK & REST API — Drop-in Mongoose middleware or direct REST calls to start capturing events in minutes

How we built it

  • Frontend: Next.js 16 (App Router) with Tailwind CSS, deployed on Vercel
  • Database: AWS DynamoDB with GSIs for efficient temporal queries
  • AI: OpenRouter API with SSE streaming for real-time explanations
  • Auth: Clerk for user authentication and tenant isolation
  • SDK: Custom Mongoose middleware that hooks into post-save/update/delete automatically The architecture is fully event-sourced — we never mutate stored events. State reconstruction replays events from the beginning, applying each payload in sequence. Diffing compares reconstructed states at two timestamps. Anomaly detection runs rule-based checks on every ingested event.

Challenges we ran into

  • SSE parsing was tricky — our initial implementation appended raw JSON strings instead of extracting the actual text content from streamed chunks. Took careful debugging to get the AI streaming working properly.
  • Font loading flicker — Material Symbols icons would flash as raw text before the font loaded. We tried multiple approaches (visibility hidden, JS font-ready checks) before landing on display=block font loading combined with CSS-only spinners.
  • Free AI model availability — Our original model was removed from OpenRouter mid-development. Had to query the API for available models and switch on the fly.
  • Video compression — The landing page hero video was 2.1MB causing slow loads. Used ffmpeg with CRF 32 and faststart to compress to 627KB without visible quality loss.

Accomplishments that we're proud of

  • The timeline scrubber and instant state reconstruction feel magical — you drag a slider and see exactly what your data looked like at that moment
  • Branch Reality is a genuinely novel feature — "what if this event never happened?" is a question no existing tool answers
  • Full SDK documentation with Mongoose, Prisma, and REST API examples built directly into the dashboard
  • AI-powered event explanation that actually understands the context of surrounding events

What we learned

  • Event sourcing as an architecture pattern is incredibly powerful for auditability and debugging
  • DynamoDB's GSI design requires careful planning upfront — choosing the right partition and sort keys determines what queries are even possible
  • SSE streaming from AI APIs requires careful buffer management and error handling
  • Font loading strategies on the web are more complex than they should be

What's next for Rewind — Time-Travel Debugging for Databases

  • Real database connectors — PostgreSQL CDC (Change Data Capture), MongoDB Change Streams, MySQL binlog integration
  • Collaborative investigations — Share timelines and anomaly reports with team members
  • Automated remediation — Not just detect anomalies, but suggest and execute rollbacks
  • Time-series visualization — Charts showing mutation frequency, entity growth, and anomaly trends over time

Built With

Share this project:

Updates