# bionic-gpt/daisy-rsx architecture

> Architecture diagram of the GitHub repository bionic-gpt/daisy-rsx, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bionic-gpt/daisy-rsx
- Repository: https://github.com/bionic-gpt/daisy-rsx

## Overview

##### Project type and purpose
- This is a Rust-based UI-component library (“Daisy-RSX”) that wraps DaisyUI styles in Dioxus components. It is not a standalone application but a reusable crate meant to be imported into Dioxus apps.

##### File structure
- Top-level:
- Cargo.toml / Cargo.lock – defines the Rust crate, dependencies, versioning, and release pipeline.
- README.md, LICENSE, .gitignore – documentation, licensing, and git configuration.
- .devcontainer/ – Docker and VS Code dev-container definitions for a consistent development environment.
- src/ – the library source:
- lib.rs – entry point, exports all components.
- dozens of individual component modules (button.rs, input.rs, modal.rs, etc.).
- marketing/ – sample or documentation components for marketing pages (hero.rs, features.rs, faq_accordian.rs, etc.).

##### README for additional insights
- Confirms the crate wraps DaisyUI under Dioxus.
- Describes the release process via `cargo release`, Git tags, and GitHub Actions.

## Diagram (Mermaid)

```mermaid
graph TD
    subgraph "Development Environment"
        DevContainer[".devcontainer/"]:::env
        DevContainer -->|edit code| libRs["src/lib.rs"]:::core
    end

    subgraph "Documentation & Metadata"
        README["README.md"]:::docs
        LICENSE["LICENSE"]:::docs
        GITIGNORE[".gitignore"]:::docs
    end

    subgraph "Packaging & Release"
        CargoToml["Cargo.toml"]:::ci
        CargoLock["Cargo.lock"]:::ci
        CargoRelease["cargo release"]:::ci
        GitHubActions["GitHub Actions"]:::ci
        CratesIO["crates.io"]:::artifact
        CargoToml -->|defines crate| CargoRelease
        CargoLock -->|locks deps| CargoRelease
        CargoRelease -->|triggers| GitHubActions
        GitHubActions -->|publishes| CratesIO
    end

    subgraph "Core Library"
        libRs["src/lib.rs"]:::core
        subgraph "UI Components"
            Button["Button (button.rs)"]:::core
            Input["Input (input.rs)"]:::core
            Modal["Modal (modal.rs)"]:::core
            Accordion["Accordion (accordian.rs)"]:::core
            Card["Card (card.rs)"]:::core
            Dropdown["Dropdown (drop_down.rs)"]:::core
            Tooltip["Tooltip (tooltip.rs)"]:::core
        end
        libRs --> Button
        libRs --> Input
        libRs --> Modal
        libRs --> Accordion
        libRs --> Card
        libRs --> Dropdown
        libRs --> Tooltip
    end

    subgraph "Marketing Components"
        MarketingMod["src/marketing/"]:::marketing
        Hero["Hero (hero.rs)"]:::marketing
        Features["Features (features.rs)"]:::marketing
        FAQ["FAQ Accordion (faq_accordian.rs)"]:::marketing
        Logos["Customer Logos (customer_logos.rs)"]:::marketing
        Testimonials["Testimonials (testimonials.rs)"]:::marketing
        MarketingMod --> Hero
        MarketingMod --> Features
        MarketingMod --> FAQ
        MarketingMod --> Logos
        MarketingMod --> Testimonials
    end

    subgraph "External Dependencies"
        Dioxus["Dioxus Runtime"]:::ext
        DaisyUI["DaisyUI CSS"]:::ext
    end

    subgraph "Runtime Integration"
        ConsumerApp["Dioxus App"]:::consumer
        ConsumerApp -->|imports| libRs
        ConsumerApp -->|imports| MarketingMod
        libRs -->|depends on| Dioxus
        libRs -->|pulls styles| DaisyUI
    end

    click DevContainer "https://github.com/bionic-gpt/daisy-rsx/tree/main/.devcontainer/"
    click CargoToml "https://github.com/bionic-gpt/daisy-rsx/blob/main/Cargo.toml"
    click CargoLock "https://github.com/bionic-gpt/daisy-rsx/blob/main/Cargo.lock"
    click libRs "https://github.com/bionic-gpt/daisy-rsx/blob/main/src/lib.rs"
    click Button "https://github.com/bionic-gpt/daisy-rsx/blob/main/src/button.rs"
    click Input "https://github.com/bionic-gpt/daisy-rsx/blob/main/src/input.rs"
    click Modal "https://github.com/bionic-gpt/daisy-rsx/blob/main/src/modal.rs"
    click Accordion "https://github.com/bionic-gpt/daisy-rsx/blob/main/src/accordian.rs"
    click Card "https://github.com/bionic-gpt/daisy-rsx/blob/main/src/card.rs"
    click Dropdown "https://github.com/bionic-gpt/daisy-rsx/blob/main/src/drop_down.rs"
    click Tooltip "https://github.com/bionic-gpt/daisy-rsx/blob/main/src/tooltip.rs"
    click MarketingMod "https://github.com/bionic-gpt/daisy-rsx/tree/main/src/marketing/"
    click README "https://github.com/bionic-gpt/daisy-rsx/blob/main/README.md"
    click LICENSE "https://github.com/bionic-gpt/daisy-rsx/tree/main/LICENSE"
    click GITIGNORE "https://github.com/bionic-gpt/daisy-rsx/blob/main/.gitignore"

    classDef env fill:#dddddd,stroke:#333,stroke-width:1px
    classDef ci fill:#bbbbbb,stroke:#333,stroke-width:1px
    classDef artifact fill:#999999,stroke:#333,stroke-width:1px
    classDef core fill:#add8e6,stroke:#333,stroke-width:1px
    classDef marketing fill:#90ee90,stroke:#333,stroke-width:1px
    classDef ext fill:#ffa500,stroke:#333,stroke-width:1px
    classDef consumer fill:#dda0dd,stroke:#333,stroke-width:1px
    classDef docs fill:#f0e68c,stroke:#333,stroke-width:1px
```
