Skip to content
LukasParkePublic

About

an OpenAPI design tool

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🔥 Toasty

A ref-first OpenAPI document editor for the desktop. Everything is a schema, everything is a reference — built to stay fast on huge specifications spread across many files.

Stack: SvelteKit 2 + Svelte 5 (runes) UI · Tauri 2 + Rust shell for local file operations.

Highlights

  • References are the data model. Schemas and parameters live in normalized entity records; every payload slot links by stable id, so renames propagate automatically and cycles are safe. JSON-pointer $refs (#/components/schemas/Pet, cross-file ./common.yaml#/…) exist only in the serialized output.
  • Multi-document workspaces. Open a folder — Toasty scans it (Rust), indexes every YAML/JSON spec (Rust), imports each document, and watches for on-disk changes.
  • Wire map. A layered relationship diagram of every $ref — operations, parameters and schemas as nodes, references as arrows. Hover isolates a node's neighbourhood, click opens it, scroll to zoom, drag to pan.
  • Live preview of the generated spec (YAML/JSON) per selection or per document, debounced, syntax-highlighted, copy-to-clipboard included.
  • Golden editing: command palette (⌘K), tabs, undo/redo with labeled steps, drag-and-drop linking, extract-to-component / inline refactorings, non-destructive schema-kind migration, and structural validation with a clickable "toast report" — errors are burnt, warnings under-toasted, clean specs perfectly toasted.
  • Two crusts. Midnight Toaster (dark) and Lightly Buttered (light) themes, keyboard-first with visible focus rings everywhere, ARIA listboxes/dialogs, and reduced-motion-safe steam.
  • Scales down to nothing: runs as a plain web app too (localStorage autosave, download export); the desktop shell adds real filesystem access.

Development

pnpm install
pnpm dev            # web UI at http://localhost:5173
pnpm dev:host       # same, bound to 0.0.0.0:5199 for LAN access
pnpm build          # static SPA into build/
pnpm check          # svelte-check

# Desktop (requires Rust toolchain + webkit2gtk-4.1)
pnpm tauri dev      # native window with dev server

Testing

pnpm test              # unit / integration / regression tests (vitest)
pnpm test:coverage     # v8 coverage — lines/statements/functions gated at 95%+
pnpm test:e2e          # Playwright specs against a production preview build
cargo test --manifest-path src-tauri/Cargo.toml   # Rust backend suite

Coverage scope is the TypeScript logic surface (src/lib/**/*.ts, including the runes store). Svelte components are covered behaviorally by the Playwright suite; the branch metric sits at ~85% because defensive-guard arms are unreachable through public APIs.

Architecture

src/lib/model/        normalized entities, runes store (undo/redo, autosave)
src/lib/openapi/      generate · import · validate · parse · versions (+ tests)
src/lib/components/
  editors/            SchemaValueEditor (recursive) · RefPicker · per-entity editors
  shell/              AppShell · Sidebar · TabBar · StatusBar · PreviewPane · CommandPalette
  map/                RelationshipMap — layered $ref wire diagram
  common/             VirtualList (windowed rendering)
src/lib/desktop/      typed Tauri IPC wrappers (web-safe guards)
src-tauri/            Rust commands: scan_workspace · read/write_file · pick_folder ·
                      index_specs · watch_workspace (notify, debounced events)
e2e/                  Playwright end-to-end specs

The undo system snapshots ContentState per edit burst; all mutations replace state immutably. Serialization walks the entity graph and emits deterministic, sorted OpenAPI 3.0/3.1 documents (Swagger 2.0 export best-effort; 2.0 import is out of scope).

About

an OpenAPI design tool

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages