# ethereum/remix-project architecture

> Architecture diagram of the GitHub repository ethereum/remix-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ethereum/remix-project
- Repository: https://github.com/ethereum/remix-project

## Overview

##### Project Type and Purpose
- This is a large Nx-powered monorepo (“remix-project”) for Ethereum smart-contract development.
- It bundles multiple React/TypeScript applications (apps/) and shared libraries (libs/) into a plugin-based IDE toolset:
- Remix Online IDE (web, browser)
- Remix Desktop IDE (Electron)
- Auxiliary front-ends (circuit-compiler, contract-verification, debugger, doc-gen, doc-viewer, quick-dapp, learneth, solhint, solidity-compiler, vyper, etc.)
- CLI tools and services (remixd file server, remix-tests, remix-debug CLI)
- E2E test harness (Nightwatch + WebDriver)

##### High-Level File Structure
- /apps – all end-user applications, each with its own React+Webpack setup
- /libs – shared modules (core engine, UI components, plugin API definitions, compilers, simulators, analyzers)
- CI & tooling – .circleci, GitHub workflows, Dockerfiles, nx.json, tsconfig.*, lerna.json
- Root scripts – build, serve, docker-compose, release management

##### Key Architectural Patterns
- Monorepo with Nx for task orchestration, dependency graph, builds and tests
- Plugin-based architecture: a “host” (IDE) loads independent plugins via a standardized plugin API (remix-api + remix-core-plugin)
- Shared services in libs: execution engine (remix-lib), compilers (remix-solidity, solc, vyper), static analysis (remix-analyzer), blockchain simulator (remix-simulator), debugger (remix-debug)
- Frontends use React + Redux and remix-ui component library; communicate with core and plugins via contexts and service clients

##### Main Components
- Monorepo & Build System
- Nx CLI / Yarn (or Lerna)
- CI/CD pipelines (CircleCI, GitHub Actions, Docker)
- Shared Libraries (libs/)
- Core engine (remix-lib)
- Plugin API (remix-api)
- Core plugin logic (remix-core-plugin)
- UI component library (remix-ui)
- Compiler wrappers (remix-solidity, solidity-compiler, vyper)
- Simulator and debugger (remix-simulator, remix-debug)
- Analyzer (remix-analyzer)
- Applications (apps/)
- Browser IDE (apps/remix-ide)
- Desktop IDE (apps/remixdesktop – Electron main + preload + plugins)
- Other plugin‐demo frontends (e.g., circuit-compiler, contract-verification, debugger UI)
- File-server daemon (apps/remixd)
- E2E Test Runner (apps/remix-ide-e2e)
- External Services
- Ethereum JSON-RPC endpoints (Infura, Alchemy, Ganache, Hardhat node)
- IPFS / Swarm (publish-to-storage plugin)
- GitHub / dGit for file storage
- Inference server (for AI plugin)

##### Relationships & Data Flows
- Developer or user ↔ Browser IDE ↔ Plugin Engine ↔ Plugins ↔ Core Libraries ↔ External Services
- Desktop IDE wraps the same browser IDE + Electron IPC to local file system / native executables (circom, hardhat)
- remixd runs a local WebSocket service to expose file system to the browser IDE
- CI/CD builds libraries → bundles → publishes Docker images / web artifacts / desktop releases
- E2E harness drives the Browser IDE via WebDriver, tests across hosted builds or local serve

##### Essential Elements
- A title and version footer (“Remix Project Architecture v1.0”, date)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% CI/CD & Build System
    subgraph "CI/CD & Build System"
        NxCLI["Nx CLI\n(root)"]:::build_ci
        Lerna["Lerna\n(root)"]:::build_ci
        PackageJSON["package.json\n(root)"]:::build_ci
        CircleCI["CircleCI\n(.circleci/config.yml)"]:::build_ci
        GitHubActions["GitHub Actions\n(.github/workflows/)"]:::build_ci
    end

    %% Shared Libraries
    subgraph "Shared Libraries"
        coreEngine["remix-lib\n(libs/remix-lib/)"]:::shared_lib
        pluginAPI["remix-api\n(libs/remix-api/)"]:::shared_lib
        corePlugin["remix-core-plugin\n(libs/remix-core-plugin/)"]:::shared_lib
        uiLib["remix-ui\n(libs/remix-ui/)"]:::shared_lib
        solWrap["remix-solidity\n(libs/remix-solidity/)"]:::shared_lib
        simulator["remix-simulator\n(libs/remix-simulator/)"]:::shared_lib
        debugEngine["remix-debug\n(libs/remix-debug/)"]:::shared_lib
        analyzer["remix-analyzer\n(libs/remix-analyzer/)"]:::shared_lib
        testsLib["remix-tests\n(libs/remix-tests/)"]:::shared_lib
        fileServerLib["remixd\n(libs/remixd/)"]:::shared_lib
    end

    %% Host Applications
    subgraph "Host Applications"
        browserIDE["Browser IDE\n(React, TypeScript)\napps/remix-ide/"]:::host_app
        desktopIDE["Desktop IDE\n(Electron)\napps/remixdesktop/"]:::host_app
        circuit["Circuit Compiler UI\napps/circuit-compiler/"]:::host_app
        contractVerif["Contract Verification UI\napps/contract-verification/"]:::host_app
        debuggerUI["Debugger UI\napps/debugger/"]:::host_app
        docGen["Documentation Generator\napps/doc-gen/"]:::host_app
        docViewer["Documentation Viewer\napps/doc-viewer/"]:::host_app
        quickDapp["Quick DApp UI\napps/quick-dapp/"]:::host_app
        learnEth["Learn-Eth Tutorial\napps/learneth/"]:::host_app
        solhint["Solhint Plugin UI\napps/solhint/"]:::host_app
        solidityCompilerUI["Solidity Compiler UI\napps/solidity-compiler/"]:::host_app
        vyperUI["Vyper Compiler UI\napps/vyper/"]:::host_app
        noirUI["Noir Compiler UI\napps/noir-compiler/"]:::host_app
        universalDapp["Universal DApp\napps/remix-dapp/"]:::host_app
        e2e["E2E Test Runner\napps/remix-ide-e2e/"]:::host_app
    end

    %% CLI Tools & Services
    subgraph "CLI Tools & Services"
        remixdService["remixd File Server\n(libs/remixd/)"]:::service
        remixTestsCLI["remix-tests CLI\n(libs/remix-tests/)"]:::service
        remixDebugCLI["remix-debug CLI\n(libs/remix-debug/bin/)"]:::service
    end

    %% External Services
    subgraph "External Services"
        ethRPC["Ethereum JSON-RPC\n(Infura/Alchemy/Ganache/Hardhat)"]:::external
        ipfs["IPFS/Swarm"]:::external
        gitStorage["GitHub/dGit"]:::external
        inference["Inference Server"]:::external
    end

    %% Build Dependencies
    NxCLI -->|orchestrates builds| coreEngine
    NxCLI -->|orchestrates builds| pluginAPI
    NxCLI -->|orchestrates builds| corePlugin
    NxCLI -->|orchestrates builds| uiLib
    NxCLI -->|orchestrates builds| solWrap
    NxCLI -->|orchestrates builds| simulator
    NxCLI -->|orchestrates builds| debugEngine
    NxCLI -->|orchestrates builds| analyzer
    NxCLI -->|orchestrates builds| testsLib
    NxCLI -->|orchestrates builds| fileServerLib
    CircleCI -->|CI pipelines| NxCLI
    GitHubActions -->|CI pipelines| NxCLI

    %% Runtime Interactions
    browserIDE -->|"Plugin API"| pluginAPI
    browserIDE -->|"Plugin API"| corePlugin
    pluginAPI -->|"loads plugins"| corePlugin
    corePlugin -->|"uses core engine"| coreEngine
    coreEngine -->|"calls compiler"| solWrap
    coreEngine -->|"runs simulation"| simulator
    coreEngine -->|"runs debugger"| debugEngine
    coreEngine -->|"runs analysis"| analyzer
    solWrap -->|"JSON-RPC"| ethRPC
    simulator -->|"JSON-RPC"| ethRPC
    browserIDE -->|"WebSocket"| remixdService
    desktopIDE -->|"Electron IPC"| browserIDE
    desktopIDE -->|"Electron IPC"| remixdService
    e2e -->|"WebDriver"| browserIDE

    %% Click Events
    click NxCLI "https://github.com/ethereum/remix-project/blob/master/nx.json"
    click Lerna "https://github.com/ethereum/remix-project/blob/master/lerna.json"
    click PackageJSON "https://github.com/ethereum/remix-project/blob/master/package.json"
    click CircleCI "https://github.com/ethereum/remix-project/blob/master/.circleci/config.yml"
    click GitHubActions "https://github.com/ethereum/remix-project/tree/master/.github/workflows/"
    click coreEngine "https://github.com/ethereum/remix-project/tree/master/libs/remix-lib/"
    click pluginAPI "https://github.com/ethereum/remix-project/tree/master/libs/remix-api/"
    click corePlugin "https://github.com/ethereum/remix-project/tree/master/libs/remix-core-plugin/"
    click uiLib "https://github.com/ethereum/remix-project/tree/master/libs/remix-ui/"
    click solWrap "https://github.com/ethereum/remix-project/tree/master/libs/remix-solidity/"
    click simulator "https://github.com/ethereum/remix-project/tree/master/libs/remix-simulator/"
    click debugEngine "https://github.com/ethereum/remix-project/tree/master/libs/remix-debug/"
    click analyzer "https://github.com/ethereum/remix-project/tree/master/libs/remix-analyzer/"
    click testsLib "https://github.com/ethereum/remix-project/tree/master/libs/remix-tests/"
    click fileServerLib "https://github.com/ethereum/remix-project/tree/master/libs/remixd/"
    click browserIDE "https://github.com/ethereum/remix-project/tree/master/apps/remix-ide/"
    click desktopIDE "https://github.com/ethereum/remix-project/tree/master/apps/remixdesktop/"
    click circuit "https://github.com/ethereum/remix-project/tree/master/apps/circuit-compiler/"
    click contractVerif "https://github.com/ethereum/remix-project/tree/master/apps/contract-verification/"
    click debuggerUI "https://github.com/ethereum/remix-project/tree/master/apps/debugger/"
    click docGen "https://github.com/ethereum/remix-project/tree/master/apps/doc-gen/"
    click docViewer "https://github.com/ethereum/remix-project/tree/master/apps/doc-viewer/"
    click quickDapp "https://github.com/ethereum/remix-project/tree/master/apps/quick-dapp/"
    click learnEth "https://github.com/ethereum/remix-project/tree/master/apps/learneth/"
    click solhint "https://github.com/ethereum/remix-project/tree/master/apps/solhint/"
    click solidityCompilerUI "https://github.com/ethereum/remix-project/tree/master/apps/solidity-compiler/"
    click vyperUI "https://github.com/ethereum/remix-project/tree/master/apps/vyper/"
    click noirUI "https://github.com/ethereum/remix-project/tree/master/apps/noir-compiler/"
    click universalDapp "https://github.com/ethereum/remix-project/tree/master/apps/remix-dapp/"
    click e2e "https://github.com/ethereum/remix-project/tree/master/apps/remix-ide-e2e/"
    click remixdService "https://github.com/ethereum/remix-project/tree/master/libs/remixd/"
    click remixTestsCLI "https://github.com/ethereum/remix-project/tree/master/libs/remix-tests/"
    click remixDebugCLI "https://github.com/ethereum/remix-project/tree/master/libs/remix-debug/bin/"

    %% Styles
    classDef build_ci fill:#fde4c2,stroke:#f29e4c
    classDef shared_lib fill:#d2e5fd,stroke:#4a90e2
    classDef host_app fill:#d8f3d8,stroke:#6bbf6b
    classDef service fill:#fff4c2,stroke:#f2d94c
    classDef external fill:#eeeeee,stroke:#999999
```
