# smtdfc/rumious architecture

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

- Interactive diagram: https://gitdiagram.com/smtdfc/rumious
- Repository: https://github.com/smtdfc/rumious

## Overview

##### Project type and purpose
- This is a monorepo for “Rumious,” a frontend framework based on Web Components.
- It contains:
- The core runtime (`packages/core`)
- A browser adapter (`packages/browser`)
- A CLI tool (`packages/cli`)
- A compiler library (`packages/compiler`)
- Configuration helpers (`packages/config`)
- Bundler plugins for Rollup (`packages/rollup-plugin`) and Webpack (`packages/webpack-loader`)
- A router library (`packages/router`)

##### File structure
- Top-level config: `.github/`, CI workflows, lint and formatting configs, root `package.json` & scripts.
- `packages/`: each subfolder is an independently versioned package with its own build config (Rollup), source (`src/`), types, README, and TS configs.
- `docs/`: markdown files describing framework concepts (app, component, directives, state, JSX).
- `scripts/`: helper for building the monorepo.

##### Additional README insights
- Rumious is installed as three primary packages: core, browser, CLI.
- CLI scaffolds new apps (`rumious init`), runs dev & prod builds, invokes the compiler and bundler.
- The compiler transforms JSX/TSX into framework-specific output.
- Plugins integrate Rumious into Rollup and Webpack pipelines.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Interaction
    Dev["Developer"]:::external
    Dev -->|"runs `rumious init`"| CLI

    %% Developer Tools Layer
    subgraph "Developer Tools"
        CLI["CLI Tool"]:::devtools
        Config["Configuration Helpers"]:::devtools
    end
    CLI -->|"scaffolds project"| Dev
    CLI -->|"reads templates"| CLI

    %% Compile-time Engine Layer
    subgraph "Compile-time Engine"
        Compiler["Compiler Library"]:::compile
        RP["Rollup Plugin"]:::compile
        WL["Webpack Loader"]:::compile
    end
    CLI -->|"transpiles TSX"| Compiler
    Compiler -->|"JS + Web Components"| Bundler

    %% Bundler Integration
    subgraph "Bundler"
        Rollup["Rollup"]:::external
        Webpack["Webpack"]:::external
    end
    CLI -->|"invokes Bundler"| Rollup
    CLI -->|"invokes Bundler"| Webpack
    Rollup -->|"uses plugin"| RP
    Webpack -->|"uses loader"| WL
    Config -->|"provides config"| Rollup
    Config -->|"provides config"| Webpack

    %% Runtime Layer
    subgraph "Runtime"
        Core["Core Runtime"]:::runtime
        Browser["Browser Adapter"]:::runtime
        Router["Router Library"]:::runtime
    end
    Bundler -->|"bundled assets"| HTTP
    HTTP -->|"serves assets"| Browser
    Browser -->|"bootstraps"| Core
    Core -->|"mounts components"| Browser
    Browser -->|"handles navigation"| Router
    Router -->|"provides routes"| Core

    %% External Services
    npm["npm Registry"]:::external
    TS["TypeScript"]:::external
    HTTP["HTTP Server"]:::external

    CLI -->|"publishes packages"| npm
    TS -->|"compiles code"| Compiler

    %% Click Events
    click CLI "https://github.com/smtdfc/rumious/tree/main/packages/cli"
    click Compiler "https://github.com/smtdfc/rumious/tree/main/packages/compiler"
    click Core "https://github.com/smtdfc/rumious/tree/main/packages/core"
    click Browser "https://github.com/smtdfc/rumious/tree/main/packages/browser"
    click Router "https://github.com/smtdfc/rumious/tree/main/packages/router"
    click Config "https://github.com/smtdfc/rumious/tree/main/packages/config"
    click RP "https://github.com/smtdfc/rumious/tree/main/packages/rollup-plugin"
    click WL "https://github.com/smtdfc/rumious/tree/main/packages/webpack-loader"

    %% Styling
    classDef devtools fill:#B3E5FC,stroke:#0288D1,stroke-width:2px
    classDef compile fill:#C8E6C9,stroke:#388E3C,stroke-width:2px
    classDef runtime fill:#FFE0B2,stroke:#F57C00,stroke-width:2px
    classDef external fill:#E1BEE7,stroke:#7B1FA2,stroke-width:2px
    class Dev,CLI,Config devtools
    class Compiler,RP,WL compile
    class Core,Browser,Router runtime
    class Dev,npm,TS,HTTP external
```
