(AI generated. Not reviewed.)
Frontend Key Files
Last Updated: 2026-05-24
A navigation map of the SwiftUI app (fichero/fichero/). Line counts are approximate and only noted where a file is large enough to be worth splitting attention. Use jCodemunch (search_symbols, get_file_outline) to locate exact symbols rather than grepping.
Entry Points
FicheroApp.swift(repo root of the app target) —@mainApp, command menus, window/scene setup.App/— app-lifecycle and window scaffolding:AppState.swift— global@Observable/ObservableObjectapp state.ViewSettings.swift— layout/view preferences.LibraryWindow.swift— per-library window scene.WelcomeView.swift— first-run / welcome surface.AppInstaller.swift,SparkleUpdater.swift— install + Sparkle auto-update.Views/Shell/ContentView/ContentView.swift+ extensions — the main resizable multi-pane layout, split across:ContentView+State.swift,+ViewBuilders.swift,+Navigation.swift,+Actions.swift,+Persistence.swift, andContentViewModifiers.swift.Views/Shell/DocumentTabView.swift— per-window entry point, service initialization.
Layout
The window is a resizable multi-pane reading layout (not a fixed three-column split):
sidebar · document list · content/PDF reading view · tabbed inspector. Pane widths persist
via @SceneStorage. The reading layout and page navigation live in
ContentView+ViewBuilders.swift and Views/Library/PDFThumbnailView.swift.
Views (Views/, ~234 files across ~19 feature domains)
Library (Views/Library/) — document browser, preview, inspector
Views/Inspector/— inspector V2. The top-level folders ARE the fourInspectorSections;Document/DocumentInspector.swiftis the host/dispatcher:Source/—DocumentInspectorInfoTab.swift(+Info/),DocumentInspectorMetadataTab.swift,DocumentInspectorContentV2.swiftArtifacts/—ArtifactPanel*,ArtifactsInspectorPane.swift, list/detail viewsKnowledge/—Entities/,KnowledgeGraph/,Citations/,EntityKindRow.swift,EntityDigestView.swift,KnowledgeGraph{Models,Support}.swift(perInspectorSection: entities + KG + citations)Notes/—Annotations/,NotesInspectorPane.swift,NoteDetailView.swift,DocumentNotesTab.swift,DocumentInspectorAnnotationsTab.swift,DocumentInterpretations{Tab,Section}.swift(perInspectorSection: notes + annotations + interpretations)AttributedTextEditor.swift— rich-text editor (NSViewRepresentable)PDFThumbnailView.swift(~850 lines) — PDF rendering, page thumbnails, reading-view plumbing (PDFKit bridge)LibraryView.swift+ extensions (+DisplayModes,+ColumnConfig,+Sorting,+FilterAndBatch,+InlineEditing,+KeyboardShortcuts) andLibraryViewComponents.swift— grid/list/table browserEditorView.swift(~360 lines) — document editor surfaceImageViewer/,ImageViewerComponents.swift,MagnifierPanel.swift,ScrollWheelZoom.swift— image preview + magnifier (AppKit bridges)QuickLookComponents.swift,FolderAccessManager.swift— Quick Look + security-scoped bookmark accessFolderContentsGrid.swift,NavigatorMiniMap.swift
Sidebar (Views/Sidebar/) — multi-mode navigation
SidebarView+ViewComponents.swift(~760 lines),SidebarItemRow.swift(~680),SidebarItemRow+DropHandlers.swift,SidebarViewExtensions.swift- Modes: Library, Search, Chat, Workflows, Activity, Automation, Batches
Workflow (Views/Workflow/) — visual LangGraph editor
WorkflowLibraryView.swift(~550),WorkflowCanvasView.swift(~430),WorkflowEdgeView.swift,WorkflowNodeView.swift, port/output views
KnowledgeGraph (Views/KnowledgeGraph/)
EntityDigestView.swift— KG entity/claim digests; backing for inspector KG tab and graph views
Other domains
Chat/, Library/Search/, Activity/, Settings/AI/AIProviders/, Library/Automation/, Agents/, Integrations/,
Settings/MCP/, Chat/ModelComparison/, Settings/, Sheets/, Shell/Menu/, Components/, Library/Actions/.
Services (Services/, ~49 files)
Generated (14 *Generated.swift — wrap the OpenAPI client, typed methods)
Activity, Artifact, Automation, Batch, Chat, Conversation, Document, Import,
Model, Provider, SavedSearch, Search, Storage, Workflow — all …ServiceGenerated.swift.
Do not hand-edit the generated OpenAPI client under fichero-api-client/Sources/…; the
*Generated.swift wrappers, despite the suffix, ARE hand-written and editable.
Hand-written services / wrappers
APIClient.swift(~450) — HTTP client,X-Fichero-Library-Pathinjection,addEngineAuthshared-secretEmbeddedBackendService.swift— engine process lifecycleWorkflowStreamService.swift,WorkflowExecutionService.swift— SSE workflow executionMCPService.swift,ActionsService.swift,ActionLibraryService.swift,IntegrationsService.swift,ModelComparisonService.swift,PerformanceService.swift,AppleScriptCommands.swiftProviderServicewrapsProviderServiceGenerated(validation/business logic pattern)
Models (Models/, ~42 files)
Document.swift(~390) — core model:DocType,FileType,StatusDocumentStore.swift+DocumentStore+CRUD.swift++Helpers.swift— document hierarchy, CRUD, importLibraryManager.swift+LibraryManager+Operations.swift— multi-library orchestrationWorkflowStore.swift(~510),WorkflowTypes.swift,WorkflowToolTypes.swift,WorkflowChain.swiftSidebarItem.swift,SidebarItemBuilder.swift,ItemTypeRegistry.swift— sidebar data model (ids are type-prefixed, e.g.doc:UUID)FicheroDocument.swift— per-window document stateFeatureManager.swift— feature flags / tier gating in the UIMCPServer.swift,Trace.swift,Run.swift
Generated API client (fichero-api-client/)
Local Swift package generated by Apple’s Swift OpenAPI Generator from
fichero-server/tests/contracts/openapi.json. Regenerate via
fichero-server/scripts/sync_openapi_schema.sh. See api_client.md.
Notes for navigation
- New
.swiftfiles in theFicheromain target must be registered withruby scripts/add-swift-file.rb <path>— a file on disk is invisible to the compiler until then. - Prefer jCodemunch tools (
search_symbols,get_file_outline,find_references) overfind/grep.