# srushtiharyan/asl-to-text architecture

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

- Interactive diagram: https://gitdiagram.com/srushtiharyan/asl-to-text
- Repository: https://github.com/srushtiharyan/asl-to-text

## Overview

##### Project type and purpose
- This is a client-side, single-page web application (“frontend only” static site) whose goal is to let users collect/train their own sign-language gesture dataset in the browser and then run predictions to convert ASL gestures into text.
- The README points out three key features:
- Live capture of sign gestures for custom dataset creation
- On-device training of the model (no server)
- On-device inference/prediction of signs → text

##### File structure
- Top-level entries:
- index.html – the entry point / main UI
- css/ – styling sheets (mystyle.css, font-awesome)
- js/ – core logic broken into modules:
– main.js (prediction/inference engine)
– train.js (dataset collection & training orchestration)
– tutorial.js (guided walkthrough)
– script.js (UI event wiring)
- docs/, images/, webfonts/ – static assets, docs, tutorials
- No “backend” or database folder—everything runs in the browser.
- External dependencies (FontAwesome, likely TensorFlow.js) are pulled in via CDNs or webfonts folder.

##### Key insights from README
- It’s deployed as a static site (GitHub Pages / Netlify).
- Emphasis on:
- In-browser dataset creation
- In-browser training
- In-browser inference

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Hosting Layer
    Host["Static Hosting / CDN"]:::hosting
    click Host "https://github.com/srushtiharyan/asl-to-text/blob/main/index.html"

    %% Browser Layer
    subgraph "Browser (Client-side)"
        direction TB

        subgraph "UI Layer"
            direction TB
            HTML["index.html"]:::ui
            CSS1["mystyle.css"]:::ui
            CSS2["style.css"]:::ui
            CSS3["font-awesome.css"]:::ui
            CSS4["font-awesome (2).css"]:::ui
            Webfonts["webfonts/"]:::ui
            click HTML "https://github.com/srushtiharyan/asl-to-text/blob/main/index.html"
            click CSS1 "https://github.com/srushtiharyan/asl-to-text/blob/main/css/mystyle.css"
            click CSS2 "https://github.com/srushtiharyan/asl-to-text/blob/main/css/style.css"
            click CSS3 "https://github.com/srushtiharyan/asl-to-text/blob/main/css/font-awesome.css"
            click CSS4 "https://github.com/srushtiharyan/asl-to-text/blob/main/css/font-awesome (2).css"
            click Webfonts "https://github.com/srushtiharyan/asl-to-text/tree/main/webfonts/"
        end

        subgraph "JS Modules"
            direction TB
            Script["script.js"]:::ui
            Train["train.js"]:::ml
            Main["main.js"]:::ml
            Tutorial["tutorial.js"]:::ui
            click Script "https://github.com/srushtiharyan/asl-to-text/blob/main/js/script.js"
            click Train "https://github.com/srushtiharyan/asl-to-text/blob/main/js/train.js"
            click Main "https://github.com/srushtiharyan/asl-to-text/blob/main/js/main.js"
            click Tutorial "https://github.com/srushtiharyan/asl-to-text/blob/main/js/tutorial.js"
        end

        subgraph "Client-side Storage"
            Storage["localStorage / IndexedDB"]:::storage
        end

        subgraph "External Libraries & APIs"
            TFJS["TensorFlow.js (CDN)"]:::external
            Webcam["Navigator.getUserMedia API"]:::external
        end
    end

    %% User
    User["User"]:::user

    %% Static Assets & Documentation
    subgraph "Static Assets & Documentation"
        direction TB
        DocPDF["Sign Language Translator Report.pdf"]:::hosting
        DocPPT["Sign.pptx"]:::hosting
        Videos["docs/Videos/"]:::hosting
        ImagesDoc["docs/Images/"]:::hosting
        Images["images/"]:::hosting
        AppShots["img/app-screenshots/"]:::hosting
        TeamImgs["img/team/"]:::hosting
        Testimonial["img/testimonial/"]:::hosting
        click DocPDF "https://github.com/srushtiharyan/asl-to-text/blob/main/docs/Sign Language Translator Report.pdf"
        click DocPPT "https://github.com/srushtiharyan/asl-to-text/blob/main/docs/Sign.pptx"
        click Videos "https://github.com/srushtiharyan/asl-to-text/tree/main/docs/Videos/"
        click ImagesDoc "https://github.com/srushtiharyan/asl-to-text/tree/main/docs/Images/"
        click Images "https://github.com/srushtiharyan/asl-to-text/tree/main/images/"
        click AppShots "https://github.com/srushtiharyan/asl-to-text/tree/main/img/app-screenshots/"
        click TeamImgs "https://github.com/srushtiharyan/asl-to-text/tree/main/img/team/"
        click Testimonial "https://github.com/srushtiharyan/asl-to-text/tree/main/img/testimonial/"
    end

    %% Connections
    Host -->|"serves assets"| HTML
    Host --> CSS1
    Host --> CSS2
    Host --> CSS3
    Host --> CSS4
    Host --> Webfonts
    Host --> Script
    Host --> Train
    Host --> Main
    Host --> Tutorial
    Host --> DocPDF
    Host --> DocPPT
    Host --> Videos
    Host --> ImagesDoc
    Host --> Images
    Host --> AppShots
    Host --> TeamImgs
    Host --> Testimonial

    User -->|"interacts with UI"| HTML
    User -->|"grants webcam access"| Webcam

    Webcam -->|"video frames"| Train
    Webcam -->|"video frames"| Main

    HTML -->|"UI events"| Script
    Script -->|"start training"| Train
    Script -->|"start inference"| Main
    Script -->|"guide steps"| Tutorial

    Train -->|"save dataset"| Storage
    Storage -->|"load dataset"| Train

    Train -->|"train model"| TFJS
    Main -->|"run inference"| TFJS

    Main -->|"predicted label"| HTML

    Tutorial -->|"walkthrough UI"| HTML

    %% Styles
    classDef hosting fill:#d3d3d3,stroke:#333,stroke-width:1px;
    classDef ui fill:#cce5ff,stroke:#004085,stroke-width:1px;
    classDef ml fill:#d4edda,stroke:#155724,stroke-width:1px;
    classDef storage fill:#ffe5b4,stroke:#cc8400,stroke-width:1px;
    classDef external fill:#e2d6f3,stroke:#5e35b1,stroke-width:1px;
    classDef user fill:#f8d7da,stroke:#721c24,stroke-width:1px;
```
