Inspiration
Every developer knows the moment. You merge a pull request, run a database migration, and suddenly everything breaks. Your GitHub commits are wrong, your database is corrupted, and files are missing. Now you're stuck doing the manual rollback dance: git revert in the terminal SQL commands to restore database rows File recovery from backups One by one. System by system. Hours of your life you'll never get back. I realized there was no tool that lets you undo across multiple systems at once. Git reflog handles commits. Database tools handle rollbacks. File recovery handles files. Nothing connects them. That's when I decided to build UndoLayer OS.
What it does
UndoLayer OS is a temporal system control platform that lets developers rewind digital actions across GitHub, databases, and cloud storage using a unified timeline interface. Think of it as "Time Machine for Developers" . One timeline. One slider. One click. Every action across your connected systems is captured as an immutable event. You can see everything that happened, when it happened, and who did it. We track dependencies between events, so when you undo something, the system understands what depends on what. The result? No more manual rollbacks. No more broken dependencies. Just pure, instant recovery.
How we built it
Architecture UndoLayer OS uses event sourcing as its core pattern. Every action is stored immutably in Amazon Aurora PostgreSQL, creating a complete audit trail of system history. When a user triggers an undo, the system executes the Saga pattern—distributed undo across all connected systems in the correct dependency order. If any step fails, the Saga halts and alerts the user, ensuring consistency.
Tech Stack Layer Technology Frontend Next.js 14 (App Router) deployed on Vercel Database Amazon Aurora PostgreSQL (event store + auth) Authentication NextAuth.js with GitHub OAuth + email/password Visualization D3.js (force-directed dependency graph) Styling Tailwind CSS v4 + Glassmorphism design Icons Lucide React
Key Features Timeline Scrubber: Drag to any point in time, preview system state Dependency Graph: Visualize event relationships with D3.js Cycle Detection: Tarjan's Strongly Connected Components algorithm Impact Preview: See what changes before you commit to undo Saga Orchestrator: Distributed undo across GitHub, databases, and files Real GitHub Integration: OAuth + Webhooks + commit revert Mock Systems: Database and drive simulators for testing
Challenges we ran into
Dependency Management The hardest part was tracking dependencies between events across different systems. How do you know if a database row depends on a GitHub commit? I solved this by building an event_dependencies table that stores explicit causal links, combined with a BFS algorithm to calculate impact paths.
Cycle Detection Dependency cycles were a nightmare. If Event A depends on Event B, and Event B depends on Event A, you can't undo either. I implemented Tarjan's Strongly Connected Components algorithm to detect cycles and collapse them into "tangle" nodes in the graph.
The Saga Pattern Executing distributed undo across external systems (GitHub API, database mock, drive mock) with partial failures was complex. I built a Saga orchestrator that: Calculates the correct dependency order Executes compensating actions from newest to oldest Halts on any failure and logs the error Requires manual intervention for consistency
Timeline Performance Replaying thousands of events to reconstruct system state was slow. I added snapshots—periodic checkpoints that store the full system state. Now the system loads the latest snapshot and only replays events after that point.
Real-Time Updates Keeping the timeline in sync across multiple users and systems required Server-Sent Events (SSE). I implemented an SSE stream that pushes new events to all connected clients, ensuring everyone sees the latest state instantly.
Irreversibility Locking Some events shouldn't be undoable-like double-reverted commits or compensation events. I built an irreversibility model that locks these events with visual indicators (lock icons, disabled checkboxes) across the entire UI.
Accomplishments that we're proud of
Complete End-to-End System We built a fully functional temporal system control platform from scratch in a hackathon timeframe. Every feature works end-to-end from event capture to Saga orchestration to visual timeline scrubbing.
Real GitHub Integration We successfully integrated with GitHub's real API. Users can authenticate via OAuth, see their repositories, view commit history, and perform actual reverts that appear on GitHub.com.
Production-Grade Database We designed and implemented a complete PostgreSQL schema with 10+ tables, proper indexing, RLS policies, and IAM-based authentication using AWS Aurora. The database handles event sourcing, snapshots, dependencies, and undo operations.
Advanced Graph Visualization We built an interactive dependency graph using D3.js with: Force-directed physics simulation Tarjan's SCC algorithm for cycle detection Tangle collapse for circular dependencies BFS-based impact path highlighting Drill-down modal for cycle details
Saga Orchestrator We implemented a production-ready Saga pattern that handles distributed undo across multiple systems with: Forward execution with compensating actions Automatic rollback on failure Detailed step-by-step status reporting Audit logging of all operations
Beautiful UI/UX We designed a premium developer tool aesthetic with: Glassmorphism design language Dark theme with electric blue and soft purple accents Micro-interactions everywhere (hover, focus, transitions) Responsive design that works on all devices Accessibility (WCAG 2.1 AA compliant)
What we learned
Technical Lessons Event sourcing is powerful for audit trails and time travel, but requires careful planning for performance. Without snapshots, replaying thousands of events becomes a bottleneck. The Saga pattern is essential for distributed systems, but error handling is critical. Every compensation step must be idempotent and logged for auditability. D3.js is incredibly flexible for graph visualization, but force-directed layouts need careful tuning of parameters (repulsion, link distance, collision radius) to avoid exploding graphs. Aurora PostgreSQL is production-ready and perfect for event-sourced architectures. JSONB support makes storing variable payloads seamless, and IAM authentication eliminates password management. Vercel + AWS is a dream combo for full-stack deployment. Vercel's serverless functions pair beautifully with Aurora's auto-scaling capabilities. SSE is simpler than WebSockets for one-way event streaming. It's stateless-friendly on serverless platforms and requires minimal client-side code. Mock systems are valuable for proving core logic without complex integrations. They allow testing edge cases and dependency cycles in a controlled environment.
Product Lessons Mock systems are valuable for proving the core logic without complex integrations. They allow testing edge cases and dependency cycles in a controlled environment. Visual feedback matters - the timeline slider makes the concept instantly understandable. Users grasp the product's value in seconds when they see the slider in action. Dependency awareness is the unique differentiator — users need to trust the system. Showing impact preview before undo builds that trust. Irreversibility needs to be crystal clear — users must know what cannot be undone. Lock icons, disabled checkboxes, and warning messages prevent frustration. Real integrations add credibility — even if mocks are used for demos, having real GitHub integration proves the architecture works in production. Eventual consistency is acceptable for undo operations. Users understand that distributed systems take time to converge.
What's next for UndoLayer OS
Real Google Drive Integration Currently, Drive is a mock system. Next step is implementing real Google Drive API integration for file create/update/delete tracking and restoration.
Real Database Integration (PostgreSQL CDC) Replace the mock database with real Change Data Capture (CDC) using PostgreSQL logical replication to track actual schema changes and data modifications.
Enterprise Features Team workspaces with shared timelines and audit trails RBAC (Role-Based Access Control) for different permission levels SSO (Single Sign-On) with SAML/OIDC providers Audit logs for compliance (SOC2, HIPAA-ready) Custom retention policies for data governance
Automation & CI/CD GitHub Actions integration — auto-undo failed deployments Pre-commit hooks — check for potential issues before merge Slack/Teams notifications — alert teams when undo happens
Analytics Dashboard Event frequency heatmaps — see when most breakages happen System reliability scores — track GitHub/deployment stability User activity metrics — understand team usage patterns
Full Localization Internationalization (i18n) for global teams Support for RTL languages Regional compliance (GDPR, CCPA)
Scalability Optimizations Redis-based rate limiting (replace in-memory Map) Event partitioning by timestamp for large-scale deployments Graph caching with TTL for faster dependency loading Read replicas for analytics queries
Security Hardening Encrypt GitHub tokens at rest using AWS KMS Audit logging for all admin actions MFA (Multi-Factor Authentication) support IP allowlisting for enterprise plans Data encryption for sensitive payloads
Mobile App React Native or Flutter mobile client Push notifications for critical events Mobile-optimized timeline view Biometric authentication (Face ID, Touch ID)
Open Source Open-source the core engine Community contributions for new system integrations Plugin architecture for custom systems Public API for third-party tools
Community & Ecosystem Developer documentation hub Example integrations (GitLab, Bitbucket, MongoDB) Tutorials and use cases for common scenarios Discord community for user support and feedback
Built With
- amazon-web-services
- d3.js
- next.js
- nextauth.js
- postgresqlauroradb
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.