Back to projects

Desktop + licensing system

DRIFTR

A .NET 8 WPF desktop application for isolated browser sessions, backed by a FastAPI licensing service with device-aware authentication.

Timeline
Oct 2026 — Present
Status
In development
Core stack
C# · .NET 8 · WPF · WebView2 · Python · FastAPI · SQLAlchemy · Alembic
DRIFTR desktop application with four isolated browser sessions arranged in QUAD layout
DRIFTR QUAD layout — actual desktop application screenshot, already published on the DRIFTR website.
290Tested

Desktop assertions passed

Current .NET validation executable · audited Nov 20, 2026

410Tested

Licensing tests passed

Clean service worktree · 16 test-database-gated skips

63Tested

Focused auth cases passed

Subset of the 410-test licensing total

10+

People over one month

Reported project usage over a one-month period

The focused authentication result is part of the licensing total. Usage describes a project-reported audience, not an audited active-license count. No multi-hour stress result is claimed.

Problem

DRIFTR gives one Windows desktop application control over one to four independent browser sessions without blending their cookies, storage, identity, or account state. That desktop experience must remain responsive while licensing decisions stay server-authoritative. The application has had more than 10 users over a one-month period. This is a reported usage figure rather than an independent production-analytics audit.

Responsibilities

The system combines a C#/.NET 8 WPF client using WebView2 with a Python/FastAPI licensing service using SQLAlchemy and Alembic.

  • Maintain independent profiles through SOLO, DUO, QUAD, three-session, pop-out, and dock/restore flows.
  • Implement server-authoritative entitlements, one-device enforcement, and rotating refresh sessions.
  • Protect local session material with Windows DPAPI and make schema changes explicit through migrations.

Architecture and decisions

Each entitled account maps to a stable WebView2 profile directory. Layout changes reposition existing controls instead of recreating browsers, preserving session identity as windows move between docked and detached states. The licensing service issues short-lived access tokens and rotating refresh tokens; the desktop client stores the session as one DPAPI-protected unit and replaces it atomically so access and refresh state cannot drift apart.

Implementation

SOLO, DUO, QUAD, and three-session policies calculate placement independently from profile ownership. Saved account selections, Duo orientation, detached-window state, and visible bounds are restored only when allowed by the current entitlement. A Pro-to-Free change retires extra sessions from the active UI without deleting their profile data. Legacy profile migration copies compatible browser state once, preserves existing DRIFTR data, and excludes licensing credentials.

Testing methodology

The desktop validation executable runs against temporary roots and mocked HTTP handlers; its November 20, 2026 run passed 290 runtime assertions covering layouts, transitions, profile identity, persistence, migration, DPAPI storage, refresh coordination, logout, deactivation, downgrade behavior, and checkout failure handling. The licensing service passed 410 pytest cases with 16 PostgreSQL integration cases skipped because no authorized test database was supplied. A focused authentication/licensing selection passed 63 cases within that 410-test total.

Challenges and lessons

The difficult boundary is continuity without privilege drift: a browser session should survive layout changes, but authorization changes must take effect immediately. Stable profile mapping, server validation, atomic local persistence, single-flight refresh, bounded retry, and refresh-token reuse protection address different sides of that boundary. The repository includes a diagnostic harness, but retained evidence does not support an hours-long stress-test claim.

Validation evidence · audited Nov 20, 2026

Measured, scoped, reproducible.

The current desktop suite passed 290 runtime assertions, and the clean licensing service passed 410 tests with 16 authorized-test-database cases skipped. The previous historical assertion lead was not reproducible and has been removed. The project timeline begins in October, with early repository work in late September and a substantive desktop baseline in early October.

View public GitHub profile

Continue exploring

All case studies