# marcmyworld/sf-workers architecture

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

- Interactive diagram: https://gitdiagram.com/marcmyworld/sf-workers
- Repository: https://github.com/marcmyworld/sf-workers

## Overview

This is a small Cloudflare edge file hub for browsing selected SourceForge device repositories and downloading files through a fast streaming proxy. The visible workflow parses SourceForge listings into an explorer page, while downloads are fetched and returned with adjusted headers. The single-file excerpts show these operations but omit request routing and some fetch setup, so those connections are left unverified.

Main entry points: [`src/index.js`](https://github.com/marcmyworld/sf-workers/blob/main/src/index.js) (Edge request handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browse["Repository browsing"]
  node_worker["Edge request handler<br/>[index.js]"]
  node_listing_parser["Listing parser<br/>[index.js]"]
  node_explorer_page["Explorer page<br/>[index.js]"]
end

subgraph group_delivery["File delivery"]
  node_download_proxy["Download streamer<br/>[index.js]"]
end

node_visitor(("Visitor"))
node_sourceforge["SourceForge"]
node_download_host["Download host"]

node_visitor -.->|"sends requests"| node_worker
node_worker -.->|"fetches listing"| node_sourceforge
node_worker -->|"parses listing"| node_listing_parser
node_worker -->|"builds response"| node_explorer_page
node_download_proxy -->|"fetches file"| node_download_host

click node_worker "https://github.com/marcmyworld/sf-workers/blob/main/src/index.js"
click node_listing_parser "https://github.com/marcmyworld/sf-workers/blob/main/src/index.js"
click node_explorer_page "https://github.com/marcmyworld/sf-workers/blob/main/src/index.js"
click node_download_proxy "https://github.com/marcmyworld/sf-workers/blob/main/src/index.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_worker,node_listing_parser,node_explorer_page toneBlue
class node_download_proxy toneAmber
class node_visitor,node_sourceforge,node_download_host toneIndigo
```

## Components

### Repository browsing

- [Edge request handler](https://github.com/marcmyworld/sf-workers/blob/main/src/index.js): `src/index.js`
- [Listing parser](https://github.com/marcmyworld/sf-workers/blob/main/src/index.js): `src/index.js`
- [Explorer page](https://github.com/marcmyworld/sf-workers/blob/main/src/index.js): `src/index.js`

### File delivery

- [Download streamer](https://github.com/marcmyworld/sf-workers/blob/main/src/index.js): `src/index.js`

### Other components

- **Visitor**
- **SourceForge**
- **Download host**

## Connections

- Visitor → Edge request handler: sends requests
- Edge request handler → SourceForge: fetches listing
- Edge request handler → Listing parser: parses listing (evidence: `src/index.js`)
- Edge request handler → Explorer page: builds response (evidence: `src/index.js`)
- Download streamer → Download host: fetches file (evidence: `src/index.js`)
