System Design Space
Knowledge graphSettings

Updated: March 2, 2026 at 6:46 PM

Dyad: local AI app builder architecture

mid

Analysis of the Dyad architecture: multi-process Electron, agent+tool orchestration, template-driven development and local-first approach with a checkpoint model.

Source

Dyad repository

An open repository of local AI app builder with architectural notes and documentation.

Open repository

Dyad - local AI app builder in desktop application format. From an architectural point of view, it is interesting due to its combination of local-first approach, agent-based orchestration and template design: the developer manages the intent, and the platform takes care of the systemic execution of changes and checks.

This chapter is compiled from public materials and architectural notes from the team, with a focus on engineering patterns that are useful to transfer to other AI-assisted platforms.

Dyad Architectural Patterns

Electron multi-process

Main process manages OS functions, files and integrations; The renderer process is responsible for the UI in React.

  • Isolation of responsibility between the system layer and the interface.
  • IPC events as a communication bus between processes.

Agent + Tool orchestration

LLM not only generates code, but also structured tool calls that Dyad interprets and applies.

  • ReAct pattern: reasoning + action in one cycle.
  • Controlled execution of model actions through a limited set of tools.

Local-first execution

Code and working artifacts remain on the user's machine, which reduces latency and simplifies privacy.

  • There is no mandatory cloud-runtime for the core of the product.
  • Easier to integrate into existing developer and IDE workflow.

Template + Rules

Project templates and AI_RULES.md define the code generation framework and technological limitations.

  • Quick start through a scaffold, not from a blank sheet.
  • Generation policies are set declaratively at the template level.

Versioned checkpoints

Changes in the code and database can be rolled back through the checkpoint approach (including through branching for Postgres).

  • Undo/redo becomes an infrastructure capability rather than a manual procedure.
  • Experimenting with AI changes becomes safer.

Application architecture visualization

Local-first execution pathintentvalidated IPCtool commandspatch + checksprovider callsresponsesRenderer UIReact + chat + previewPreload + IPC Bridgesecure message boundaryMain Process Orchestratorworkflow coordinationTool Executorpatch/apply/checkpointWorkspace + Git Statefiles, templates, rulesLLM / Data Integrationsproviders + external APIs

Layer purpose

The UI layer accepts user intent and shows diffs and change results without direct access to system APIs.

Operational focus

Keep interface response fast and avoid blocking the UI with long-running operations.

Typical pitfall

Mixing UI logic with file operations and provider network calls.

Key repository modules

Core app

src + worker + preload: UI, main-process and background tasks (for example, heavy checks/builds).

Reusable packages

packages/@dyad-sh: Reusable SDKs/utilities for AI providers, common types, and integrations.

Scaffold and templates

scaffold + templates: starting application structures with generation rules (AI_RULES.md).

Quality and delivery

testing + e2e-tests + scripts: unit/integration/e2e checks, assembly via Electron Forge, CI automation.

How is the change going at Dyad?

Dyad change flow

From user intent to checkpoint and controlled rollback
Intent
Planning
Execution
Safety
01

Prompt and intent

The user describes a change: a new feature, UI update, or logic adjustment.

02

Context gathering

Dyad picks relevant project files, templates, and generation rules.

03

Agent plan + tool calls

The LLM builds a plan and returns structured tool calls for the platform.

04

Apply changes

The main process executes actions: patches, checks, and preview updates.

05

Checkpoint and rollback

State is saved as a checkpoint so regressions can be safely rolled back.

Click "Run" to walk through the full Dyad change cycle step by step.

Engineering Strengths

  • Local-first execution with minimal vendor lock-in according to the project.
  • Explicit tool boundaries reduce the chaotic execution of actions by the model.
  • The template-driven approach speeds up the start and increases the repeatability of generation.

Assembly, tests and quality

  • Electron Forge + Vite for local development and packaging of desktop assemblies.
  • Playwright for e2e, Vitest for unit/integration tests.
  • Husky and lint-staged for pre-commit style and quality checks.
  • Separating OSS and Pro modules reduces the risk of license confusion.

Practical checklist

  • Fix boundaries between UI, agent orchestration, and FS operations before adding new tools.
  • Design rollback/checkpoint first, and only then expand the automation of agent actions.
  • Keep templates and AI_RULES in the same lifecycle with the product: template version = generation expectations version.
  • Cover the entire prompt -> patch -> preview path with e2e scripts for critical user scenarios.
  • For Pro/OSS modules, maintain a strict integration contract so as not to break the open-source kernel.

Materials and related chapters

Enable tracking in Settings

System Design Space

© 2026 Alexander Polomodov