Demo showcase mode and .fdb management
v2.42 added a set of features for public showcases and for moving databases between installations.
Downloading and uploading .fdb
In the “Manage databases” modal every database has a ⬇ download button (GET /api/db/download?name=..., admin-only). It serves a consistent snapshot of the file — the same mechanism backups use (Database.SnapshotToTempFile()): downloading during active writes can never produce a torn file. Next to it, ⬆ upload your own .fdb (the existing /api/upload): carry a database from one server and bring it up on another in two clicks.
SQL IntelliSense
The SQL editor on the main page now has autocompletion and hints: ~40 keywords and constructs with syntax examples, aggregate/string/window functions, the tables of the current database and the columns of tables mentioned in the query (lazily fetched and cached; table. suggests that table's columns). ↑/↓ to choose, Tab/Enter to accept, Esc to close; Ctrl+Enter still runs the query. The “💡 Hints” button turns the feature off.
Read-only demo showcase mode
"demo_mode": true in settings.json or the -demo-mode flag (off by default) turns the installation into a public showcase: the full UI and a read-only API, with no mutation possible — enforced server-side, in several layers at once:
- a deny-by-default guard: any POST/PUT/DELETE/PATCH is rejected with 403 before auth and routing, except an explicit read-only allowlist (login,
/api/query, dashboard rendering, vector search, public/share/links) — an endpoint added in the future is blocked in showcase mode automatically; - an SQL guard on every SQL execution chokepoint —
/api/query, PostgreSQL/MySQL wire sessions, RPC: write statements are rejected, tx-control (BEGIN/COMMIT) is tolerated; - mutating RPC methods (insert/update/delete/create_db/…) are rejected outright.
Downloading .fdb works in showcase mode (it's a read-only GET) — demo visitors can take a sample database home. Demo data refreshes every 15 minutes.
License banner
In normal (non-demo) mode, authorized pages show a notice: “FileDB is free for individuals. Legal entities require a license”, with two buttons — confirming you're an individual hides the banner for a random 15–60 minutes; choosing “legal entity” shows the license text and sales contacts. In demo mode the same slot carries a non-dismissable “🔒 This is a FileDB demo” banner.