# vavakado/everyframe architecture

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

- Interactive diagram: https://gitdiagram.com/vavakado/everyframe
- Repository: https://github.com/vavakado/everyframe

## Overview

##### Main Components

A. Frontend Layer:
- Single Page Application (SPA) built with Rust (likely using a framework like Yew or Leptos, given the web assembly approach)
- Static assets (from the assets/ directory)
- Service Worker (sw.js) for PWA capabilities
- Web Assembly Module (compiled Rust code)

B. Application Core:
- Task Management Logic (contained in src/app.rs)
- Core Business Logic (src/lib.rs)
- Application Entry Point (src/main.rs)

**┌─────────────────────────────────────────┐**
- Client Browser             │
- ┤
- ┌─────────────┐        ┌─────────────┐  │
- Static    │        │  Service    │  │
- Assets    │        │   Worker    │  │
- ┘        └─────────────┘  │
- ┌─────────────────────────────────────┐ │
- Web Assembly Module         │ │
- ┌─────────────┐  ┌─────────────┐  │ │
- App      │  │    Core     │  │ │
- Component  │  │    Logic    │  │ │
- ┘  └─────────────┘  │ │
- ┘ │
- ┘

##### Key Relationships to Highlight
- Service Worker ←→ Static Assets (caching)
- WASM Module ←→ Browser Runtime
- App Component ←→ Core Logic
- Static Assets → Client Browser

##### Additional Elements
- A build pipeline section showing:
- Rust Compilation
- Trunk bundling
- Asset processing

##### Important Notes
- Version information for major components
- Local storage/state management flow
- PWA installation flow
- Entry points clearly

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Browser
        Client[Client Browser]
        PWA[PWA Container]
        WASM[WebAssembly Runtime]
    end

    subgraph "Static Layer"
        Assets["Static Assets"]:::static
        SW["Service Worker"]:::worker
        Manifest["PWA Manifest"]:::static
        HTML["HTML Entry"]:::static
    end

    subgraph "Application Layer"
        Main["Application Entry"]:::rust
        App["Task Management"]:::rust
        Core["Core Business Logic"]:::rust
    end

    subgraph "Build System"
        Trunk["Trunk Bundler"]:::build
        Cargo["Cargo Build"]:::build
        CI["CI/CD Pipeline"]:::build
    end

    %% Relationships
    Client --> PWA
    PWA --> WASM
    WASM --> App
    App --> Core
    Main --> App
    SW --> Assets
    Assets --> Client
    Manifest --> PWA
    HTML --> Client
    
    %% Build Flow
    Cargo --> Main
    Trunk --> WASM
    CI --> Trunk

    %% Click Events
    click SW "https://github.com/vavakado/everyframe/blob/main/assets/sw.js"
    click Manifest "https://github.com/vavakado/everyframe/blob/main/assets/manifest.json"
    click Assets "https://github.com/vavakado/everyframe/tree/main/assets/"
    click HTML "https://github.com/vavakado/everyframe/blob/main/index.html"
    click App "https://github.com/vavakado/everyframe/blob/main/src/app.rs"
    click Core "https://github.com/vavakado/everyframe/blob/main/src/lib.rs"
    click Main "https://github.com/vavakado/everyframe/blob/main/src/main.rs"
    click Trunk "https://github.com/vavakado/everyframe/blob/main/Trunk.toml"
    click Cargo "https://github.com/vavakado/everyframe/blob/main/.cargo/config.toml"
    click CI "https://github.com/vavakado/everyframe/blob/main/.github/workflows/pages.yml"

    %% Styles
    classDef static fill:#FFA500,stroke:#fff,stroke-width:2px
    classDef worker fill:#9932CC,stroke:#fff,stroke-width:2px
    classDef rust fill:#3EB489,stroke:#fff,stroke-width:2px
    classDef build fill:#4169E1,stroke:#fff,stroke-width:2px

    %% Legend
    subgraph Legend
        L1[Static Assets]:::static
        L2[Service Worker]:::worker
        L3[Rust Components]:::rust
        L4[Build Tools]:::build
    end
```
