Native modular runtime architecture for iOS and macOS.
Forsetti provides module discovery, compatibility validation, entitlement-aware activation, and structured UI extensibility — built entirely on Swift and SwiftUI for native Apple integration.
import ForsettiCore
let runtime = ForsettiRuntime()
let modules = try await runtime.boot(
bundle: .main,
manifestsSubdirectory: "ForsettiManifests"
)
What Forsetti Is
A contract-first modular runtime built on strict, directional package boundaries. Modules declare capabilities through manifests and protocols, undergo compatibility validation before activation, and contribute UI through structured, host-mediated extension points — all within a native Apple runtime environment.
Contract-First
Every module declares its capabilities and requirements through explicit contracts. No implicit coupling, no hidden dependencies.
Boundary-First
Lower layers never import higher layers. Dependencies cross boundaries only through protocols, manifests, service injection, and events — and architecture tests enforce the import direction in CI.
Policy-First
Entitlement-aware activation ensures modules are only loaded when their policy requirements are met. Fine-grained control over what runs, when, and where.
Core Runtime Capabilities
Module Discovery
The runtime loads bundled JSON manifests from your app, indexes each module by ID, and records its identity for drift detection before anything activates.
Compatibility Validation
Before activation, the CompatibilityChecker validates each module against its schema and template version, supported platforms, the Forsetti version range, and the host capability policy. Incompatible modules are rejected cleanly.
Entitlement-Aware Activation
Activation is gated by entitlements. A module can carry a product ID, and the runtime checks the entitlement provider before it starts — StoreKit on iOS, static unlocks on macOS, or a custom provider.
Gated Activation
Every module passes a fixed sequence of gates — compatibility, registration, entitlement, identity, and runtime-requirement checks — before its start(context:) runs. If start fails, the runtime rolls the module back cleanly.
UI Contribution Model
UI modules publish structured contributions — toolbar items, slot-based view injections, and overlay routes. The runtime validates them against the manifest, and the host renders the approved data.
Native Host Integration
Deep integration through native Swift APIs — Swift, SwiftUI, StoreKit, and Foundation throughout, with no separate bridging runtime.
Why Forsetti Exists
Most modular architectures are loose conventions bolted onto existing frameworks. Forsetti is a purpose-built runtime that enforces modularity as a first-class concern.
Without Forsetti
- Module boundaries enforced by convention only
- Compatibility issues discovered at runtime crashes
- Feature gating through ad-hoc boolean flags
- UI composition through fragile view hierarchies
- Manual dependency wiring and initialization order
- Third-party abstractions over native platform APIs
With Forsetti
- Strict architecture boundaries enforced by the runtime
- Compatibility validation before any module activates
- Entitlement-aware activation with policy enforcement
- Structured UI contribution through defined extension points
- Automatic discovery and orchestrated activation
- Native Swift and SwiftUI throughout — no bridging layers
Deployment Patterns
Single-Module App
One app module carries the whole project. The framework boots silently in the background and the user only ever sees app-owned UI — the shape most production apps use.
Multi-Module Application
One foreground UI/app module backed by several background service modules — sync, telemetry, export — sharing the runtime. Service modules run concurrently while a single UI module stays in front.
Developer Testing
The Forsetti host shell with its module switcher, lock state, compatibility details, and error feedback. Built for development and QA while you validate manifests and entitlements.
Dashboard Deployment
A dashboard or launcher shell where users move intentionally among several independent app modules. Best for portal-style projects; a dedicated dashboard module keeps navigation project-owned.
Built For
Apple Platform Engineers
iOS and macOS developers who build with Swift, SwiftUI, and Xcode — and want modular architecture without leaving the native ecosystem.
Architecture-Focused Teams
Teams that value clean boundaries, contract enforcement, and disciplined module composition over rapid prototyping with loose conventions.
Project-Led Applications
Applications that need runtime module management — feature gating, entitlement-based unlocking, and structured UI contribution from independent components.
Documentation
Comprehensive guides covering module contracts, lifecycle management, UI contribution patterns, and host integration.
Read the DocsSource on GitHub
Forsetti is a Raven Forge Software project developed by James Daley. The source and architecture are available on GitHub for evaluation, review, and project discussion under the applicable repository terms.
View on GitHubBuild modular Apple applications with discipline.
Forsetti gives you the runtime foundation to compose, validate, and activate modules with confidence — on iOS and macOS.
