# syeo66/flipbun architecture

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

- Interactive diagram: https://gitdiagram.com/syeo66/flipbun
- Repository: https://github.com/syeo66/flipbun

## Overview

##### Project Type Identification
This is a frontend-focused experimental project that demonstrates FLIP (First, Last, Inverse, Play) animations using Bun as the JavaScript runtime. The project appears to be a collection of animation experiments spread across multiple pages.

##### Main Components

a. Client-Side Architecture:
- Static Assets Layer
- HTML Pages (public/*.html)
- Styles (src/styles.css)
- TypeScript Application Layer
- Animation Core (src/animate.ts)
- Experiment Implementations (experiment1.ts, experiment2.ts, experiment3.ts)
- Entry Point (src/index.ts)

b. Development Infrastructure:
- Bun Development Server
- TypeScript Compiler
- Build/Bundle Process

**[Development Environment]**
- ↓
**[Bun Dev Server] ←→ [Static Assets]**
- ↓               ↑
**[TypeScript Compilation]**
- ↓
**[Application Core]**
- [Animation Engine]
- [Experiments]
- [Experiment 1]
- [Experiment 2]
- [Experiment 3]

##### Important Details to Highlight

a. Development Flow:
- How Bun serves the application
- TypeScript compilation process
- How static assets are served

b. Runtime Flow:
- How animation experiments are loaded
- Relationship between animation core and experiments
- Page navigation flow

##### Notes Section

A notes section that explains:
- The FLIP animation concept
- The role of Bun in the project
- Any browser compatibility considerations
- Development workflow

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Development
        BunServer["Bun Development Server"]:::server
        TSCompiler["TypeScript Compiler"]:::build
        Config["Configuration Files"]:::config
    end

    subgraph "Static Assets"
        HTML["HTML Pages"]:::static
        CSS["Styles"]:::static
    end

    subgraph "Application"
        Entry["Entry Point"]:::app
        AnimCore["Animation Core"]:::core
        subgraph "Experiments"
            Exp1["Experiment 1"]:::experiment
            Exp2["Experiment 2"]:::experiment
            Exp3["Experiment 3"]:::experiment
        end
    end

    BunServer --> Entry
    TSCompiler --> Entry
    Config --> TSCompiler
    Entry --> AnimCore
    AnimCore --> Exp1
    AnimCore --> Exp2
    AnimCore --> Exp3
    BunServer --> HTML
    HTML --> CSS

    %% Component Mappings
    click HTML "https://github.com/syeo66/flipbun/tree/main/public/"
    click CSS "https://github.com/syeo66/flipbun/blob/main/src/styles.css"
    click Entry "https://github.com/syeo66/flipbun/blob/main/src/index.ts"
    click AnimCore "https://github.com/syeo66/flipbun/blob/main/src/animate.ts"
    click Exp1 "https://github.com/syeo66/flipbun/blob/main/src/experiment1.ts"
    click Exp2 "https://github.com/syeo66/flipbun/blob/main/src/experiment2.ts"
    click Exp3 "https://github.com/syeo66/flipbun/blob/main/src/experiment3.ts"
    click Config "https://github.com/syeo66/flipbun/blob/main/tsconfig.json"

    %% Styling
    classDef server fill:#3498db,stroke:#2980b9,color:white
    classDef build fill:#e67e22,stroke:#d35400,color:white
    classDef config fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef static fill:#f1c40f,stroke:#f39c12,color:black
    classDef app fill:#2ecc71,stroke:#27ae60,color:white
    classDef core fill:#1abc9c,stroke:#16a085,color:white
    classDef experiment fill:#9b59b6,stroke:#8e44ad,color:white

    %% Legend
    subgraph Legend
        L1["Server Component"]:::server
        L2["Build Process"]:::build
        L3["Configuration"]:::config
        L4["Static Asset"]:::static
        L5["Application Code"]:::app
        L6["Core Component"]:::core
        L7["Experiment"]:::experiment
    end
```
