# indieventuresllc/framework architecture

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

- Interactive diagram: https://gitdiagram.com/indieventuresllc/framework
- Repository: https://github.com/indieventuresllc/framework

## Overview

##### Main Components

a) Client-Side Layer:
- Browser/Client making requests
- Static Assets (served from Cloudflare's edge)
- Tailwind CSS styling system

b) Edge Runtime Layer (Cloudflare Workers):
- Remix Runtime
- Worker Handler (server.ts)
- Route Controllers (app/routes)
- Service Layer (app/services)

c) External Services & Storage:
- Cloudflare KV Storage
- GitHub API Integration (via github.server.ts)
- Markdoc Processing Service (markdoc.server.tsx)

**[Client Layer] → [Edge Runtime Layer] → [External Services Layer]**

##### Specific Component Details

a) Client Layer (Top):
- Static asset delivery path
- Tailwind CSS processing

b) Edge Runtime Layer (Middle):
- Central Remix Runtime component
- Route handlers (/app/routes)
- Service layer components
- Worker execution environment

c) External Services (Bottom):
- KV Storage nodes
- GitHub API connection
- Markdoc processing service

##### Flow Representations

- Request flow from client through Workers
- Data flow between services
- Static asset delivery path
- API calls to external services

##### Important Elements to Highlight

- Vite development server flow (development mode)
- Playwright testing infrastructure
- CI/CD pipeline with GitHub Actions
- Environment variable handling
- TypeScript type system coverage

##### The development and testing infrastructure

Keep the abstraction level focused on the architectural components while maintaining enough detail to understand the system's edge computing nature and its integration with Cloudflare's infrastructure.

Remember to indicate the build and deployment pipeline as a separate flow, showing how code moves from development through GitHub Actions to Cloudflare Workers deployment.

This architecture should clearly demonstrate how the application leverages Cloudflare's edge network while maintaining a clean separation of concerns between the client, edge runtime, and external services.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["Browser/Client"]
        StaticAssets["Static Assets"]:::static
        TailwindCSS["Tailwind CSS System"]:::styling
    end

    subgraph EdgeRuntime["Edge Runtime (Cloudflare Workers)"]
        WorkerHandler["Worker Handler"]:::worker
        RemixRuntime["Remix Runtime"]:::runtime
        
        subgraph AppLayer["Application Layer"]
            Routes["Route Controllers"]:::app
            Services["Service Layer"]:::app
            RootComponent["Root Component"]:::app
            LayoutComponent["Layout Component"]:::app
        end
        
        subgraph ProcessingServices["Processing Services"]
            MarkdocService["Markdoc Processing"]:::service
            GitHubService["GitHub Integration"]:::service
        end
    end

    subgraph Infrastructure
        CFStorage[(Cloudflare KV)]:::storage
        GitHubAPI["GitHub API"]:::external
        
        subgraph DevOps["DevOps & Testing"]
            GHActions["GitHub Actions"]:::cicd
            PlaywrightTests["Playwright Tests"]:::testing
            ViteDev["Vite Dev Server"]:::dev
        end
    end

    Browser --> WorkerHandler
    WorkerHandler --> RemixRuntime
    RemixRuntime --> Routes
    Routes --> Services
    Services --> ProcessingServices
    GitHubService --> GitHubAPI
    MarkdocService --> CFStorage
    StaticAssets --> Browser
    TailwindCSS --> Browser

    %% Click Events
    click WorkerHandler "https://github.com/indieventuresllc/framework/blob/main/server.ts"
    click Routes "https://github.com/indieventuresllc/framework/tree/main/app/routes"
    click Services "https://github.com/indieventuresllc/framework/tree/main/app/services"
    click StaticAssets "https://github.com/indieventuresllc/framework/tree/main/public"
    click TailwindCSS "https://github.com/indieventuresllc/framework/blob/main/tailwind.config.js"
    click RootComponent "https://github.com/indieventuresllc/framework/blob/main/app/root.tsx"
    click LayoutComponent "https://github.com/indieventuresllc/framework/blob/main/app/layout.tsx"
    click GitHubService "https://github.com/indieventuresllc/framework/blob/main/app/services/github.server.ts"
    click MarkdocService "https://github.com/indieventuresllc/framework/blob/main/app/services/markdoc.server.tsx"
    click ViteDev "https://github.com/indieventuresllc/framework/blob/main/vite.config.ts"
    click WorkerHandler "https://github.com/indieventuresllc/framework/blob/main/wrangler.toml"
    click GHActions "https://github.com/indieventuresllc/framework/blob/main/.github/workflows/ci.yml"
    click PlaywrightTests "https://github.com/indieventuresllc/framework/tree/main/tests"

    %% Styling
    classDef worker fill:#1E88E5,color:white
    classDef runtime fill:#42A5F5,color:white
    classDef app fill:#4CAF50,color:white
    classDef service fill:#66BB6A,color:white
    classDef storage fill:#7E57C2,color:white
    classDef external fill:#FF7043,color:white
    classDef static fill:#90A4AE,color:white
    classDef styling fill:#EC407A,color:white
    classDef cicd fill:#FFA726,color:white
    classDef testing fill:#26A69A,color:white
    classDef dev fill:#78909C,color:white

    %% Legend
    subgraph Legend
        L1["Worker Component"]:::worker
        L2["Runtime Component"]:::runtime
        L3["App Component"]:::app
        L4["Service Component"]:::service
        L5["Storage"]:::storage
        L6["External Service"]:::external
        L7["Static Asset"]:::static
        L8["Styling"]:::styling
        L9["CI/CD"]:::cicd
        L10["Testing"]:::testing
        L11["Development"]:::dev
    end
```
