Skip to main content

Crate ledgeline_shell

Crate ledgeline_shell 

Source
Expand description

The shell Ledgeline’s apps share: everything between “a router of API routes plus a built SPA” and “a hardened local server in a desktop window”.

  • security — the per-process bearer token, the Host guard, the exact-origin CORS allowlist and the security headers (CSP included), plus security::harden / security::protect, which put them on a router.
  • spa — serving an app’s RustEmbed-ed SPA same-origin, with the embedded-mode marker injected and a per-response CSP.
  • app_dirs — where an app keeps its own state (AppDirs).
  • recents — the recently-opened store, shared by every app.
  • [gui] (the gui feature) — the desktop boot pieces: the in-process server on an ephemeral port, the window, the standard menus, the wry webview with its navigation policy, and the platform glue.

The UI-preferences data model lives one layer down, in ledgeline_core::ui_prefs, because it is data, not runtime.

Nothing here knows which app it is serving: an app describes itself once with an AppIdentity and hands it to the pieces that need a name.

Re-exports§

pub use app_dirs::AppDirs;

Modules§

app_dirs
Where the APP keeps its own state — the AppDirs seam (plan 26, A2).
recents
Recently-opened journals: a tiny persistent list so the CLI can default to the last journal you used and the desktop GUI can offer a File → “Open Recent” submenu.
security
Access control and response hardening for the local HTTP server: a per-process bearer token, a Host-header guard, an exact-origin CORS allowlist, and the security headers (CSP included) every response carries.
spa
Serve an app’s built SvelteKit SPA same-origin, in-process.

Structs§

AppIdentity
Who the shell is serving: the names an app shows, logs under and hands to its SPA.