MirseoDB is a high-performance, lightweight database system written in Rust with built-in AnySQL HYPERTHINKING engine that automatically detects and supports multiple SQL dialects.
Warning: This project is in early development, expect breaking changes.
Clone the repository:
git clone https://github.com/your-username/mirseodb.git
cd mirseodb
Install console dependencies:
cd console
npm install
cd ..
Run the server:
cargo run
The server will start on http://127.0.0.1:3306/
with the web console proxied. The underlying SvelteKit dev server runs on http://localhost:5173
.
MIRSEODB_SKIP_CONSOLE=1
: Disable web console startupMIRSEODB_API_TOKEN
: Set API authentication tokenSQL_INJECTION_PROTECT=1
: Enable SQL injection protectionAll API requests require authentication via the Authorization
header:
curl -X POST http://127.0.0.1:3306/query \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"sql": "SELECT * FROM users"}'
POST /query
: Execute SQL queries (JSON format)GET /query?sql=SELECT * FROM users
: Execute SQL queries (URL parameter)POST /api/query
: Alternative query endpointGET /health
: Health check endpointGET /api/health
: Alternative health check endpoint{
"sql": "CREATE TABLE users (id INTEGER, name TEXT)",
"auth_token": "optional_token_override",
"totp_token": "optional_2fa_token",
"email": "optional_user_email"
}
{
"success": true,
"data": [...],
"execution_time_ms": 25,
"rows_affected": 1
}
When authentication fails on /query
endpoints, the server returns random HTTP error codes (404, 403, 502, 500) to obscure the API's existence from unauthorized users.
Enable with SQL_INJECTION_PROTECT=1
. The system automatically sanitizes suspicious SQL patterns.
Configure 2FA for sensitive operations like DROP TABLE, DROP DATABASE, and bulk DELETE/UPDATE operations.
src/engine.rs
): Main database engine with CRUD operationssrc/smart_parser.rs
): Intelligent SQL dialect detection and parsingsrc/bloom_filter.rs
): Column-based filtering and chunked scanningsrc/indexing.rs
): Composite indexing and query optimizationsrc/auth.rs
, src/two_factor_auth.rs
): Authentication and security featuressrc/server.rs
): HTTP server and API endpointssrc/persistence.rs
): File-based storage engine.mirseoDB/*.mdb
(binary serialized format)cargo build --release
cargo test
cargo run
MIRSEODB_SKIP_CONSOLE=1 cargo run
Parser Optimizations:
Query Optimizations:
Table Scan Optimizations:
The optimizations provide significant performance improvements:
Comprehensive documentation is available in the docs/
directory:
docs/en/
: English documentationdocs/ko/
: Korean documentationEach module has detailed documentation covering:
This project is licensed under the MIT License - see the LICENSE file for details.
For questions, issues, or contributions, please visit the GitHub repository or create an issue.