Admin UI Guide

CSharpDB Studio is a full-featured, browser-based admin interface built with Blazor Server. Connect to any CSharpDB instance — local or remote — to browse data, run queries, manage schemas, design ETL pipelines, and inspect low-level storage.

CSharpDB Studio welcome screen

The welcome screen shows the Object Explorer, keyboard shortcuts, and connection status.

Getting Started

Launch with the Daemon (recommended)

The easiest way to start the admin UI alongside the database daemon is with the bundled PowerShell script:

powershell -ExecutionPolicy Bypass -File .\scripts\Start-CSharpDbAdminAndDaemon.ps1 -OpenAdmin

This configures gRPC transport, starts the daemon, waits for it to accept connections, then launches the admin site and opens it in your default browser.

Launch Standalone

If you want to run the admin site by itself (using an embedded local database), run it directly:

cd src/CSharpDB.Admin
dotnet run

The admin UI listens on https://localhost:61816 by default. The connection endpoint and transport are configured in appsettings.json.

Transport Options

TransportConfig ValueUse Case
DirectdirectEmbedded, in-process access (default for standalone)
gRPCgrpcConnect to a remote daemon over gRPC (recommended for production)
HTTPhttpConnect to the REST API
Named PipesnamedpipesSame-machine IPC

Interface Overview

The Studio interface has four main areas:

  • Title BarShows the CSharpDB logo, connected endpoint URL, connection status indicator, and theme / layout toggle buttons.
  • Object Explorer (Sidebar)Tree view of User Tables, System Tables, System Catalog, Views, Indexes, Triggers, and Procedures. Includes a filter search box and quick-action buttons.
  • Tab Bar & Content AreaMulti-tab workspace. Open as many query, table, form, storage, pipeline, and procedure tabs as you need. Tabs can be closed individually.
  • Status BarDisplays connection state, server endpoint, and a summary of database objects (table, view, and procedure counts).

Query Editor

Open a new query tab from the sidebar (New Query button) or press Ctrl+N. The query editor provides a full SQL editing experience with syntax highlighting.

CSharpDB Studio query editor with results

Writing and executing a SELECT query with results displayed in a sortable grid.

Toolbar Actions

ButtonDescription
RunExecute the query and display results in the grid below. Shows row count and elapsed time.
AnalyzeShow the query execution plan without running the query.
ClearClear the editor and results.
FormatAuto-format and indent the SQL in the editor.
SQL / DesignerToggle between raw SQL mode and the visual query designer.

Stats Panel

Below the toolbar, the Stats section provides access to Table Stats and Column Stats buttons that show detailed statistics for the tables referenced in your query.

Saved Queries

Name your query in the Saved section and click Save to persist it. Use the dropdown to reload any previously saved query. Saved queries are stored in the sys.saved_queries system catalog.

Data Browser

Click any table in the Object Explorer to open it in a dedicated Data tab. The data browser shows all rows in a paginated, sortable, editable grid.

CSharpDB Studio data browser

Browsing the Products table with typed column headers and per-column filter inputs.

Features

  • Column headers display the column name, data type badge (INTEGER, TEXT, REAL), and a primary key indicator.
  • Per-column filter inputs let you narrow down rows by typing a filter value into the row beneath the header.
  • Click a column header to sort ascending/descending.
  • Add Row inserts a new empty row at the bottom for inline editing.
  • Delete Rows removes selected rows (click row numbers to select).
  • Save / Discard commits or reverts pending edits.
  • Pagination controls at the bottom let you choose 10, 25, 50, or 100 rows per page.

Schema Manager

While viewing a table, switch to the Schema view to inspect and modify the table structure.

CSharpDB Studio schema view

Schema view showing columns, types, constraints, and forms for creating indexes and triggers.

Sections

  • Columns — Lists every column with its name, data type, primary key status, identity flag, and nullability.
  • Alter Table — Expandable section for adding or dropping columns.
  • Indexes — Shows existing indexes and provides a form to create new ones (with optional UNIQUE constraint).
  • Triggers — Lists existing triggers and provides a form to create BEFORE/AFTER triggers on INSERT, UPDATE, or DELETE events.

Forms Designer

Create data-entry forms bound to any table or view. Click New Form in the toolbar or open an existing form from the Forms section of the Object Explorer.

CSharpDB Studio forms designer with toolbox, canvas, and property inspector

The visual form designer with control toolbox, design canvas, layers panel, and property inspector.

Designer Layout

The designer uses a three-panel layout:

  • Toolbox & Layers (left) — Drag controls onto the canvas from categorised groups: Layout (Label), Input Controls (Text, Textarea, Number, Date, Checkbox, Radio, Select, Lookup, Computed), and Data (DataGrid, Child Tabs). The Layers panel shows all controls with drag-to-reorder and type icons.
  • Design Canvas (centre) — WYSIWYG surface with absolute positioning, grid snapping, marquee multi-select, and real-time preview rendering. Tab-order badges overlay each control.
  • Property Inspector (right) — Edit control type, position/size, data binding (field + mode), control-specific properties (placeholder, min/max, formula, options), validation overrides, and z-order arrangement.

Toolbar

ActionDescription
SavePersist the form definition to the __forms metadata table.
Undo / RedoStep through the full edit history.
Delete / Copy / Paste / DuplicateClipboard and removal operations for selected controls.
Tab OrderToggle tab-order badge visibility on the canvas.
Mobile / Tablet / DesktopSwitch responsive breakpoints (375 px, 768 px, 1200 px) with per-breakpoint positioning.
Data EntryOpen the runtime data-entry view for this form.

Control Types

ControlDescription
LabelStatic text display.
Text / TextareaSingle-line or multi-line text input with optional placeholder, maxLength, and regex pattern.
NumberNumeric input with optional min/max validation.
DateDate picker.
Checkbox / RadioBoolean toggle or radio group with coercion for text- and integer-backed boolean values.
SelectDropdown with static options.
LookupDropdown populated from another table (foreign-key driven).
ComputedRead-only field with formula evaluation (=Quantity * Price) and child-table aggregates (=SUM(Items.Total)).
DataGridInline child-table editing with add/edit/delete permissions and FK mapping.
Child TabsTabbed interface for multiple child tables with nesting support.

Form Data Entry

Click Data Entry in the designer toolbar or open a form from the Object Explorer to enter the runtime data-entry view.

CSharpDB Studio form data entry with record list and navigation

Runtime data entry showing the rendered form, record navigation, search, and paginated record list.

Features

  • Record navigation — Previous / Next buttons with a Go to [PK] field for direct primary-key lookup.
  • New / Save / Delete — Full CRUD lifecycle for the bound table (disabled for read-only view sources).
  • Undo / Redo — Record-level change tracking before committing.
  • Record list (right pane) — Paginated, searchable list of all records. Pick a column and type to filter, then click a row to navigate.
  • Print — Render the current record for printing.
  • Edit Form — Jump back to the designer to modify the layout.
  • Validation — Rules inferred from schema (required, maxLength, range, regex, enum) with per-control overrides. Errors display inline next to affected fields.

Reports Designer

Create printable, banded reports from any table, view, or saved query. Open the reports designer from the Reports section of the Object Explorer or click New Report in the toolbar.

Designer Layout

The report designer uses a multi-panel layout:

  • Toolbox (left) — Drag controls onto report bands: Label, BoundText, CalculatedText, Line, and Box.
  • Groups & Sorts (left) — Define data grouping with ascending/descending sort direction and custom sort order on any field.
  • Page Settings (left) — Configure paper size (Letter / A4), orientation (Portrait / Landscape), and margins.
  • Design Canvas (centre) — WYSIWYG surface with drag-and-drop positioning, resize handles, and selection highlighting.
  • Property Inspector (right) — Edit position, size, data binding, format strings, font size, weight, alignment, and z-order for the selected control.

Report Bands

BandDescription
Report HeaderAppears once at the start of the report.
Page HeaderRepeats at the top of each page.
Group HeaderRepeats for each group break.
DetailRepeats for every data row.
Group FooterRepeats at the end of each group.
Page FooterRepeats at the bottom of each page.
Report FooterAppears once at the end of the report.

Expressions & Aggregates

CalculatedText controls support expressions with field references, arithmetic operators, and aggregate functions:

  • Field references[FieldName] or simple identifiers
  • Arithmetic=Price * Qty
  • Aggregates=SUM(Total), =COUNT(Id), =AVG(Price), =MIN(Date), =MAX(Amount)
  • Special=PageNumber, =PrintDate

Preview & Print

Click Preview to render the report with live data. The preview shows paginated output with page navigation and supports browser printing. Reports are limited to 10,000 rows and 250 pages in preview mode.

Stored Procedures

Create and manage stored procedures from the New Procedure button in the sidebar or by clicking an existing procedure in the Object Explorer.

CSharpDB Studio procedure editor

The procedure editor with definition, parameters, and execution sections.

Sections

  • Definition — Set the procedure name, description, enabled state, and SQL body with @param references.
  • Parameters — Define typed input parameters that map to @param placeholders in the body.
  • Execution — Provide a JSON object of argument values and click Run to test the procedure immediately.

Pipeline Designer

The Pipeline tab provides a visual ETL pipeline builder. Design data flows from source to destination with optional transforms — all without writing JSON by hand.

CSharpDB Studio pipeline designer

The visual pipeline designer with shape palette, transform toolbox, and run result panel.

Pipeline Shape

Every pipeline has four core sections configured through the left panel:

  • Metadata — Pipeline name, version, and description.
  • Source — Choose from CSV file, JSON file, database table, or raw SQL query as input.
  • Destination — Output to a table, CSV file, or JSON file.
  • Options — Execution mode and incremental-load controls.

Transforms

Drag transforms from the toolbox to build a processing chain:

TransformDescription
SelectKeep only the listed columns.
RenameRename source columns to new target names.
CastConvert columns to specific CSharpDB data types.
FilterKeep rows matching a filter expression.
DeriveCreate new computed columns from expressions.
DeduplicateRemove duplicate rows by specified key columns.

Actions

  • Validate — Check the pipeline definition for errors without executing.
  • Dry Run — Simulate execution without writing to the destination.
  • Run — Execute the full pipeline and write results.
  • Save — Persist the pipeline definition for reuse.
  • Visual / JSON — Toggle between the visual builder and raw JSON editor.

Storage Diagnostics

The Storage tab gives you a deep look into the physical database file, WAL state, and B+tree internals.

CSharpDB Studio storage diagnostics

Storage diagnostics showing database header, WAL status, space usage, and fragmentation metrics.

Panels

  • Database Header — File length, page count, magic bytes, version, page size, schema root, freelist head, and change counter.
  • WAL (Write-Ahead Log) — WAL file path, existence, length, frame count, commit frames, and integrity checks.
  • Space Usage — Database and WAL file sizes, page size, physical/declared page counts, and freelist utilization.
  • Fragmentation — B+tree free bytes, pages with free space, and tail freelist analysis.
  • Maintenance — Reindex (by scope: all, table, or index), vacuum (with confirmation), backup/restore operations, and foreign-key retrofit migration with validate/apply preview for older databases.
  • Page Type Histogram — Distribution of page types (leaf, internal, freelist, overflow).
  • Index Checks — Per-index integrity validation: root OK, table OK, columns OK, reachability.
  • Integrity Issues — Warnings or errors found during the latest diagnostics scan.
  • Page Drill-Down — Inspect any page by ID, optionally including a hex dump.

Keyboard Shortcuts

Ctrl+N Open a new query tab Ctrl+B Toggle the sidebar Ctrl+Enter Run the current query Ctrl+Shift+L Toggle dark / light theme