Part of the EmbeddedOS ecosystem.
eDB is a unified multi-model database that combines SQL, Document/NoSQL, and Key-Value storage in a single embedded engine. It includes a Python backend (FastAPI + SQLite), a React/TypeScript frontend with SQL editor and AI-powered query assistance, and a standalone browser version.
| Feature | Description |
|---|---|
| ποΈ Multi-Model Storage | SQL tables, JSON documents, and key-value pairs β all in one database |
| π JWT Authentication | Access and refresh tokens with configurable expiration |
| π₯ RBAC | Admin, read_write, read_only roles with granular permissions |
| π AES-256 Encryption | Field-level encryption at rest using AES-256-GCM |
| π Audit Logging | Tamper-resistant logs with hash chain verification |
| π€ eBot AI | Natural language β SQL/NoSQL translation |
| π REST API | Full CRUD via FastAPI with auto-generated OpenAPI docs |
| π‘οΈ Input Sanitization | SQL injection, NoSQL injection, and prompt injection detection |
| β‘ Zero Dependencies | Core engine runs on SQLite β no external database needed |
| π¦ Embeddable | Use as a Python library or standalone server |
| π₯οΈ React Frontend | Table management, inline editing, SQL query editor, eBot sidebar |
| π Browser Standalone | Self-contained single-file HTML version with localStorage persistence |
git clone https://github.com/embeddedos-org/eDB.git
cd eDB
pip install -e ".[dev]"
# Initialize database with default admin
edb init
# Start the server
edb serve --port 8000
# API docs at http://localhost:8000/docsnpm install
npm run devThe React UI runs at http://localhost:5178.
Open browser/edb.html directly in any browser for a zero-install experience with localStorage persistence.
from edb.core.database import Database
from edb.core.models import ColumnDefinition, ColumnType, TableSchema
db = Database("my_app.db")
# SQL
schema = TableSchema(name="users", columns=[
ColumnDefinition(name="id", col_type=ColumnType.INTEGER, primary_key=True),
ColumnDefinition(name="name", col_type=ColumnType.TEXT),
])
db.sql.create_table(schema)
db.sql.insert("users", {"id": 1, "name": "Alice"})
# Documents
db.docs.insert("logs", {"event": "login", "user": "Alice"})
# Key-Value
db.kv.set("session:abc", {"user_id": 1}, ttl=3600)edb shell
# edb> SELECT * FROM users
# edb> .tables
# edb> .collectionseDB/
βββ src/
β βββ edb/ # Python backend
β β βββ api/ # FastAPI routes and dependencies
β β βββ auth/ # JWT, users, RBAC
β β βββ ebot/ # AI/NLP query interface
β β βββ query/ # Query parser and planner
β β βββ security/ # Encryption, audit, input validation
β β βββ config.py # Pydantic Settings configuration
β β βββ cli.py # CLI entry point
β βββ App.tsx # React main component
β βββ main.tsx # React entry point
β βββ styles.css # Full application styles
β βββ components/ # React UI components
β β βββ TopBar.tsx # App header with controls
β β βββ TableList.tsx # Sidebar table navigator
β β βββ TableView.tsx # Data grid with inline editing
β β βββ QueryEditor.tsx # SQL query editor panel
β β βββ EBotSidebar.tsx # AI assistant sidebar
β β βββ StatusBar.tsx # Bottom status bar
β βββ hooks/ # React hooks
β βββ useDatabase.ts # In-memory database with CRUD
β βββ useEBot.ts # eBot AI integration
βββ browser/
β βββ edb.html # Standalone browser version
βββ tests/ # Python tests
βββ docs/ # Documentation
βββ examples/ # Runnable examples
βββ package.json # Node.js project manifest
βββ pyproject.toml # Python project metadata
βββ vite.config.ts # Vite configuration
βββ tsconfig.json # TypeScript configuration
Configure via environment variables (prefix EDB_) or .env file:
EDB_DB_PATH=my_data.db
EDB_API_HOST=0.0.0.0
EDB_API_PORT=8000
EDB_JWT_SECRET=your-strong-secret-here
EDB_ENCRYPTION_KEY=your-encryption-keypip install -e ".[dev]"
pytest
ruff check src/ tests/
ruff format src/ tests/| Command | Description |
|---|---|
npm run dev |
Start development server (port 5178) |
npm run build |
Type-check and build for production |
npm run preview |
Preview production build |
- Core multi-model engine (SQL, Document, KV)
- Query DSL with parser and planner
- JWT authentication and RBAC
- AES-256 encryption at rest
- Tamper-resistant audit logging
- REST API (FastAPI)
- eBot rule-based NL queries
- CLI (serve, init, shell)
- React frontend with SQL editor
- Browser standalone version
- CI/CD pipeline
- LLM-powered eBot (OpenAI/local models)
- Graph data model (Neo4j-style)
- Multi-node clustering (eDBE)
- GraphQL and gRPC interfaces
- File/blob storage with indexing
- Predictive analytics integration
See CONTRIBUTING.md for guidelines.
See SECURITY.md for vulnerability reporting and security best practices.
MIT License. See LICENSE for details.