A powerful, modern web application for connecting to and viewing multiple database types including SQLite, MySQL, PostgreSQL, MongoDB, and SQL Server with automatic cleanup and JSON export capabilities.
- 🗄️ SQLite - Upload database files (.db, .sqlite, .sqlite3) up to 50MB
- 🐬 MySQL - Connect to remote MySQL databases (v5.7+)
- 🐘 PostgreSQL - Connect to PostgreSQL databases (v9.6+)
- 🍃 MongoDB - Connect to MongoDB databases with collection support
- 🔷 SQL Server - Connect to Microsoft SQL Server (2012+)
- 📋 Universal Table Browser - View tables/collections from any database type
- 📄 Data Viewer - Browse data with proper formatting and NULL value handling
- 📄 Pagination - Navigate large datasets efficiently (50 rows per page)
- 📥 JSON Export - Export any table/collection to JSON format with metadata
- 🗑️ Auto-Cleanup - Automatic connection cleanup when you close the tab or after 2 hours
- 🔒 Secure Connections - Session-based isolation with unique session IDs
- 📱 Responsive Design - Beautiful, modern UI that works on all devices
- 🎯 Features Tab - Track implemented and planned features
- 🔍 Search & Filter - Column-specific filters and full-text search
- 📊 Data Visualization - Generate charts and graphs from data
- 🔧 SQL Query Editor - Execute custom SQL queries
- 📤 Multiple Export Formats - CSV, Excel, XML support
- 🔗 Relationship Viewer - Visualize foreign key relationships
- Python 3.7+
- For SQL Server: ODBC Driver 17 for SQL Server
- Install the required dependencies:
pip install -r requirements.txt- Run the application:
python Main.py- Open your browser and navigate to:
http://localhost:5000
- Ensure your MySQL server allows remote connections if connecting from a different machine
- Default port: 3306
- Ensure
pg_hba.confallows connections from your IP - Default port: 5432
- Supports both connection strings and individual parameters
- Default port: 27017
- For MongoDB Atlas, use the connection string option
- Requires ODBC Driver 17 for SQL Server to be installed
- For Windows, download from Microsoft
- For Linux:
sudo apt-get install mssql-tools unixodbc-dev - Default port: 1433
Option 1: SQLite (Upload File)
- Select "SQLite" from the database type selector
- Click the upload area or drag and drop your database file
- Supported formats: .db, .sqlite, .sqlite3 (up to 50MB)
Option 2: MySQL
- Select "MySQL" from the database type selector
- Enter connection details:
- Host (e.g., localhost)
- Port (default: 3306)
- Database name
- Username
- Password
- Click "Connect to MySQL"
Option 3: PostgreSQL
- Select "PostgreSQL" from the database type selector
- Enter connection details:
- Host (e.g., localhost)
- Port (default: 5432)
- Database name
- Username
- Password
- Click "Connect to PostgreSQL"
Option 4: MongoDB
- Select "MongoDB" from the database type selector
- Either:
- Enter a connection string (e.g.,
mongodb://user:pass@host:port/database) - OR fill in individual fields (host, port, database, username, password)
- Enter a connection string (e.g.,
- Click "Connect to MongoDB"
Option 5: SQL Server
- Select "SQL Server" from the database type selector
- Enter connection details:
- Host (e.g., localhost)
- Port (default: 1433)
- Database name
- Username
- Password
- Click "Connect to SQL Server"
-
View Tables/Collections:
- After connecting, all tables (or collections for MongoDB) will be displayed as cards
- Click on any table card to view its data
-
Navigate Data:
- Table data is displayed with pagination (50 rows per page)
- Use the pagination controls to navigate through large datasets
-
Export Data:
- Click the "Export to JSON" button to download the current table as JSON
- Exported file includes table name, database type, columns, row count, and all data
-
Disconnect:
- Click the "Disconnect" button to close the current database connection
- Connections are also automatically closed when you close the browser tab
- View all implemented features with descriptions
- Check out planned features coming soon
- See statistics about the application
- 🔒 Your uploaded files are stored with unique session IDs
- 🗑️ Files are automatically deleted when you:
- Close the browser tab
- After 2 hours of inactivity
- 🛡️ Each session is isolated - no file conflicts between users
You can customize these settings in Main.py:
- Upload folder:
uploads/directory - Max file size: 50MB (
MAX_CONTENT_LENGTH) - Session lifetime: 2 hours (
PERMANENT_SESSION_LIFETIME) - Rows per page: 50 (in both
Main.pyandmain.html)
The repository includes a script to generate sample databases for testing:
python create_test_databases.pyThis creates 4 test databases in the test_databases/ folder:
- customers.db - Simple customer data
- ecommerce.db - Products, orders, and reviews
- employees.db - Departments, employees, and projects
- library.db - Books, members, and loans
- Python 3.7+
- Flask 3.0.0
- Werkzeug 3.0.1
- pymysql 1.1.0 (MySQL support)
- pymongo 4.6.0 (MongoDB support)
- psycopg2-binary 2.9.9 (PostgreSQL support)
- pyodbc 5.0.1 (SQL Server support)
The application uses a modular architecture with:
- Main.py - Flask web server and route handlers
- database_handler.py - Database abstraction layer supporting multiple database types
- templates/main.html - Responsive frontend with database type selection
Each database type has its own handler class implementing a common interface, making it easy to add new database types in the future.
- Check that MySQL server is running:
sudo systemctl status mysql - Verify user has remote access permissions
- Check firewall rules allow port 3306
- Verify PostgreSQL is running:
sudo systemctl status postgresql - Check
pg_hba.conffor connection permissions - Ensure port 5432 is accessible
- Verify MongoDB is running:
sudo systemctl status mongod - Check authentication settings in MongoDB
- For Atlas, ensure IP whitelist includes your address
- Ensure ODBC Driver 17 is installed
- Check SQL Server is configured for TCP/IP connections
- Verify SQL Server authentication mode (Windows vs SQL Server auth)
MIT