FlightVault transforms database disasters from hours-long crises into seconds-long fixes through visual time-travel and intelligent recovery algorithms. Built for aviation databases, it provides complete temporal tracking, smart restore point detection, and surgical data recovery capabilities.
Submitted by Team FyreBird
Visual disaster recovery tool using MariaDB System-Versioned Tables
📸 View Screenshots - Interface overview and feature demonstrations
🔴 Watch Full Demo on YouTube - Complete walkthrough of FlightVault's disaster recovery capabilities
Local Demo Videos Available:
assets/Video/flightvault_cli.mp4- CLI Interface Demoassets/Video/flightvault_web.mp4- Web Interface Demo
# Quick Start (Manual)
pip install -r requirements.txt
python setup/database_setup.py
python setup/data_loader.py
python start_api.py # API: http://localhost:8000
cd frontend && npm install && npm run dev # UI: http://localhost:3000- 🎯 Features
- 🏗️ Architecture
- ⚡ Quick Start
- ⚙️ Configuration
- 💻 Usage
- 🧠 Technical Innovation
- 🎬 Demo Scenario
- 🔧 Development
- 🚀 Future Enhancements
- 📄 License
- Visual timeline explorer for database history navigation
- Smart diff viewer with color-coded change comparisons
- Intelligent restore point detection using binary search algorithms
- Selective restore for surgical data recovery
- Professional CLI for automation and scripting
- Modern web interface with real-time updates
- Docker deployment support
flowchart LR
%% Styling
classDef ui fill:#111827,stroke:#374151,stroke-width:1px,color:#F9FAFB;
classDef api fill:#0EA5E9,stroke:#075985,stroke-width:1px,color:#FFFFFF;
classDef core fill:#10B981,stroke:#065F46,stroke-width:1px,color:#FFFFFF;
classDef db fill:#334155,stroke:#0F172A,stroke-width:1px,color:#E2E8F0;
classDef svc fill:#6366F1,stroke:#312E81,stroke-width:1px,color:#EEF2FF;
classDef ext fill:#F59E0B,stroke:#92400E,stroke-width:1px,color:#111827;
%% Client
User[User]:::ui --> UI[Next.js Web UI<br/>Timeline • Diff • Restore]:::ui
User --> CLI[Python CLI<br/>status • timeline • diff • recover]:::ui
%% API Layer
UI -->|HTTP/JSON| API[(FastAPI REST API<br/>/health /timeline /diff /suggest-restore /restore)]:::api
CLI -->|Local or HTTP| API
%% Core Services
API --> TE[Temporal Engine<br/>FOR SYSTEM_TIME AS OF]:::core
API --> ALG[Smart Restore Algorithm<br/>Binary Search + Health Score]:::core
API --> REST[Recovery Executor<br/>Dry-run • Transactional Restore]:::core
API --> DIFF[Diff Analyzer<br/>Added • Deleted • Modified]:::core
%% Database
TE --> DB[(MariaDB 11<br/>System-Versioned Tables<br/>WITH SYSTEM VERSIONING)]:::db
ALG --> DB
REST --> DB
DIFF --> DB
%% Data Source
OF[OpenFlights Dataset<br/>airports • airlines • routes]:::ext -->|load| DB
%% Optional Infra
subgraph Optional
CORS[CORS and Auth future]:::svc
Docker[Docker Compose<br/>mariadb • api • ui]:::svc
end
CORS -.-> API
Docker -. orchestrates .- API
Docker -. orchestrates .- DB
Docker -. orchestrates .- UI
This project demonstrates integration between:
- MariaDB System-Versioned Tables for temporal data storage with automatic history tracking
- Python for backend processing: temporal queries, smart algorithms, and recovery operations:
- Next.js for modern frontend with TypeScript and Tailwind CSS
- Docker for containerized deployment and development
The system implements a complete disaster recovery workflow for aviation databases containing airports, airlines, and routes data from OpenFlights.
See the main business logic for temporal operations under src/core/temporal_engine.py
- System-Versioned Tables: Automatic tracking of all data changes with timestamps
- Temporal Queries: Query data state at any point in time using
FOR SYSTEM_TIME AS OF - Audit Trail: Complete history of all database modifications
- Diff Calculation: Compare data states between different timestamps
See the intelligent recovery logic under src/algorithms/smart_restore_algorithm.py
- Binary Search: Efficiently locate disaster boundaries in temporal history
- Health Scoring: Multi-factor validation of data integrity at each timestamp
- Confidence Calculation: Statistical confidence in restore point selection
- Boundary Detection: Precise identification of corruption start time
See src/core/selective_restore.py for surgical recovery implementation
- Full Restore: Complete database restoration to a specific timestamp
- Selective Restore: Surgical recovery preserving legitimate changes
- Preview Mode: Dry-run capability to preview recovery impact
- Dependency Validation: Foreign key integrity checks before restoration
- Web Interface: Modern Next.js frontend with timeline visualization
- CLI Tool: Professional command-line interface for automation
- REST API: Complete API for integration with external systems
- Python 3.11+
- MariaDB 11.0+ (with System Versioning support)
- Node.js 18+ (for frontend)
- Docker and Docker Compose (optional, for containerized setup)
-
Clone and start the application:
git clone https://github.com/AvishkarPatil/FlightVault.git cd FlightVault docker-compose up -d -
Load sample aviation data:
docker-compose exec flightvault python setup/data_loader.py -
The application will be available at:
- Web Interface: http://localhost:8000
- API Documentation: http://localhost:8000/docs
-
Install Python dependencies:
pip install -r requirements.txt
-
Setup MariaDB database:
python setup/database_setup.py
-
Load aviation data:
python setup/data_loader.py
-
Start the API server:
python start_api.py
-
Start the frontend (separate terminal):
cd frontend npm install npm run dev
The application can be configured using environment variables:
| Variable | Description | Default |
|---|---|---|
| DB_USER | Database username | root |
| DB_PASSWORD | Database password | password |
| DB_HOST | Database hostname | localhost |
| DB_PORT | Database port | 3306 |
| DB_NAME | Database name | flightvault |
The CLI provides comprehensive disaster recovery operations:
# System status and health check
python src/cli/flightvault.py status
# View timeline of database changes
python src/cli/flightvault.py timeline --hours 24
# Compare database states between timestamps
python src/cli/flightvault.py diff --timestamp "2024-01-01T12:00:00"
# Preview recovery without making changes
python src/cli/flightvault.py recover --dry-run
# Execute full database recovery
python src/cli/flightvault.py recover --execute
# Selective restore with surgical precision
python src/cli/flightvault.py selective
# Show smart algorithm analysis
python src/cli/flightvault.py algorithm📖 View Detailed CLI Commands - Complete command reference with parameters and examples
The web interface provides intuitive disaster recovery with:
- Interactive timeline slider for temporal navigation
- Visual diff viewer for change comparison
- One-click recovery with confidence scoring
- Real-time activity monitoring
Core Innovation: Binary search through temporal history with intelligent health scoring
- Search Window: Configurable time window (default: 24 hours)
- Binary Search: O(log n) efficiency for disaster boundary detection
- Health Validation: Multi-factor scoring system:
- Record count validation
- Required field integrity checks
- Foreign key relationship validation
- Data distribution analysis
- Boundary Detection: Precise identification of corruption onset
- Confidence Scoring: Statistical confidence in selection accuracy
- Automatic History: MariaDB tracks all changes without application code
- Point-in-Time Recovery: Query exact database state at any timestamp
- Zero Overhead: Minimal performance impact on normal operations
- ACID Compliance: Full transactional integrity for recovery operations
This project uses a modular architecture with clear separation of concerns:
src/algorithms: Smart recovery algorithms and health scoringsrc/core: Temporal engine and selective restore operationssrc/api: FastAPI REST API endpointssrc/cli: Command-line interface implementationfrontend: Next.js web application with TypeScriptsetup: Database initialization and data loading scripts
The Crisis: Mumbai Airport Database Disaster at 2 AM
📖 View Complete Demo Scenario - A detailed walkthrough of FlightVault's disaster recovery capabilities
Quick Summary:
- Crisis: Junior developer accidentally deletes 9 Mumbai airports
- Impact: 156 flight routes broken, $8,000/minute in losses
- Traditional Recovery: 150+ minutes, $880,000+ lost
- FlightVault Recovery: 3 minutes, $400 lost
- Result: 50x faster recovery, 2,200x less financial damage
The Recovery Process:
- Instant Detection (1 second) - MariaDB temporal tables capture changes
- Smart Analysis (2.3 seconds) - Binary search finds optimal restore point
- Visual Time-Travel (45 seconds) - Drag timeline to see exact changes
- One-Click Recovery (0.8 seconds) - Restore 9 airports and fix 156 routes
Key Innovation: Binary search through 24 hours of database history in 8 iterations with 98.7% confidence scoring.ty = 'Mumbai'; -- 2 airports deleted, affecting 156 routes
The Recovery:
- Timeline visualization shows disaster spike at 14:32:15
- Smart algorithm analyzes 1,440 minutes in 8 binary search iterations
- Optimal restore point identified: 14:31:45 (98% confidence)
- One-click recovery restores 2 airports and fixes 156 routes
- Total recovery time: 0.8 seconds
Planned features for production deployment:
- Multi-Table Cascade: Coordinated restoration across related tables with dependency management
- Analytics Dashboard: Historical trend analysis, disaster patterns, and recovery insights
- Real-time Monitoring: Automatic disaster detection with configurable alerts and notifications
- Cloud Deployment: Native AWS/Azure/GCP integration with managed database services
- RBAC Security: Role-based access control for team environments and audit compliance
- Mobile Interface: iOS/Android disaster recovery apps for on-the-go database management
- Advanced Algorithms: Machine learning-powered anomaly detection and predictive recovery
- Multi-Database Support: PostgreSQL, MySQL, and other temporal database implementations
Community contributions welcome!
Connection refused → Ensure MariaDB running, check DB_HOST/DB_PORT, run docker-compose ps
This project is licensed under the MIT License - a permissive license that allows commercial and non-commercial use with attribution.
Copyright (c) 2025 Avishkar Patil
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.