Windows Framework

Framework Architecture

A 5-stage runtime pipeline that takes modules from discovery through validation, entitlement checking, activation, and UI contribution — enforcing architecture boundaries at every step.

Pipeline

Architecture Pipeline

Every module passes through a five-stage lifecycle managed by the runtime. Each stage enforces specific contracts and constraints.

01

Discover

The runtime scans for available modules and loads their JSON manifests. Modules are cataloged with their declared capabilities, dependencies, and requirements.

02

Validate

Each module is checked against host compatibility rules, platform constraints, and dependency contracts. Incompatible or malformed modules are rejected before activation.

03

Entitle

The entitlement manager checks whether each module has the required entitlements for its declared capabilities. Access policies are enforced before any activation occurs.

04

Activate

Validated and entitled modules are activated in dependency order. The runtime manages lifecycle transitions and provides graceful error handling for activation failures.

05

Deactivate

Modules are cleanly shut down with resources released when no longer needed. The runtime manages deactivation in reverse dependency order, ensuring graceful cleanup of services and UI contributions.

Layers

Layer Architecture

The framework is organized into four distinct layers with strict one-way dependencies. Each layer has clear responsibilities and boundary constraints.

ForsettiCore

Pure C++20 with no external dependencies. Provides abstract interfaces, module lifecycle management, manifest loading and parsing, the event bus, service container, and UI surface management. This is the foundation layer that all other layers depend on.

ForsettiPlatform

Windows SDK integration layer. Provides platform service implementations including WinHTTP networking, Windows Registry storage, DPAPI encryption, and file export services. Depends on ForsettiCore only.

ForsettiHostTemplate

WinUI 3 and C++/WinRT application shell (planned Phase 4). Provides the host application template that composes modules, manages the UI surface, and orchestrates the runtime lifecycle. Depends on Core and Platform.

ForsettiModulesExample

Reference module implementations that depend on ForsettiCore only. Includes service module and UI module examples with JSON manifests demonstrating contract-first design, capability declaration, and lifecycle integration.

Principles

Design Principles

Native-First

Built entirely on C++20, Windows SDK, and WinUI 3. No cross-platform abstraction layers, no runtime bridges — pure native Windows development.

Contract-First

Every module declares its capabilities, dependencies, and requirements through explicit JSON manifests and C++ interfaces. No implicit coupling.

Boundary-First

Architecture boundaries are enforced at compile time through header visibility and at runtime through interface contracts. Modules cannot bypass boundaries.

Policy-First

Entitlement-aware activation ensures modules meet policy requirements before running. The runtime enforces access control at every lifecycle stage.

Validation-First

Modules are validated against host requirements and dependency contracts before activation. Incompatible modules are rejected cleanly with diagnostic information.

Composition-First

The host application is assembled from independent modules through runtime composition. No compile-time wiring, no monolithic builds — modules are composed at runtime.

Build System

Toolchain & Dependencies

The Windows Forsetti Framework uses modern C++ tooling with CMake presets for reproducible builds.

CMake 3.28+

Modern CMake with presets for debug, release, and test configurations. Declarative build targets with proper dependency management.

vcpkg

Package management through vcpkg with manifest mode. Dependencies declared in vcpkg.json and resolved automatically during configuration.

MSVC / C++20

Built with MSVC and full C++20 support. Uses concepts, ranges, std::format, and modern standard library features throughout the framework.

cmake --preset debug
cmake --build --preset debug
ctest --preset debug

Explore the architecture in depth.

Read the documentation for detailed guides on every framework layer, or explore the source on GitHub.