# nowl-solutions/mlproject architecture

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

- Interactive diagram: https://gitdiagram.com/nowl-solutions/mlproject
- Repository: https://github.com/nowl-solutions/mlproject

## Overview

NaviBay analyzes Thai song lyrics for rhyme and predicts one of seven view-count bands. The documented user flow is browser-based lyric analysis; a separate Python workflow trains and exports the prediction model from song data. The graph includes rhyme analysis, view-band modeling, and the local static server. Browser module interactions are not shown in the sampled source, so those links are marked unverified; the training and serving links are supported by excerpts or the README.

Main entry points: [`navibay/train.py`](https://github.com/nowl-solutions/mlproject/blob/main/navibay/train.py) (Training pipeline), [`navibay/dist/engine.js`](https://github.com/nowl-solutions/mlproject/blob/main/navibay/dist/engine.js) (Analysis engine), [`navibay/dist/index.html`](https://github.com/nowl-solutions/mlproject/blob/main/navibay/dist/index.html) (Analysis page), [`navibay/dist/model.js`](https://github.com/nowl-solutions/mlproject/blob/main/navibay/dist/model.js) (Browser model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_browser["Browser analysis"]
  node_webpage["Analysis page<br/>[index.html]"]
  node_app["Web app<br/>[app.js]"]
  node_engine["Analysis engine<br/>[engine.js]"]
  node_browsermodel["Browser model<br/>[model.js]"]
  node_syllables["Syllable data<br/>[syllables.js]"]
end

subgraph group_training["Model training"]
  node_dataset[("Song dataset<br/>[songs.csv]")]
  node_trainer["Training pipeline<br/>[train.py]"]
  node_metrics["Evaluation metrics<br/>[metrics.json]"]
end

subgraph group_analysis["Thai lyric analysis"]
  node_phonetics["Thai phonetics<br/>[phonetics.py]"]
end

subgraph group_serving["Local serving"]
  node_server["Static server<br/>[server.py]"]
end

node_user(("Lyric user"))
node_browser(("Web browser"))

node_user -.->|"opens"| node_webpage
node_webpage -.->|"runs in"| node_browser
node_app -.->|"uses"| node_engine
node_engine -.->|"uses"| node_browsermodel
node_engine -.->|"uses"| node_syllables
node_dataset -->|"trains from"| node_trainer
node_trainer -->|"analyzes lyrics"| node_phonetics
node_trainer -->|"exports model"| node_browsermodel
node_trainer -->|"writes metrics"| node_metrics
node_server -->|"serves files"| node_webpage

click node_webpage "https://github.com/nowl-solutions/mlproject/blob/main/navibay/dist/index.html"
click node_app "https://github.com/nowl-solutions/mlproject/blob/main/navibay/dist/app.js"
click node_engine "https://github.com/nowl-solutions/mlproject/blob/main/navibay/dist/engine.js"
click node_browsermodel "https://github.com/nowl-solutions/mlproject/blob/main/navibay/dist/model.js"
click node_syllables "https://github.com/nowl-solutions/mlproject/blob/main/navibay/dist/syllables.js"
click node_phonetics "https://github.com/nowl-solutions/mlproject/blob/main/navibay/phonetics.py"
click node_dataset "https://github.com/nowl-solutions/mlproject/blob/main/navibay/data/songs.csv"
click node_trainer "https://github.com/nowl-solutions/mlproject/blob/main/navibay/train.py"
click node_metrics "https://github.com/nowl-solutions/mlproject/blob/main/navibay/metrics.json"
click node_server "https://github.com/nowl-solutions/mlproject/blob/main/navibay/server.py"

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_webpage,node_app,node_engine,node_browsermodel,node_syllables,node_user,node_browser toneBlue
class node_dataset,node_trainer,node_metrics toneAmber
class node_phonetics toneMint
class node_server toneRose
```

## Components

### Browser analysis

- [Analysis page](https://github.com/nowl-solutions/mlproject/blob/main/navibay/dist/index.html): `navibay/dist/index.html`
- [Web app](https://github.com/nowl-solutions/mlproject/blob/main/navibay/dist/app.js): `navibay/dist/app.js`
- [Analysis engine](https://github.com/nowl-solutions/mlproject/blob/main/navibay/dist/engine.js): `navibay/dist/engine.js`
- [Browser model](https://github.com/nowl-solutions/mlproject/blob/main/navibay/dist/model.js): `navibay/dist/model.js`
- [Syllable data](https://github.com/nowl-solutions/mlproject/blob/main/navibay/dist/syllables.js): `navibay/dist/syllables.js`

### Model training

- [Song dataset](https://github.com/nowl-solutions/mlproject/blob/main/navibay/data/songs.csv): `navibay/data/songs.csv`
- [Training pipeline](https://github.com/nowl-solutions/mlproject/blob/main/navibay/train.py): `navibay/train.py`
- [Evaluation metrics](https://github.com/nowl-solutions/mlproject/blob/main/navibay/metrics.json): `navibay/metrics.json`

### Thai lyric analysis

- [Thai phonetics](https://github.com/nowl-solutions/mlproject/blob/main/navibay/phonetics.py): `navibay/phonetics.py`

### Local serving

- [Static server](https://github.com/nowl-solutions/mlproject/blob/main/navibay/server.py): `navibay/server.py`

### Other components

- **Lyric user**
- **Web browser**

## Connections

- Lyric user → Analysis page: opens
- Analysis page → Web browser: runs in
- Web app → Analysis engine: uses
- Analysis engine → Browser model: uses
- Analysis engine → Syllable data: uses
- Song dataset → Training pipeline: trains from (evidence: `navibay/train.py`)
- Training pipeline → Thai phonetics: analyzes lyrics (evidence: `navibay/train.py`)
- Training pipeline → Browser model: exports model (evidence: `navibay/train.py`)
- Training pipeline → Evaluation metrics: writes metrics (evidence: `navibay/train.py`)
- Static server → Analysis page: serves files (evidence: `navibay/server.py`)
