# mholthausen/fibo architecture

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

- Interactive diagram: https://gitdiagram.com/mholthausen/fibo
- Repository: https://github.com/mholthausen/fibo

## Overview

##### Project type and purpose
- This is a Single-Page Application (SPA) built with React and TypeScript, bundled by Vite and deployed as a static site (Netlify).
- Its sole purpose is to let users pick Fibonacci numbers (for agile story-point estimation) via buttons and display the selected value.

##### File structure
- Top level
- package.json, vite.config.ts, tsconfig*.json → build tool & TS config
- netlify.toml → static-hosting/deploy rules
- index.html → SPA entry point
- public/ → raw assets (robots.txt, manifest.json, _redirects)
- src/
- main.tsx → ReactDOM.render, mount point
- App.tsx + App.css → top-level layout
- components/
– AppHeader, AppFooter
– AppContent/
· FiboButtonsToolbar/ (FiboButton, FiboPopover)
· FiboNumberDisplay
- theme.ts, utils.ts → styling tokens & helper functions

##### README for additional insights
- No backend services or databases—pure client-side.
- Uses Travis CI (badge in README) and Netlify (netlify.toml) for CI/CD & hosting.

##### Main components
A. Developer workflow
1. Developer writes code → pushes to GitHub
2. Travis CI runs lint/tests → on success triggers Netlify webhook
3. Netlify builds (Vite) → deploys to CDN
B. Runtime (Browser)
1. User’s browser requests static assets (index.html + JS bundle + CSS + assets) via CDN
2. Vite‐bundled React app mounts on `
`
3. App → AppHeader + AppContent + AppFooter
4. AppContent → FiboButtonsToolbar (renders FiboButton, FiboPopover) + FiboNumberDisplay
5. User clicks button → React state update → display changes

##### Relationships & interactions
- Inside Browser: HTTP GET to CDN, then event-driven UI updates via React component tree.
- No external databases or third-party APIs.

##### Architectural patterns & design principles
- Component-based UI (React)
- Unidirectional data flow (React props & state)
- Static-site deployment (Jamstack): build at CI time, serve from CDN
- Typed code (TypeScript), CSS modules (per-component CSS)

##### Technologies / frameworks to annotate
- React / ReactDOM
- Vite (bundler)
- TypeScript
- Netlify (hosting)
- Travis CI (CI)
- ESLint (linting), Prettier (formatting, if used)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Build & Deploy Path
    subgraph "Build & Deploy"
        direction TB
        Developer["Developer"]:::infra
        GitHub["GitHub Repo"]:::infra
        TravisCI["Travis CI"]:::infra
        Netlify["Netlify Build & CDN"]:::infra
    end
    Developer -->|"push code"| GitHub
    GitHub -->|"runs CI"| TravisCI
    TravisCI -->|"on success webhook"| Netlify

    %% Configuration & Tooling
    subgraph "Configurations & Tooling"
        direction TB
        ViteCfg["vite.config.ts"]:::config
        TSConfigs["tsconfig.json / tsconfig.app.json / tsconfig.node.json"]:::config
        ESLintCfg[".eslintrc.cjs"]:::config
        NetlifyCfg["netlify.toml"]:::config
        TravisCfg[".github/test.yml"]:::config
    end
    TravisCI -->|"uses ESLint & tests"| ESLintCfg
    TravisCI -->|"CI pipeline config"| TravisCfg
    Netlify -->|"build by Vite"| ViteCfg
    ViteCfg -->|"TypeScript settings"| TSConfigs
    Netlify -->|"deploy rules"| NetlifyCfg

    %% CDN & Browser
    CDN["CDN"]:::infra
    Netlify --> CDN
    CDN -->|"HTTP GET static assets"| Browser["User's Browser"]:::ui

    %% Static Assets
    subgraph "Public Assets"
        direction TB
        Redirects["_redirects"]:::config
        Manifest["manifest.json"]:::config
        Robots["robots.txt"]:::config
        Sitemap["sitemap.xml"]:::config
    end
    Browser --> Redirects
    Browser --> Manifest
    Browser --> Robots
    Browser --> Sitemap

    %% Runtime UI
    subgraph "Browser"
        direction TB
        subgraph "React Application"
            direction TB
            IndexHTML["index.html"]:::config
            MainTS["src/main.tsx"]:::config
            AppComp["App (src/App.tsx)"]:::ui
            AppCSS["App.css"]:::config
            AppHeader["AppHeader"]:::ui
            AppHeaderCSS["index.css"]:::config
            AppFooter["AppFooter"]:::ui
            AppFooterCSS["index.css"]:::config
            AppContent["AppContent"]:::ui
            ButtonsToolbar["FiboButtonsToolbar"]:::ui
            ButtonsCSS["index.css"]:::config
            FiboButton["FiboButton"]:::ui
            FiboButtonCSS["index.css"]:::config
            FiboPopover["FiboPopover"]:::ui
            FiboNumberDisplay["FiboNumberDisplay"]:::ui
            DisplayCSS["index.css"]:::config
            State["React State"]:::ui
        end
    end
    Browser --> IndexHTML
    IndexHTML --> MainTS
    MainTS --> AppComp
    AppComp --> AppHeader
    AppComp --> AppContent
    AppComp --> AppFooter
    AppComp --> AppCSS
    AppHeader --> AppHeaderCSS
    AppFooter --> AppFooterCSS
    AppContent --> ButtonsToolbar
    AppContent --> FiboNumberDisplay
    ButtonsToolbar --> FiboButton
    ButtonsToolbar --> FiboPopover
    ButtonsToolbar --> ButtonsCSS
    FiboButton --> FiboButtonCSS
    FiboNumberDisplay --> DisplayCSS
    FiboButton -->|"onClick"| State
    State -->|"state update"| FiboNumberDisplay

    %% Utilities & Theme
    Theme["src/theme.ts"]:::config
    Utils["src/utils.ts"]:::config
    MainTS --> Theme
    MainTS --> Utils

    %% Click Events
    click IndexHTML "https://github.com/mholthausen/fibo/blob/main/index.html"
    click MainTS "https://github.com/mholthausen/fibo/blob/main/src/main.tsx"
    click AppComp "https://github.com/mholthausen/fibo/blob/main/src/App.tsx"
    click AppCSS "https://github.com/mholthausen/fibo/blob/main/src/App.css"
    click AppHeader "https://github.com/mholthausen/fibo/blob/main/src/components/AppHeader/index.tsx"
    click AppHeaderCSS "https://github.com/mholthausen/fibo/blob/main/src/components/AppHeader/index.css"
    click AppFooter "https://github.com/mholthausen/fibo/blob/main/src/components/AppFooter/index.tsx"
    click AppFooterCSS "https://github.com/mholthausen/fibo/blob/main/src/components/AppFooter/index.css"
    click AppContent "https://github.com/mholthausen/fibo/blob/main/src/components/AppContent/index.tsx"
    click ButtonsToolbar "https://github.com/mholthausen/fibo/blob/main/src/components/AppContent/FiboButtonsToolbar/index.tsx"
    click ButtonsCSS "https://github.com/mholthausen/fibo/blob/main/src/components/AppContent/FiboButtonsToolbar/index.css"
    click FiboButton "https://github.com/mholthausen/fibo/blob/main/src/components/AppContent/FiboButtonsToolbar/FiboButton/index.tsx"
    click FiboButtonCSS "https://github.com/mholthausen/fibo/blob/main/src/components/AppContent/FiboButtonsToolbar/FiboButton/index.css"
    click FiboPopover "https://github.com/mholthausen/fibo/blob/main/src/components/AppContent/FiboButtonsToolbar/FiboPopover/index.tsx"
    click FiboNumberDisplay "https://github.com/mholthausen/fibo/blob/main/src/components/AppContent/FiboNumberDisplay/index.tsx"
    click DisplayCSS "https://github.com/mholthausen/fibo/blob/main/src/components/AppContent/FiboNumberDisplay/index.css"
    click Theme "https://github.com/mholthausen/fibo/blob/main/src/theme.ts"
    click Utils "https://github.com/mholthausen/fibo/blob/main/src/utils.ts"
    click ViteCfg "https://github.com/mholthausen/fibo/blob/main/vite.config.ts"
    click TSConfigs "https://github.com/mholthausen/fibo/blob/main/tsconfig.json"
    click ESLintCfg "https://github.com/mholthausen/fibo/blob/main/.eslintrc.cjs"
    click TravisCfg "https://github.com/mholthausen/fibo/blob/main/.github/test.yml"
    click NetlifyCfg "https://github.com/mholthausen/fibo/blob/main/netlify.toml"
    click Redirects "https://github.com/mholthausen/fibo/tree/main/public/_redirects"
    click Manifest "https://github.com/mholthausen/fibo/blob/main/public/manifest.json"
    click Robots "https://github.com/mholthausen/fibo/blob/main/public/robots.txt"
    click Sitemap "https://github.com/mholthausen/fibo/blob/main/public/sitemap.xml"

    %% Styles
    classDef infra fill:#FFA500,stroke:#333,stroke-width:1px
    classDef ui fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef config fill:#D3D3D3,stroke:#333,stroke-width:1px
```
