Overview
The Allternit Office Suite is a family of document surfaces built on the@allternit/office-* engine and editor packages. Every editor runs inside the platform shell as a first-class ACI view, delivered to the desktop app’s main window for “Open with” workflows, and inside the iOS read-only viewer. A single artifact contract stores the real file bytes, so the same .docx, .xlsx, .pptx, or .pdf can move between web, desktop, and mobile without conversion.
Allternit Docs
OpenXML word-processing editor (.docx) with byte-preserving save and a web-worker round-trip pipeline.
Allternit Sheets
OpenXML spreadsheet editor (.xlsx) with server-side IronCalc recalculation through the office engine.
Allternit Slides
OpenXML presentation editor (.pptx) with engine patch-save and web-worker round-trip.
Allternit PDF
PDF viewer built on pdf.js with page navigation, zoom, text extraction, and a handoff to Allternit Sign.
Allternit Sign
Native, client-side PDF signing — add signers, place fields, draw or type signatures, and download the signed document.
/office, same window pattern as /design). The ACI Extensions tab (browser-extensions view) hosts only the extensions manager; the suite itself was extracted from it into the office window.
The free, no-account site at office.allternit.com is a different thing: the app’s artifact editors (Docs, Sheets, Slides, PDF, Design, Motion, Image, Video) running on files kept in the browser, with no AI. See Allternit Office (office.allternit.com).
Routes and shell view types
Each route is optional-
artifactId, so /docs opens a blank document and /docs/art_018f3a7c... loads that artifact directly.
Artifact section kinds
Every editor persists (or reads) the same artifact payload, regardless of whether it is opened from the shell, a desktop window, or the iOS viewer.Legacy section kinds such as
docs-editor/<block>, sheets-editor/sheet, slides-editor/slide, and pdf-viewer/page are upgraded on load where needed; new saves write the binary/plaintext pair above.Desktop integration
On the Electron desktop app (surfaces/allternit-desktop), the suite follows a shell-first, single-window model. Docs, Sheets, Slides, and PDF always open as ACI shell views in the app’s main window, using the same docs/sheets/slides/pdf view types as the web platform. The suite launcher itself lives in the popped-out Allternit Office window — the ACI rail’s bottom tab (it replaces the Design button in ACI mode) — which reuses the single OfficeSuiteSection component to launch in-shell editors.
“Open with Allternit” file associations route into the same main window — there are no separate per-program office windows. The desktop registers fileAssociations for .docx, .xlsx, .pptx, and .pdf; macOS open-file, Windows second-instance, cold-start argv, the app menu, and shell:open-office IPC are all routed through the main window over the office:open-file / office:open-target preload channels (queued until the window has loaded). The platform’s desktop-bridge.ts stashes file bytes in the one-shot file handoff and opens the editor as an in-shell view, falling back to the editor route when the shell isn’t mounted.
Because the same artifact section contract drives routes, shell views, desktop windows, and mobile, a document saved on the web opens byte-for-byte identically on desktop and iOS.
iOS read-only viewer
Editing on iOS is deferred until the web editor fully stabilizes; the current mobile surface is a read-only viewer. The iOS feature lives insurfaces/allternit-mobile/ios/Features/Office/ and includes:
OfficeDocumentsView— your Docs, Sheets, Slides and PDFs from Artifacts v2, presented from the Artifacts library toolbar, with Sign PDF.OfficeArtifactClientandOfficeDocumentView— native read-only rendering of a record in the sectioned artifact service (doc blocks, slide cards, sheet TSV grid, and PDF pages). An Office artifact copied into Artifacts v2 from that store opens it through Open in editor (itsorigin.legacy_id).OfficeEditorWebView—WKWebViewto the platform editor route. The first navigation carries the Bearer, and a document-start script signs the page’s ownfetchand XHR calls to its origin and the cloud API with a token it asks the app for, so the editor’s API calls are authenticated too.
-open-office-documents and -open-office-document-id <id> regression arguments. The flow is verified end-to-end in the iPhone simulator: a live artifact from the gateway is listed, and the native read-only view renders its heading and paragraphs.
Office AI assistant
The suite includes an Allternit-backed AI assistant via the@allternit/office-ai package. It replaces the upstream editor’s chat transport with one that streams from the platform’s own agent runtime:
streamOfficeAi()POSTs/api/agent-chatand normalizes the platform SSE{chunk_type, chunk}stream intodelta,tool-call,tool-result,done, anderrorchunks.OfficeAgentLoopexposes the sameAgentLoopinterface (busy,run,cancel,reset,restore, and the usual events) so the vendored AI panels work unchanged.- The Docs editor uses a real
AiPanel.tsximplementation that streams document blocks as context. Sheets, Slides, and PDF re-export the loop through their agent stubs so their existing panels connect immediately. - A settings gate returns provider
allternitwith a platform-managed key, satisfying the panel’s configuration check without shipping real credentials to the client.
surfaces/ai.allternit.com/tests/office-ai.spec.ts streams answers into all four editor assistant panels from a mocked SSE endpoint.
Opening editors from code
Shell view registry
Inside the platform shell, use the registry’sopen helper with a view type and optional context:
File handoff
For files that do not already live as artifacts, stash the bytes and pass the handoff ID:stashFile/takeFile one-shot handoff, so desktop file associations and the Open a file button flow through the exact same path.
Direct route navigation
If you are outside the shell (for example, in a standalone page or a test), navigate to the route directly:/office is the popped-out Allternit Office window’s content route (the ACI rail’s bottom tab) — on the desktop, open it via the rail entry or the app menu’s Allternit Office item rather than navigating directly.