# gaxakun/nsl-app architecture

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

- Interactive diagram: https://gitdiagram.com/gaxakun/nsl-app
- Repository: https://github.com/gaxakun/nsl-app

## Overview

#### Purpose and Entry Points
This is a compact static client application named `nsl-app`. The repository contains a single browser entry page, application script, stylesheet, and a versioned machine-learning model bundle.

- HTML entry point: `index.html`
- Application bootstrap and runtime behavior: `app.js`
- Presentation layer: `style.css`

#### Browser Application Shell
`index.html` is the document-level integration boundary: it loads the application UI and connects browser execution to the JavaScript and styling assets. `app.js` owns client-side control flow, DOM interaction, and any model invocation initiated by user actions.

- `index.html`
- `app.js`
- `style.css`

#### Model Asset Bundle
`model_v3/` is a deployable model version rather than source code. The JSON manifest describes the model graph/weights layout, while the binary shard supplies learned parameters. These files must remain mutually compatible and be served at stable relative paths.

- `model_v3/model.json`
- `model_v3/group1-shard1of1.bin`

#### Primary Runtime Flow
1. A browser loads `index.html`.
2. The page applies `style.css` and executes `app.js`.
3. `app.js` loads or references the model manifest in `model_v3/model.json`.
4. The model loader retrieves `model_v3/group1-shard1of1.bin` according to that manifest.
5. Browser-side application logic uses the loaded model for its intended inference workflow and updates the page UI.

The main boundary is between UI/control logic in `app.js` and model-serving/loading behavior in `model_v3/`.

#### Deployment and Infrastructure
The repository appears designed for static hosting: all runtime artifacts are local files and no server-side source, package manifest, API client, database layer, or infrastructure definition is present. A host must serve files over HTTP(S), including binary model assets with paths preserved relative to the site root.

- Static page asset: `index.html`
- Client runtime: `app.js`
- Model artifact directory: `model_v3/`

#### External Dependencies and Constraints
No external service integrations are visible from the repository tree or README. The material runtime is a web browser; any ML framework dependency is expected to be loaded or referenced by `index.html`/`app.js`, but its exact source cannot be established from the provided files. Model version changes should be deployed atomically across `model_v3/model.json` and `model_v3/group1-shard1of1.bin`.

Main entry points: [`app.js`](https://github.com/gaxakun/nsl-app/blob/main/app.js) (Client Runtime), [`index.html`](https://github.com/gaxakun/nsl-app/blob/main/index.html) (HTML Entry), [`model_v3/model.json`](https://github.com/gaxakun/nsl-app/blob/main/model_v3/model.json) (Model Manifest), [`model_v3/group1-shard1of1.bin`](https://github.com/gaxakun/nsl-app/blob/main/model_v3/group1-shard1of1.bin) (Weight Shard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Browser Application"]
  node_browser(("Web Browser<br/>runtime"))
  node_index["HTML Entry<br/>page<br/>[index.html]"]
  node_styles["Stylesheet<br/>presentation<br/>[style.css]"]
  node_app["Client Runtime<br/>javascript<br/>[app.js]"]
  node_ui["Page UI<br/>DOM"]
  node_loaded_model{{"Loaded Model<br/>inference runtime"}}
end

subgraph group_model["Model v3 Bundle"]
  node_manifest["Model Manifest<br/>[model.json]"]
  node_weights["Weight Shard<br/>model weights"]
end

subgraph group_hosting["Static Hosting"]
  node_static_host["Static Host<br/>HTTP serving"]
end

node_static_host -->|"serves"| node_index
node_static_host -->|"serves"| node_styles
node_static_host -->|"serves"| node_app
node_static_host -->|"serves"| node_manifest
node_static_host -->|"serves"| node_weights
node_browser -->|"loads"| node_index
node_index -->|"applies"| node_styles
node_index -->|"executes"| node_app
node_app -->|"reads and updates"| node_ui
node_app -->|"loads"| node_manifest
node_manifest -->|"references"| node_weights
node_manifest -->|"defines"| node_loaded_model
node_weights -->|"provides parameters"| node_loaded_model
node_app -->|"invokes inference"| node_loaded_model
node_loaded_model -->|"returns results"| node_ui

click node_index "https://github.com/gaxakun/nsl-app/blob/main/index.html"
click node_styles "https://github.com/gaxakun/nsl-app/blob/main/style.css"
click node_app "https://github.com/gaxakun/nsl-app/blob/main/app.js"
click node_manifest "https://github.com/gaxakun/nsl-app/blob/main/model_v3/model.json"
click node_weights "https://github.com/gaxakun/nsl-app/blob/main/model_v3/group1-shard1of1.bin"

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_index,node_styles,node_app,node_ui,node_loaded_model toneBlue
class node_manifest,node_weights toneAmber
class node_static_host toneMint
```

## Components

### Browser Application

- **Web Browser**: runtime
- [HTML Entry](https://github.com/gaxakun/nsl-app/blob/main/index.html): page · Document-level asset integration boundary. · `index.html`
- [Stylesheet](https://github.com/gaxakun/nsl-app/blob/main/style.css): presentation · `style.css`
- [Client Runtime](https://github.com/gaxakun/nsl-app/blob/main/app.js): javascript · Handles DOM control flow, inference, and UI updates. · `app.js`
- **Page UI**: DOM
- **Loaded Model**: inference runtime

### Model v3 Bundle

Versioned assets must deploy together.

- [Model Manifest](https://github.com/gaxakun/nsl-app/blob/main/model_v3/model.json): model manifest · Defines model graph and weight layout. · `model_v3/model.json`
- [Weight Shard](https://github.com/gaxakun/nsl-app/blob/main/model_v3/group1-shard1of1.bin): model weights · Learned model parameters. · `model_v3/group1-shard1of1.bin`

### Static Hosting

Serves site files with relative paths preserved.

- **Static Host**: HTTP serving · Serves browser assets and model files.

## Connections

- Static Host → HTML Entry: serves
- Static Host → Stylesheet: serves
- Static Host → Client Runtime: serves
- Static Host → Model Manifest: serves
- Static Host → Weight Shard: serves
- Web Browser → HTML Entry: loads
- HTML Entry → Stylesheet: applies
- HTML Entry → Client Runtime: executes
- Client Runtime → Page UI: reads and updates
- Client Runtime → Model Manifest: loads
- Model Manifest → Weight Shard: references
- Model Manifest → Loaded Model: defines
- Weight Shard → Loaded Model: provides parameters
- Client Runtime → Loaded Model: invokes inference
- Loaded Model → Page UI: returns results
