# avadhgupta64-png/drishtitype architecture

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

- Interactive diagram: https://gitdiagram.com/avadhgupta64-png/drishtitype
- Repository: https://github.com/avadhgupta64-png/drishtitype

## Overview

DrishtiType is a browser-based, experimental eye-controlled text-entry prototype. Its documented workflow starts when a user enables tracking, then uses webcam landmarks and personal calibration samples to estimate gaze, select on-screen keys, compose text, and optionally speak it. The README documents these stages and capabilities, but no source excerpts were provided, so implementation-level call relationships cannot be verified.

Main entry points: [`index.html`](https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html) (Landmark extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_tracking["Eye tracking"]
  node_tracking_flow["Camera tracking<br/>[index.html]"]
  node_landmark_extraction["Landmark extraction<br/>[index.html]"]
end

subgraph group_estimation["Gaze estimation"]
  node_calibration["Personal calibration<br/>[index.html]"]
  node_mlp["Gaze model<br/>[index.html]"]
  node_inference["Live gaze inference<br/>[index.html]"]
end

subgraph group_interaction["Text interaction"]
  node_pointer_selection["Pointer and selection<br/>[index.html]"]
  node_keyboard["On-screen keyboard<br/>[index.html]"]
  node_text_composition["Text composition<br/>[index.html]"]
end

subgraph group_output["Communication output"]
  node_suggestions["Word suggestions<br/>[index.html]"]
  node_speech["Browser speech<br/>[index.html]"]
end

node_user(("User"))
node_browser["Browser camera"]
node_mediapipe["MediaPipe landmarks"]
node_speech_synthesis["Speech synthesis"]

node_user -->|"starts tracking"| node_tracking_flow
node_tracking_flow -->|"requests camera"| node_browser
node_browser -->|"provides video"| node_landmark_extraction
node_landmark_extraction -->|"uses landmarks"| node_mediapipe
node_landmark_extraction -->|"collects features"| node_calibration
node_user -->|"views targets"| node_calibration
node_calibration -->|"fits samples"| node_mlp
node_landmark_extraction -->|"supplies features"| node_inference
node_mlp -->|"estimates gaze"| node_inference
node_inference -->|"filters pointer"| node_pointer_selection
node_pointer_selection -->|"targets keys"| node_keyboard
node_user -->|"selects keys"| node_keyboard
node_keyboard -->|"composes text"| node_text_composition
node_text_composition -->|"offers suggestions"| node_suggestions
node_text_composition -->|"supports speech"| node_speech
node_speech -->|"uses synthesis"| node_speech_synthesis

click node_tracking_flow "https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html"
click node_landmark_extraction "https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html"
click node_calibration "https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html"
click node_mlp "https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html"
click node_inference "https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html"
click node_pointer_selection "https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html"
click node_keyboard "https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html"
click node_text_composition "https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html"
click node_suggestions "https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html"
click node_speech "https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html"

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_tracking_flow,node_landmark_extraction,node_user,node_browser toneBlue
class node_calibration,node_mlp,node_inference toneAmber
class node_pointer_selection,node_keyboard,node_text_composition,node_mediapipe toneMint
class node_suggestions,node_speech toneRose
class node_speech_synthesis toneIndigo
```

## Components

### Eye tracking

- [Camera tracking](https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html): `index.html`
- [Landmark extraction](https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html): `index.html`

### Gaze estimation

- [Personal calibration](https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html): `index.html`
- [Gaze model](https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html): `index.html`
- [Live gaze inference](https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html): `index.html`

### Text interaction

- [Pointer and selection](https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html): `index.html`
- [On-screen keyboard](https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html): `index.html`
- [Text composition](https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html): `index.html`

### Communication output

- [Word suggestions](https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html): `index.html`
- [Browser speech](https://github.com/avadhgupta64-png/drishtitype/blob/main/index.html): `index.html`

### Other components

- **User**
- **Browser camera**
- **MediaPipe landmarks**
- **Speech synthesis**

## Connections

- User → Camera tracking: starts tracking (evidence: `README.md`)
- Camera tracking → Browser camera: requests camera (evidence: `README.md`)
- Browser camera → Landmark extraction: provides video (evidence: `README.md`)
- Landmark extraction → MediaPipe landmarks: uses landmarks (evidence: `README.md`)
- Landmark extraction → Personal calibration: collects features (evidence: `README.md`)
- User → Personal calibration: views targets (evidence: `README.md`)
- Personal calibration → Gaze model: fits samples (evidence: `README.md`)
- Landmark extraction → Live gaze inference: supplies features (evidence: `README.md`)
- Gaze model → Live gaze inference: estimates gaze (evidence: `README.md`)
- Live gaze inference → Pointer and selection: filters pointer (evidence: `README.md`)
- Pointer and selection → On-screen keyboard: targets keys (evidence: `README.md`)
- User → On-screen keyboard: selects keys (evidence: `README.md`)
- On-screen keyboard → Text composition: composes text (evidence: `README.md`)
- Text composition → Word suggestions: offers suggestions (evidence: `README.md`)
- Text composition → Browser speech: supports speech (evidence: `README.md`)
- Browser speech → Speech synthesis: uses synthesis (evidence: `README.md`)
