Skip to Content
DocsContributingArchitecture

Architecture

Ovra is a native macOS app: SwiftUI for the interface, AppKit for windows and system integration, WebKit (WKWebView) for pages, and SwiftData for storage.

Folders

FolderContents
AppKit/App delegate, windows, AppKit bridges, and the WKWebView coordinators (navigation, downloads, JavaScript, permissions, certificates).
View/SwiftUI views: the main window, sidebar, toolbar, start page, Settings, onboarding and What’s New.
Model/Browser (one per window) and Tab, themes, and the SwiftData models in Model/SwiftData/.
Manager/App-wide services: downloads, bookmarks, favorites, settings, search, history, .ovratheme/.ovrabackup files, profile and reset.
Helper/Small utilities, such as theme resolution and update checks.
Constant/Search engines and other constants.
Packages/ContentBlockRuleList/Local Swift package that turns the tracker blocklist into WebKit content-blocking rules.
Library/Bundled scripts injected into pages.
*.lproj/Translations.
scripts/Release tooling (release.sh).

Key pieces

  • Browser holds a window’s tabs, the active tab and window state such as whether the sidebar is shown.
  • Tab owns its WKWebView, navigation history, loading progress and per-site state.
  • Storage is a SwiftData container created in AppDelegate. Themes, the profile name and window preferences are in UserDefaults.
  • Theme resolution happens in one place, ThemeEffects, which turns the selected theme into a gradient, effects and a text colour.
  • Downloads are owned by DownloadManager, which outlives individual tabs.
  • Updates use Sparkle with an EdDSA-signed appcast.

Data flow for a page load

  1. The address bar turns input into a URL or a search with the chosen engine.
  2. The tab’s WKWebView loads it. NavigationCoordinator decides whether a response is shown or downloaded.
  3. Content-blocking rules from ContentBlockRuleList are applied before the page loads.
  4. On completion, the visit is recorded in history for address-bar suggestions.
Last updated on