factcircuit
FactCircuit: an auditable claim-and-evidence verification loop with immutable provenance, staged checks, bounded retrieval, and reproducible evaluation.
Nền tảng SQLite Cloud đa người dùng, mã hóa AES-256-GCM, sao lưu tự động, phân quyền RBAC và API REST realtime tốc độ cao.
Translation pending
DataTypeScript · HTMLGitHub @Elaina2026OnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
High-performance, multi-tenant SQLite cloud engine with REST & SQL APIs, live SSE events, AES-256-GCM encryption, and AI vector functions.
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
Enterprise-Grade Multi-Tenant SQLite Cloud Engine with Multi-Node Host Sharding & Spillover, High-Performance REST & SQL APIs, Live Server-Sent Events (SSE), Database-Scoped Media Streaming (HTTP 206), AES-256-GCM Encryption at Rest, Automated Backups, and Native Vector Mathematics. [ Overview ] • [ Phiên bản Tiếng Việt ] • [ Architecture ] • [ Key Capabilities ] • [ Quickstart ] • [ Security Policy ] • [ API Reference ] • [ Shortcuts ] • [ Documentation Suite ]Read the full README ↗
VanillaDatabase (VanillaDB) is a self-hosted, lightweight multi-tenant SQLite cloud platform engineered with Node.js 22+ and Fastify.
Rather than running monolithic database clusters for every client, project, or microservice, VanillaDatabase dynamically provisions and orchestrates isolated SQLite database instances on disk. Each tenant database functions as an independent storage unit with dedicated Write-Ahead Logging (WAL), scoped API tokens, encrypted backups, media storage, asynchronous webhooks, and live event streams.
[!NOTE] Isolation Guarantee: All tenant databases operate with strict filesystem isolation under
data/databases/:id.sqlite. System metadata is partitioned separately underdata/system/vanilladb.sqlite.
+-----------------------------------+
| HTTP / SSE Client Layer |
| (Browser Dashboard, SDKs, Scripts)|
+-----------------+-----------------+
|
v
+-----------------------------------+
| Fastify API Gateway (Port 3000)|
| - Strict CSP & Session HMAC |
| - Cluster Spillover Controller |
| - Inter-Node Transparent Proxy |
+--------+-----------------+--------+
| |
+----------------------+ +----------------------+
| (Local Storage) | (Proxy / Stream)
v v
+---------------------------------------+ +---------------------------------------+
| Primary Host Node (Local) | | Worker Storage Node 1 (Remote) |
| - System Metadata (vanilladb.sqlite) | | - Isolated Tenant Databases |
| - Local Tenant Databases | | - Local AES-256 Media Files |
| - Realtime Hardware Telemetry (CPU/RAM)| | - Internal Node API (/api/internal/*) |
| - Spillover Monitor (>85% / <5GB free)| | - Zero-Downtime Migration Receiver |
+---------------------------------------+ +---------------------------------------+
/v1/databases/:id/*, /query, /batch, /exec, /files) targeting databases hosted on remote worker nodes and transparently proxies traffic with zero client configuration changes.VACUUM INTO snapshot streaming over secure authenticated endpoints (/api/admin/cluster/migrate) with SHA-256 integrity verification.VDB_HOST_DISK_GB) to enforce precise storage thresholds even on shared physical disk partitions.db_<nanoid>).vec_cosine_similarity(), vec_cosine_distance()) registered natively.encrypt_aes(), decrypt_aes(), hash_sha256(), hash_hmac().token_version. Password changes and account disabling revoke active sessions immediately across all clients.127.0.0.0/8), private subnets (RFC 1918), link-local addresses, and cloud metadata endpoints (169.254.169.254).VENC signature, PBKDF2 salt, 128-bit authentication tag).ATTACH DATABASE, DETACH DATABASE, and binary extension loading (load_extension) are permanently disabled.super_admin, admin, user.owner, admin, editor, viewer.max_databases) and per-user request throttling (rate_limit_per_minute).vdb_live_* or vdb_test_*.database:read, database:write, database:ddl, database:admin./v1/databases/:id/realtime dispatching database mutations (insert, update, delete, schema).X-Vanilla-Signature), payload retries, and Discord/Slack formatting.* * * * *) supporting step intervals, ranges, and comma lists.send_command (SQL), run_maintenance (wal_checkpoint, vacuum, optimize, reindex), create_backup, trigger_webhook, and export_data.time_offset staging delays, continue_on_failure bypass, and only_when_online state validation./api/admin/databases/:id/activity).POST /v1/databases/:id/tickets) for secure media streaming and SSE connection handshakes.Ctrl+K), quick DB creation (Ctrl+B), Vim navigation chords (G+D, G+I), collapsible sidebar (Ctrl+\), and table browser hotkeys (Alt+I, Alt+R, [, ], /, Del).robots.txt declaring crawler policies and Cloudflare Content-Signal (search=yes, ai-input=yes, ai-train=no), paired with standard sitemap.xml.llms.txt & index.md): Publishes curated LLM markdown summaries according to the community llmstxt.org specification, alongside native HTTP content negotiation (Accept: text/markdown) serving documentation with Vary: Accept.<div id="root"> ensures search bots and non-JS scrapers read complete product copy, H1/H2 hierarchies, and SDK examples.@graph schema combining WebSite, SoftwareApplication (DeveloperApplication with OS and pricing definitions), and Organization.404.html to preserve search crawl budgets.banner.webp delivering 80% payload size reduction compared to traditional PNG banners for optimal Core Web Vitals (LCP).git clone https://github.com/Elaina2026/VanillaDB.git
cd VanillaDB
npm install
cp .env.example .env
Review core variables in .env:
PORT=3000
HOST=0.0.0.0
NODE_ENV=production
VDB_MASTER_KEY=generate_a_secure_64_character_hex_key
VDB_SESSION_SECRET=generate_a_secure_64_character_hex_key
VDB_CORS_ORIGINS=http://localhost:3000
# Build frontend and server bundles
npm run build
# Start production server
npm start
For development with hot reloading:
npm run dev
The web dashboard is accessible at http://localhost:3000.
| Variable | Type | Default | Description |
|---|---|---|---|
PORT | number | 3000 | HTTP listening port |
HOST | string | 0.0.0.0 | Network binding interface |
NODE_ENV | string | development | Runtime environment (development, production, test) |
VDB_NODE_ID | string | local | Host identifier for cluster sharding (local or worker node ID) |
VDB_CLUSTER_SECRET | string | Auto-generated | Secret token for secure inter-node gateway-to-worker communication |
VDB_HOST_DISK_GB | number | 0 (Unset) | Host physical partition quota override (useful for 20GB VPS/containers) |
VDB_MAX_DISK_GB | number | 0 (Unset) | Alternative alias for host physical disk quota override |
VDB_MASTER_KEY | string | Auto-generated | 256-bit encryption key for database and media encryption |
VDB_SESSION_SECRET | string | Auto-generated | HMAC secret for session cookies and temporary tokens |
VDB_CORS_ORIGINS | string | * | Allowed CORS origins (comma-separated for multiple domains) |
VanillaDatabase follows a rigorous zero-trust defense-in-depth security model. For full vulnerability disclosure procedures, supported releases, SLA commitments, and architectural isolation guarantees, read our dedicated security documents:
All Data Plane endpoints require authentication via Bearer API token (Authorization: Bearer vdb_live_...) or active session cookie.
# Execute SQL Query (SELECT)
POST /v1/databases/:databaseId/query
Content-Type: application/json
{
"sql": "SELECT id, username, email FROM users WHERE status = ? LIMIT 10;",
"params": ["active"]
}
# Execute SQL Mutation (INSERT, UPDATE, DELETE)
POST /v1/databases/:databaseId/exec
Content-Type: application/json
{
"sql": "UPDATE users SET status = ? WHERE id = ?;",
"params": ["verified", "usr_123"]
}
# Transactional Batch Execution
POST /v1/databases/:databaseId/batch
Content-Type: application/json
{
"transaction": true,
"statements": [
{ "sql": "UPDATE accounts SET balance = balance - 100 WHERE id = ?;", "params": ["acc_a"] },
{ "sql": "UPDATE accounts SET balance = balance + 100 WHERE id = ?;", "params": ["acc_b"] }
]
}
# Connect to Live Realtime SSE Stream
GET /v1/databases/:databaseId/realtime
Accept: text/event-stream
# Stream Media File with Range Support
GET /v1/databases/:databaseId/storage/:fileId
Range: bytes=0-1048575
| Method | Endpoint | Access | Purpose |
|---|---|---|---|
GET, HEAD | /health or /api/health | Public (CORS *) | ProjectStatus-compliant health check for Gateway and Worker nodes |
POST | /api/auth/register | Public | Self-service user account registration |
POST | /api/auth/login | Public | User authentication and session cookie generation |
POST | /api/auth/login/2fa | Public | Step-up 2FA verification with TOTP code or backup code |
POST | /api/auth/change-password | Authenticated | Password update with automatic session revocation |
GET | /api/admin/databases | Authenticated | List accessible tenant databases |
POST | /api/admin/databases | Authenticated | Create a new tenant database |
POST | /api/admin/databases/:id/clone | Admin / Owner | Clone database instance for branching |
POST | /api/admin/databases/:id/backups | Admin / Owner | Trigger instant encrypted backup snapshot |
POST | /api/admin/databases/:id/maintenance | Admin / Owner |
# ProjectStatus Health Check API (Gateway & Worker compatible)
GET /health
Accept: application/json
# Response (200 OK for operational/degraded, 503 for outage):
{
"status": "operational",
"service": "vanilladb-gateway",
"uptime": 12450,
"timestamp": 1740000000000,
"checks": {
"database": "ok",
"gateway": "connected"
}
}
VanillaDatabase features a comprehensive shortcut matrix accessible from anywhere in the platform:
| Context | Shortcut | Action (English) | Thao tác (Tiếng Việt) |
|---|---|---|---|
| Global | Ctrl + K | Open Command Palette | Mở thanh tìm kiếm lệnh nhanh |
| Global | Ctrl + B | Open Create Database modal | Mở cửa sổ tạo cơ sở dữ liệu mới |
| Global | Ctrl + \ | Toggle desktop sidebar collapse | Thu gọn / Mở rộng Sidebar điều hướng |
| Global | G then D | Navigate to Databases (Vim chord) | Về danh sách Database (Vim chord) |
| Global | G then I | Navigate to Inbox (Vim chord) | Mở Hộp thư thông báo (Vim chord) |
| Global | Ctrl + Shift + L | Toggle language (EN / VI) | Chuyển đổi ngôn ngữ (EN / VI) |
| Global | Alt + T | Toggle theme (Light / Dark) | Chuyển đổi giao diện Sáng / Tối |
| Global | Shift + ? | Open Shortcuts reference page | Mở trang tra cứu phím tắt |
| DB Detail | 1 .. 9 | Switch database detail tabs | Chuyển nhanh qua lại các tab Database |
| SQL Console | Ctrl + Enter | Execute SQL statement | Thực thi câu lệnh SQL đang soạn |
The test suite runs with Vitest and executes end-to-end assertions against the server instance:
# Run complete test suite (248 integration & unit tests across 16 test suites)
npm test
# Run security and pentesting suites (data leak, zero-day, auth & token tickets)
npm run test:security
# Run TypeScript typecheck
npm run typecheck
# Run performance benchmarks
npm run benchmark
All 248 tests cover:
For exhaustive technical reference and system designs:
Comprehensive System Architecture: ARCHITECTURE.md
Đặc tả Kiến trúc Hệ thống Toàn diện (VI): ARCHITECTURE.vi.md
Documentation Hub: docs/README.md
Documentation Hub: docs/README.md
English Guides:
VanillaDatabase is open-source software licensed under the MIT License.
VDB_DATA_DIR | string | ./data | File storage path for SQLite databases, backups, and media |
VDB_MAX_REQUEST_SIZE_MB | number | 10 | Maximum body size for SQL requests and payload imports |
VDB_STORAGE_MAX_FILE_SIZE_MB | number | 100 | Maximum file size for media asset uploads |
VDB_STORAGE_ENCRYPTION | boolean | true | Enable AES-256-GCM encryption for stored media files |
VDB_DEFAULT_USER_MAX_DATABASES | number | 2 | Default database quota for newly registered users |
VDB_DEFAULT_USER_RATE_LIMIT | number | 180 | Default request-per-minute quota for regular users |
Execute integrity_check, vacuum, or optimize |
GET | /api/system/status | Super Admin | Realtime CPU, RAM, and host disk space telemetry |
GET | /api/admin/cluster/status | Admin | Multi-host cluster storage status, health & throughput |
POST | /api/admin/cluster/nodes | Admin | Register and connect new worker storage node |
DELETE | /api/admin/cluster/nodes/:id | Admin | Deregister worker storage node |
POST | /api/admin/cluster/poll | Admin | Trigger instantaneous cluster heartbeat poll |
POST | /api/admin/cluster/migrate | Admin | Execute zero-downtime database migration to target node |
| SQL Console | Ctrl + E | Analyze EXPLAIN query plan | Phân tích kế hoạch truy vấn EXPLAIN |
| SQL Console | Ctrl + S | Export query results to CSV | Tải kết quả truy vấn ra file CSV |
| SQL Console | Alt + Up / Down | Browse query execution history | Duyệt lịch sử câu lệnh SQL đã chạy |
| SQL Console | Ctrl + / | Toggle SQL line comment (--) | Bật/tắt comment dòng lệnh SQL |
| SQL Console | F11 / Esc | Toggle Fullscreen Zen Mode | Bật/tắt chế độ toàn màn hình Zen Mode |
| Table Browser | Alt + I | Open Insert Row modal | Mở modal chèn dòng dữ liệu mới |
| Table Browser | Alt + R | Refresh table rows and schema | Tải lại dữ liệu bảng và schema |
| Table Browser | [ / ] | Previous / Next page | Lùi trang / Tiến trang dữ liệu |
| Table Browser | / | Focus table search input | Nhảy nhanh vào ô tìm kiếm bảng |
| Table Browser | Del | Bulk delete selected rows | Xóa các dòng dữ liệu đang chọn |
| DB Actions | Ctrl + Shift + B | Create instant backup snapshot | Tạo bản sao lưu tức thì |
| DB Actions | Ctrl + Shift + D | Open Clone Database modal | Mở modal nhân bản Database |
| DB Actions | Alt + M | Run PRAGMA integrity_check | Chạy kiểm tra toàn vẹn cơ sở dữ liệu |