# rowsetdev/rowset-studio architecture

> Architecture diagram of the GitHub repository rowsetdev/rowset-studio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rowsetdev/rowset-studio
- Repository: https://github.com/rowsetdev/rowset-studio

## Overview

Rowset Studio is a local-first database workspace: the desktop executable starts a loopback server and opens the browser-based Studio, where users configure a connection, run SQL or engine-specific queries, and inspect results. The product also provides schema and plan exploration, row editing/import, governance, activity and backups, notebooks, and schedules. The graph follows documented startup and sampled query execution; feature-to-backend wiring not shown in excerpts is omitted rather than inferred.

Main entry points: [`rowset-studio/src/app/router.tsx`](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/app/router.tsx) (App Router), [`rowset-core/internal/app/app.go`](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/internal/app/app.go) (Desktop Entry), [`rowset-core/internal/api/api.go`](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/internal/api/api.go) (Local API Server), [`rowset-studio/src/features/editor/EditorPage.tsx`](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/editor/EditorPage.tsx) (SQL Editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Local Runtime"]
  node_desktop["Desktop Entry<br/>[app.go]"]
  node_webapp["Browser Studio<br/>[main.tsx]"]
  node_transport["Studio API Client<br/>[api.ts]"]
  node_server["Local API Server<br/>[api.go]"]
end

subgraph group_studio["Studio Interface"]
  node_router["App Router<br/>[router.tsx]"]
  node_connections["Connections"]
  node_editor["SQL Editor<br/>[EditorPage.tsx]"]
  node_console["Engine Console<br/>[ConsolePage.tsx]"]
  node_schema["Schema Tools<br/>[ErDiagramPage.tsx]"]
  node_plans["Execution Plans<br/>[PlanPanel.tsx]"]
  node_governance["Policies<br/>[PoliciesPage.tsx]"]
  node_activity["Activity and Backups<br/>[ActivityPage.tsx]"]
  node_notebooks["Notebooks<br/>[NotebooksPage.tsx]"]
  node_schedules["Schedules<br/>[SchedulesPage.tsx]"]
end

subgraph group_query["Query and Engines"]
  node_queryapi["Query Handler<br/>[query.go]"]
  node_engine["Engine Router<br/>[engine.go]"]
  node_sqlguard["SQL Guard<br/>[parser.go]"]
  node_databases[("External Databases")]
end

subgraph group_workspace["Workspace Services"]
  node_store[("Encrypted Local Store<br/>[store.go]")]
  node_auth["Authentication<br/>[auth.go]"]
  node_activitysvc["Activity Service<br/>[activity.go]"]
end

node_user(("User"))

node_user -->|"starts"| node_desktop
node_desktop -->|"starts server"| node_server
node_desktop -->|"opens"| node_webapp
node_user -->|"uses"| node_router
node_router -->|"routes to"| node_connections
node_router -->|"routes to"| node_editor
node_router -->|"routes to"| node_console
node_router -->|"routes to"| node_governance
node_router -->|"routes to"| node_activity
node_router -->|"routes to"| node_notebooks
node_router -->|"routes to"| node_schedules
node_editor -->|"renders"| node_plans
node_editor -->|"opens"| node_schema
node_connections -->|"requests"| node_transport
node_editor -->|"requests"| node_transport
node_transport -.->|"calls API"| node_server
node_desktop -->|"configures"| node_auth
node_desktop -->|"configures"| node_store
node_server -.->|"dispatches"| node_queryapi
node_queryapi -->|"queries"| node_engine
node_queryapi -.->|"validates"| node_sqlguard
node_engine -.->|"executes queries"| node_databases
node_server -.->|"uses"| node_store
node_server -.->|"records activity"| node_activitysvc
node_activity -->|"shows history"| node_user
node_user -->|"explores schema"| node_schema
node_user -->|"inspects plans"| node_plans
node_user -->|"sets policies"| node_governance
node_user -->|"saves notes"| node_notebooks
node_user -->|"sets schedules"| node_schedules
node_user -->|"restores backups"| node_activity

click node_desktop "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/internal/app/app.go"
click node_webapp "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/main.tsx"
click node_router "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/app/router.tsx"
click node_connections "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/connections/ConnectionsPage.tsx"
click node_editor "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/editor/EditorPage.tsx"
click node_console "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/console/ConsolePage.tsx"
click node_schema "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/diagram/ErDiagramPage.tsx"
click node_plans "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/plan/PlanPanel.tsx"
click node_governance "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/policies/PoliciesPage.tsx"
click node_activity "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/activity/ActivityPage.tsx"
click node_notebooks "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/notebooks/NotebooksPage.tsx"
click node_schedules "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/schedules/SchedulesPage.tsx"
click node_transport "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/lib/api.ts"
click node_server "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/internal/api/api.go"
click node_queryapi "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/internal/api/query.go"
click node_engine "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/internal/engine/engine.go"
click node_sqlguard "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/sqlguard/parser.go"
click node_store "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/internal/store/store.go"
click node_auth "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/internal/auth/auth.go"
click node_activitysvc "https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/internal/activity/activity.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_desktop,node_webapp,node_transport,node_server,node_user toneBlue
class node_router,node_connections,node_editor,node_console,node_schema,node_plans,node_governance,node_activity,node_notebooks,node_schedules toneAmber
class node_queryapi,node_engine,node_sqlguard,node_databases toneMint
class node_store,node_auth,node_activitysvc toneRose
```

## Components

### Local Runtime

- [Desktop Entry](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/internal/app/app.go): `rowset-core/internal/app/app.go`
- [Browser Studio](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/main.tsx): `rowset-studio/src/main.tsx`
- [Studio API Client](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/lib/api.ts): `rowset-studio/src/lib/api.ts`
- [Local API Server](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/internal/api/api.go): `rowset-core/internal/api/api.go`

### Studio Interface

- [App Router](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/app/router.tsx): `rowset-studio/src/app/router.tsx`
- [Connections](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/connections/ConnectionsPage.tsx): `rowset-studio/src/features/connections/ConnectionsPage.tsx`
- [SQL Editor](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/editor/EditorPage.tsx): `rowset-studio/src/features/editor/EditorPage.tsx`
- [Engine Console](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/console/ConsolePage.tsx): `rowset-studio/src/features/console/ConsolePage.tsx`
- [Schema Tools](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/diagram/ErDiagramPage.tsx): `rowset-studio/src/features/diagram/ErDiagramPage.tsx`
- [Execution Plans](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/plan/PlanPanel.tsx): `rowset-studio/src/features/plan/PlanPanel.tsx`
- [Policies](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/policies/PoliciesPage.tsx): `rowset-studio/src/features/policies/PoliciesPage.tsx`
- [Activity and Backups](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/activity/ActivityPage.tsx): `rowset-studio/src/features/activity/ActivityPage.tsx`
- [Notebooks](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/notebooks/NotebooksPage.tsx): `rowset-studio/src/features/notebooks/NotebooksPage.tsx`
- [Schedules](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-studio/src/features/schedules/SchedulesPage.tsx): `rowset-studio/src/features/schedules/SchedulesPage.tsx`

### Query and Engines

- [Query Handler](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/internal/api/query.go): `rowset-core/internal/api/query.go`
- [Engine Router](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/internal/engine/engine.go): `rowset-core/internal/engine/engine.go`
- [SQL Guard](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/sqlguard/parser.go): `rowset-core/sqlguard/parser.go`
- **External Databases**

### Workspace Services

- [Encrypted Local Store](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/internal/store/store.go): `rowset-core/internal/store/store.go`
- [Authentication](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/internal/auth/auth.go): `rowset-core/internal/auth/auth.go`
- [Activity Service](https://github.com/rowsetdev/rowset-studio/blob/main/rowset-core/internal/activity/activity.go): `rowset-core/internal/activity/activity.go`

### Other components

- **User**

## Connections

- User → Desktop Entry: starts (evidence: `README.md`)
- Desktop Entry → Local API Server: starts server (evidence: `rowset-core/internal/app/app.go`)
- Desktop Entry → Browser Studio: opens (evidence: `README.md`)
- User → App Router: uses (evidence: `README.md`)
- App Router → Connections: routes to (evidence: `rowset-studio/src/app/router.tsx`)
- App Router → SQL Editor: routes to (evidence: `rowset-studio/src/app/router.tsx`)
- App Router → Engine Console: routes to (evidence: `rowset-studio/src/app/router.tsx`)
- App Router → Policies: routes to (evidence: `rowset-studio/src/app/router.tsx`)
- App Router → Activity and Backups: routes to (evidence: `rowset-studio/src/app/router.tsx`)
- App Router → Notebooks: routes to (evidence: `rowset-studio/src/app/router.tsx`)
- App Router → Schedules: routes to (evidence: `rowset-studio/src/app/router.tsx`)
- SQL Editor → Execution Plans: renders (evidence: `rowset-studio/src/features/editor/EditorPage.tsx`)
- SQL Editor → Schema Tools: opens (evidence: `rowset-studio/src/features/editor/EditorPage.tsx`)
- Connections → Studio API Client: requests
- SQL Editor → Studio API Client: requests (evidence: `rowset-studio/src/features/editor/EditorPage.tsx`)
- Studio API Client → Local API Server: calls API
- Desktop Entry → Authentication: configures (evidence: `rowset-core/internal/app/app.go`)
- Desktop Entry → Encrypted Local Store: configures (evidence: `rowset-core/internal/app/app.go`)
- Local API Server → Query Handler: dispatches
- Query Handler → Engine Router: queries (evidence: `rowset-core/internal/api/query.go`)
- Query Handler → SQL Guard: validates
- Engine Router → External Databases: executes queries
- Local API Server → Encrypted Local Store: uses
- Local API Server → Activity Service: records activity
- Activity and Backups → User: shows history (evidence: `README.md`)
- User → Schema Tools: explores schema (evidence: `README.md`)
- User → Execution Plans: inspects plans (evidence: `README.md`)
- User → Policies: sets policies (evidence: `README.md`)
- User → Notebooks: saves notes (evidence: `README.md`)
- User → Schedules: sets schedules (evidence: `README.md`)
- User → Activity and Backups: restores backups (evidence: `README.md`)
