# roboticspro1/tinyfishnus-byteme architecture

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

- Interactive diagram: https://gitdiagram.com/roboticspro1/tinyfishnus-byteme
- Repository: https://github.com/roboticspro1/tinyfishnus-byteme

## Overview

Web2API Studio is a demo web app that accepts a website URL and goal, analyzes the target HTML, infers a schema and sample records, then presents an API design and generated-endpoint quickstart. The main workflow runs from the browser form through FastAPI analysis and back to interactive results. The README describes demo mode and future TinyFish/OpenAI integrations, but no current integrations are evidenced. The backend excerpt is partial, so internal analysis stages are grouped where calls are not shown.

Main entry points: [`main.py`](https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py) (Site analysis), [`static/app.js`](https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/static/app.js) (Studio UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Studio interface"]
  node_browser["Studio UI<br/>[app.js]"]
  node_results_view["Results views<br/>[app.js]"]
end

subgraph group_backend["Analysis service"]
  node_analyze_route["Analyze route<br/>[main.py]"]
  node_site_analysis["Site analysis<br/>[main.py]"]
  node_html_fetch["HTML fetch<br/>[main.py]"]
  node_page_extraction["Page extraction<br/>[main.py]"]
  node_record_samples["Sample records<br/>[main.py]"]
  node_schema_inference["Schema inference<br/>[main.py]"]
  node_analysis_store[("Analysis store<br/>[main.py]")]
end

subgraph group_outputs["API outputs"]
  node_api_design["API design<br/>[main.py]"]
  node_quickstart["Quickstart examples<br/>[main.py]"]
  node_generated_route["Generated items route<br/>[main.py]"]
end

node_developer(("Developer"))
node_website["Target website"]

node_developer -->|"enters URL"| node_browser
node_browser -->|"posts analysis"| node_analyze_route
node_analyze_route -->|"calls analysis"| node_site_analysis
node_site_analysis -->|"fetches HTML"| node_html_fetch
node_html_fetch -->|"requests page"| node_website
node_site_analysis -.->|"extracts pages"| node_page_extraction
node_site_analysis -.->|"builds samples"| node_record_samples
node_site_analysis -->|"infers schema"| node_schema_inference
node_site_analysis -.->|"designs endpoints"| node_api_design
node_site_analysis -->|"builds examples"| node_quickstart
node_site_analysis -.->|"stores analysis"| node_analysis_store
node_analyze_route -.->|"returns analysis"| node_browser
node_browser -->|"renders results"| node_results_view
node_generated_route -->|"reads analysis"| node_analysis_store

click node_browser "https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/static/app.js"
click node_analyze_route "https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py"
click node_site_analysis "https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py"
click node_html_fetch "https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py"
click node_page_extraction "https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py"
click node_record_samples "https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py"
click node_schema_inference "https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py"
click node_api_design "https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py"
click node_quickstart "https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py"
click node_analysis_store "https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py"
click node_generated_route "https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py"
click node_results_view "https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/static/app.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_browser,node_results_view toneBlue
class node_analyze_route,node_site_analysis,node_html_fetch,node_page_extraction,node_record_samples,node_schema_inference,node_analysis_store toneAmber
class node_api_design,node_quickstart,node_generated_route toneMint
class node_developer,node_website toneIndigo
```

## Components

### Studio interface

- [Studio UI](https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/static/app.js): `static/app.js`
- [Results views](https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/static/app.js): `static/app.js`

### Analysis service

- [Analyze route](https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py): `main.py`
- [Site analysis](https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py): `main.py`
- [HTML fetch](https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py): `main.py`
- [Page extraction](https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py): `main.py`
- [Sample records](https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py): `main.py`
- [Schema inference](https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py): `main.py`
- [Analysis store](https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py): `main.py`

### API outputs

- [API design](https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py): `main.py`
- [Quickstart examples](https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py): `main.py`
- [Generated items route](https://github.com/roboticspro1/tinyfishnus-byteme/blob/main/main.py): `main.py`

### Other components

- **Developer**
- **Target website**

## Connections

- Developer → Studio UI: enters URL (evidence: `static/app.js`)
- Studio UI → Analyze route: posts analysis (evidence: `static/app.js`)
- Analyze route → Site analysis: calls analysis (evidence: `main.py`)
- Site analysis → HTML fetch: fetches HTML (evidence: `main.py`)
- HTML fetch → Target website: requests page (evidence: `main.py`)
- Site analysis → Page extraction: extracts pages (evidence: `main.py`)
- Site analysis → Sample records: builds samples (evidence: `main.py`)
- Site analysis → Schema inference: infers schema (evidence: `main.py`)
- Site analysis → API design: designs endpoints (evidence: `main.py`)
- Site analysis → Quickstart examples: builds examples (evidence: `main.py`)
- Site analysis → Analysis store: stores analysis (evidence: `main.py`)
- Analyze route → Studio UI: returns analysis
- Studio UI → Results views: renders results (evidence: `static/app.js`)
- Generated items route → Analysis store: reads analysis (evidence: `main.py`)
