Skip to content
Historical revision — this record as it stood on 2 July 2026, not the current version. View the current record →

Browser developer workbench

app-privategit-workbench is a browser-based file editor included in the os-privategit host operating system. It presents a local HTTP endpoint that serves a single-page application with a three-column layout: a file tree sidebar, a content viewer, and a plain-text editor.

The workbench is the primary authoring and review surface for Totebox Orchestration operators and Community Members who want direct browser-based access to their archive tree without a terminal session. It is not a publication surface — it writes to the local filesystem and relies on the git-based version-control pipeline for history and promotion.


Architecture

The workbench is a single Rust crate (app-privategit-workbench, Apache 2.0) in the pointsav-monorepo. It has two components:

Write-service (Rust/axum): An HTTP server that handles file reads and writes. It binds to a loopback address and is never exposed directly to external networks. The service enforces root containment (all paths are canonicalized and checked against declared roots), an extension allowlist, and mtime-based conflict detection.

Single-page application: A self-contained HTML file embedded into the binary at compile time via include_str!. The SPA makes API calls through an nginx proxy to the write-service for file reads and writes, and to nginx autoindex routes for directory listings. No external resources are loaded at runtime.

The binary is compiled for the os-privategit host and managed by a systemd unit. The nginx intranet routes /_api/edit/* to the write-service and serves autoindex JSON at /_api/command/, /_api/clones/, and per-sandbox prefixes.


File tree

The sidebar lists the roots declared in config.toml. Each root maps a URL prefix (for example, _clones/project-development) to a filesystem path (for example, /srv/foundry/clones/project-development). Roots may be writable or read-only. The Command workspace root (/srv/foundry) is always read-only; archive roots are writable.

Directory contents are fetched on expand from nginx autoindex JSON. The tree supports nested expansion to arbitrary depth.


Viewer

The centre column renders the selected file according to its extension:

  • Markdown (.md): Rendered as HTML using a built-in parser. Fenced code blocks, inline code, headings, lists, links, and tables are supported. Click-to-source from rendered headings and paragraphs moves the editor cursor to the corresponding source line.
  • HTML (.html): Displayed in a sandboxed iframe.
  • Images: Displayed inline.
  • All other types: Displayed as plain text.

The viewer and editor operate independently. Opening a read-only file shows the viewer without the editor panel.


Editor

The right column appears when the open file is in a writable root. The editor is a <textarea> with the following features:

  • Line number gutter with active-line highlight
  • Cursor position indicator (line and column) in the editor bar
  • Dirty state indicator (orange dot) when unsaved changes are present
  • Save: Cmd+S or the Save button — writes via PUT /file with the current mtime to detect concurrent edits; shows a conflict dialog on HTTP 409
  • Find / Replace bar (Cmd+F): incremental match highlighting, previous / next navigation, Replace and Replace All; preserves native undo stack via execCommand
  • Document Outline panel (Cmd+Shift+O): lists all markdown headings (H1–H6) or TOML table headers from the current file; filter by typing; click or press Enter to jump the cursor to that symbol
  • Toggle line comment button: extension-aware (// for Rust/JS/TS, # for TOML/YAML/shell); toggles selected lines
  • Go to line (Ctrl+G)
  • Tab inserts two spaces
  • Bracket auto-close for {, [, (
  • Line move up / down (Alt+↑ / Alt+↓)
  • Line duplicate (Shift+Alt+↓)

Security model

The write-service enforces four layers of containment aligned with the pre-commit defence-in-depth approach used across the platform:

Root containment: Every path is canonicalized with std::fs::canonicalize and verified to remain within the declared root's filesystem path. Paths that resolve outside the root are rejected with HTTP 400.

CSRF guard: Every PUT /file request requires the X-Foundry-Editor: 1 header. The browser's cross-origin policy prevents third-party pages from adding this header.

Extension allowlist: Writes are permitted only for recognized plain-text and source-code extensions. Binary formats and unknown extensions are read-only through the workbench.

Writable flag: The writable = false declaration in a root entry causes all write attempts to that root to be rejected with HTTP 403, regardless of filesystem permissions.

The systemd unit runs with ProtectSystem=strict and ReadWritePaths= scoped to the declared writable roots. Adding a new writable root requires updating both config.toml and the systemd service file; missing the service file update causes silent write failures at the filesystem layer.


Relationship to os-privategit

app-privategit-workbench is included in the os-privategit host operating system alongside app-privategit-design-system and service-privategit. It is the authoring surface for operators who use the privategit tier — a locally-hosted, network-isolated development environment for Totebox Orchestration instances. Access to writable roots is governed by the machine-based authorization model.

The crate is licensed under the Apache License, Version 2.0 and intended for downstream deployment in customer-tier instances of os-privategit. An operational setup guide is available in the customer fleet deployment catalog.


Planned additions

  • Phase 4 (planned/intended): CodeMirror 6 integration for syntax highlighting; authenticated roots with per-user writable scope.

See also

Important Information

Important Information

Corporate structure. PointSav Digital Systems ("PointSav") is a trade name of Woodfine Capital Projects Inc. ("Woodfine"). PointSav does not itself offer, sell, or solicit any security. Any securities offering associated with Woodfine's real-property direct-hold solutions is made exclusively by Woodfine, and only by means of the applicable Private Placement Memorandum.

No investment advice. This wiki's content is provided for engineering, operational, research, and development purposes. Nothing on this wiki constitutes investment advice or a solicitation to invest in any Woodfine partnership or direct-hold solution.

Intellectual property. The PointSav name, trade name, wordmark, and marks, together with all current and future PointSav- and Totebox-branded products, services, and offerings — and the software, source code, documentation, design system, and all related materials — are proprietary to Woodfine and its affiliates, except for components identified as open source. No rights are granted except as expressly set out in a written license or agreement. See TRADEMARK.md in this repository for the full trademark notice.

Open source components. Portions of the platform are made available under permissive open-source licenses identified in the accompanying repository. Use of those components is governed by their respective license terms.

No warranty; informational use. Content on this wiki is provided for general informational purposes only and does not constitute a representation, warranty, or commitment with respect to product functionality, availability, pricing, or roadmap. Some articles describe planned or intended features, capabilities, and milestones — language such as "planned," "intended," "targeted," "may," and "expected" marks this forward-looking content, which is subject to change and does not constitute a commitment regarding future performance.

Confidentiality. Where an article describes an operational or deployment detail that is not intended for public disclosure, that article is not published on this wiki. Content here is general-purpose engineering documentation, not customer-specific configuration.

Jurisdiction. Woodfine Capital Projects Inc. is organized in British Columbia, Canada. References to the Sovereign Data Foundation on this wiki describe a planned or intended initiative only, not a current equity holder or active governance body.

Changes to this notice. PointSav may update this notice from time to time; the version posted on this page governs.

Not a filing system. This wiki is not a securities filing system, an electronic disclosure repository, or a substitute for SEDAR+ or any other regulatory filing system. Formal securities filings are made through the applicable regulatory filing system, not through this wiki.

Full disclaimer. This notice supplements, and does not replace, the full Disclaimers article. In the event of any conflict, the full Disclaimers article governs.

Read the full disclaimer →