Tooling & production/Dev Dashboard & Local HTTPS
Dev Dashboard & Local HTTPS
Loopback dev dashboard panels, request and mail inspection, Dump debugging, and pure-Go local HTTPS with .test domains.
On this page
fletch dev starts an embedded dev dashboard on a separate loopback port so you can inspect requests, database tables, queued jobs, PubSub events, outbound emails, logs, and structured dumps without adding third-party debugging tools. Fletch also ships pure-Go local TLS and .test DNS tooling for developing over trusted HTTPS.
Activation and Port Allocation
The dev dashboard runs only in development mode, binds exclusively to 127.0.0.1, and is completely disabled in production builds.
By default, the dashboard listens on your app’s port plus 1000. If your app runs on :3000, the dashboard binds to 127.0.0.1:4000. When that port is already occupied, Fletch steps upward to the next free port automatically and prints the clickable dashboard URL in the startup banner.
| Mechanism | Usage |
|---|---|
| CLI flag | fletch dev --dashboard-addr 127.0.0.1:4100 |
| Environment variable | FLETCH_DASHBOARD_ADDR=127.0.0.1:4100 |
| Go option | fletch.WithDevDashboard(fletch.DevDashboard{Addr: "127.0.0.1:4100"}) |
| Disable flag | fletch dev --no-dashboard |
Built-In Panels
Dashboard navigation groups panels into three sections: App, Data, and Runtime.
App
| Panel | What it shows |
|---|---|
| Overview | Application status, active subsystems, and runtime metadata. |
| Routes | Registered HTTP and Live routes with methods, patterns, and names. |
| Config | Read-only view of resolved configuration layers with wire-level secret redaction when fletch.WithConfigReport is wired. |
Data
| Panel | What it shows |
|---|---|
| Database | SQLite and Postgres table list, table schemas, paginated row browser, ad-hoc SQL runner, and migration status. |
| Storage | Configured storage disks, object browser, file upload form, and signed URL generator. |
| Jobs | Quiver jobs grouped by state tabs with controls to Retry, Cancel, Delete, Purge, Run Now, Pause, and Resume. |
| Events | Live PubSub message stream plus a manual emit form for sending test events to topics. |
Outbound email inspector with sandboxed Desktop and Mobile (375px) HTML previews, plus Plain, Headers, Raw, and Attachments views. |
Runtime
| Panel | What it shows |
|---|---|
| Requests | Live SSE ring buffer of incoming HTTP requests with a detail drawer for status, timing, and headers. |
| Logs | Live stream of structured slog records. |
| Dumps | Structured values sent from application code via fletch.Dump and fletch.DumpCtx. |
| Commands | Interactive runner for registered CLI commands with live SSE stdout/stderr output and a daemon guard that blocks long-running server commands. |
Custom Panels
Add project-specific panels through fletch.WithDevDashboard using the Panels field on fletch.DevDashboard. Panel IDs must use lowercase letters, digits, and hyphens (-). Each panel supplies a Data func(*http.Request) (any, error) whose result is served as JSON at /api/<ID> and refreshed live. A list of objects renders as a table; any other value renders as JSON:
app := fletch.New(
fletch.WithDevDashboard(fletch.DevDashboard{
Addr: "127.0.0.1:4000",
Panels: []fletch.DevPanel{
{
ID: "feature-flags",
Title: "Feature Flags",
Data: func(r *http.Request) (any, error) {
return flags.Snapshot(r.Context())
},
},
},
}),
)
Debugging with fletch.Dump and fletch.DumpCtx
Call fletch.Dump anywhere in your code to send values directly to the Dumps panel while fletch dev is running. When you have a request or job context, prefer fletch.DumpCtx so the dump attaches to the active context:
func (h *OrderHandler) Create(w http.ResponseWriter, r *http.Request) {
fletch.DumpCtx(r.Context(), "incoming-order", payload)
fletch.Dump(computedTotal)
// ...
}
Theme, Keyboard Navigation, and Security
The dashboard uses CSS light-dark() with a system, light, and dark theme toggle and an amber accent palette.
All dashboard responses enforce a strict Content Security Policy, and every mutating endpoint (such as running SQL, retrying jobs, emitting events, or invoking commands) enforces Origin and CSRF checks in addition to binding only on loopback.
Keyboard controls work across the interface:
Left,Right,Home, andEndmove focus between tabs.EnterandSpaceactivate table rows and buttons.
Local HTTPS and .test Domains
Fletch includes a pure-Go local CA, DNS responder, and reverse proxy so you can test secure cookies, WebAuthn, and OAuth callbacks over HTTPS without installing nginx, Caddy, or dnsmasq.
Zero-DNS HTTPS (*.localhost)
Trust the local root certificate once, then launch fletch dev with --https:
fletch tls trust
fletch dev --https
Your app serves over trusted HTTPS at https://<app>.localhost with no DNS changes required.
Multi-App .test Domains
When you run several Fletch apps locally and want stable hostnames for each app and its dev dashboard, set up the pure-Go .test DNS responder and proxy:
fletch tls trust
fletch dns setup
fletch link
fletch proxy
Once linked, fletch proxy serves the app at https://<name>.test and routes its dev dashboard to https://dashboard.<name>.test.
| Command | Purpose |
|---|---|
fletch tls trust |
Install and trust the local root CA certificate. |
fletch tls untrust |
Remove the local root CA from the system trust store. |
fletch tls status |
Show root CA installation and trust status. |
fletch tls cert |
Generate or inspect a local leaf certificate. |
fletch dev --https |
Serve the app over zero-DNS https://<app>.localhost. |
fletch dns setup |
Configure the local pure-Go DNS resolver for .test domains. |
fletch dns teardown |
Remove local .test DNS configuration. |
fletch dns status |
Check whether .test DNS resolution is active. |
fletch link |
Register the current app directory under <name>.test. |
fletch unlink |
Unregister the current app from .test routing. |
fletch sites |
List all currently linked .test apps. |
fletch proxy |
Run the local HTTPS reverse proxy for https://<name>.test and https://dashboard.<name>.test. |