A GUI tool for operating RocksDB databases from a browser. Access RocksDB via REST API and intuitively browse, edit, and delete data.
This tool consists of the following components:
- Create_RocksDB.py - Sample database creation script (for initial setup)
- RocksDB_API_Server.py - REST API server for accessing RocksDB (Python/Flask)
- RocksDBViewer.html - Web interface for data manipulation
- rocksdb-manager.js - JavaScript code managing UI and API server integration
- Python 3.7 or higher
- Modern web browser (Chrome, Firefox, Safari, etc.)
pip3 install flask flask-cors rocksdictproject/
├── Create_RocksDB.py # Sample database creation script
├── RocksDB_API_Server.py # API server
├── RocksDBViewer.html # HTML interface
├── js/
│ └── rocksdb-manager.js # JavaScript code
├── css/
│ ├── core.css # Basic styles (optional)
│ └── tailwind.css # Tailwind CSS styles (optional)
└── sample_rocksdb/ # RocksDB database (auto-generated)
Note
CSS files are referenced in the HTML file, but since Tailwind utility classes are used, they can also be loaded via CDN.
If you want to try with sample data, you can create a sample database using the included Create_RocksDB.py script.
# Create sample database at default path (./sample_rocksdb)
python3 Create_RocksDB.py
# Create sample database at custom path
python3 Create_RocksDB.py /path/to/your/rocksdbSample data created:
default- Application basic information and settings (7 records)users- User information (5 records)products- Product data (7 records)orders- Order history (5 records)config- System configuration (17 records)logs- Application logs (20 records)
After running the script, the following will be displayed:
Sample database creation completed!
Database path: /absolute/path/to/sample_rocksdb
Created column families:
• default : 7 records
• users : 5 records
• products : 7 records
• orders : 5 records
• config : 17 records
• logs : 20 records
Note
If an existing database exists, an overwrite confirmation prompt will be displayed.
First, start the RocksDB API server.
# Using default path (./sample_rocksdb)
python3 RocksDB_API_Server.py
# Specifying a custom database path
python3 RocksDB_API_Server.py /path/to/your/rocksdbWhen the server starts successfully, the following will be displayed:
============================================================
RocksDB REST API Server
============================================================
Database path: /absolute/path/to/sample_rocksdb
Server URL: http://localhost:5000
Available endpoints:
GET /api/health - Health check
GET /api/column-families - Column family list
GET /api/data/<cf> - Get all data
...
To stop server: Ctrl+C
============================================================
- Open
RocksDBViewer.htmlin a web browser - Enter
http://localhost:5000in the "API Server URL" field (preset by default) - Click the "Connect to Server" button
When the connection is successful, the status in the upper right of the screen changes to "Connected" and the main content is displayed.
Select the column family you want to work with from the dropdown menu at the top of the screen.
Available column families:
default- Default column familyusers- User informationproducts- Product informationorders- Order informationconfig- Configuration informationlogs- Log information
All keys and values of the selected column family are displayed in table format.
Enter a keyword in the search box to filter data containing it in keys or values in real-time.
- Click the "Add New" button (or click the "Edit" button for existing data)
- Enter key and value in the modal dialog
- Click the "Save" button
JSON Editing Features:
- "Format" button - Format JSON for easy viewing
- "Minify" button - Compress JSON to a single line
- Real-time JSON validation - Check syntax errors during input
- Individual deletion: Click the "Delete" button for each data row
- Delete all: Delete all data in the currently selected column family with the "Clear All" button
Click the "Export" button to download data from the currently selected column family in JSON format.
- Click the "Import" button
- Select a JSON format file
- Data is automatically imported
Import file format:
{
"key1": "value1",
"key2": {"name": "example", "age": 30},
"key3": "value3"
}The API server provides the following endpoints:
GET /api/health
Get server status and database information
GET /api/column-families
Get list of available column families
GET /api/data/<column_family>
GET /api/data/<column_family>?search=keyword
GET /api/data/<column_family>/<key>
Get data (all, search, key-specific)
POST /api/data/<column_family>
Content-Type: application/json
{
"key": "my-key",
"value": "my-value"
}
DELETE /api/data/<column_family>/<key>
DELETE /api/data/<column_family>/clear
Individual deletion or delete all
GET /api/export/<column_family>
Export data in JSON format
POST /api/import/<column_family>
Content-Type: application/json
{
"key1": "value1",
"key2": "value2"
}
// Key: user:1001
// Value:
{
"id": 1001,
"name": "Taro Yamada",
"email": "taro@example.com",
"role": "admin"
}// Key: config:app
// Value:
{
"app_name": "MyApp",
"version": "1.0.0",
"debug_mode": false
}Key: cache:session:abc123
Value: {"user_id": 42, "expires": 1234567890}
- ✅ Real-time search and filtering
- ✅ JSON syntax validation and formatting
- ✅ Data import/export (JSON format)
- ✅ Multiple column family support
- ✅ Responsive design (mobile compatible)
- ✅ Copy to clipboard functionality
- ✅ Operation feedback via toast notifications
- ✅ Data addition, editing, and deletion
- ✅ Custom scrollbar
- ✅ Language toggle (Japanese/English)
- Smooth user experience with animation effects
- Visual feedback through color coding
- Automatic truncation display for long data
- Automatic detection and badge display for JSON data
- This tool is intended for use in development environments
- If using in production, implement the following measures:
- Authentication and authorization
- Use HTTPS communication
- Review CORS settings
- Strengthen input validation
- Implement API rate limiting
Cause 1: API server is not running
# Start the server
python3 RocksDB_API_Server.pyCause 2: Incorrect URL
- Default URL:
http://localhost:5000 - Change port number appropriately if using a different port
Cause 3: CORS error
- Verify that CORS is enabled on the API server
- Check error messages in the browser console
# Create sample database
python3 Create_RocksDB.py ./Example
# Or create at default path
python3 Create_RocksDB.py- Check if the column family is correctly selected
- Check if data exists in the database
- Check error logs in the browser console
- Verify that the JSON format is correct
- Use double quotes (
") (single quotes not allowed) - Be careful with trailing commas
This project is freely available for educational and development purposes.
Bug reports and feature improvement suggestions are welcome.
If you encounter problems, check the following:
- Python and packages are correctly installed
- Database path is correct
- TCP port 5000 is not being used by other programs
- Error messages in the browser's JavaScript console
Enjoy using RocksDB GUI Viewer!