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
| Folder | Contents |
|---|---|
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
Browserholds a window’s tabs, the active tab and window state such as whether the sidebar is shown.Tabowns itsWKWebView, navigation history, loading progress and per-site state.- Storage is a SwiftData container created in
AppDelegate. Themes, the profile name and window preferences are inUserDefaults. - 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
- The address bar turns input into a URL or a search with the chosen engine.
- The tab’s
WKWebViewloads it.NavigationCoordinatordecides whether a response is shown or downloaded. - Content-blocking rules from
ContentBlockRuleListare applied before the page loads. - On completion, the visit is recorded in history for address-bar suggestions.
Last updated on