# ahmadluqman48/nmeaaisparser architecture

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

- Interactive diagram: https://gitdiagram.com/ahmadluqman48/nmeaaisparser
- Repository: https://github.com/ahmadluqman48/nmeaaisparser

## Overview

NMEA / AIS Workbench is an ASP.NET Core MVC web app and JSON API for validating and parsing NMEA sentences, decoding supported AIS messages, and generating AIS Type 1 and Type 5 sentences. The main workflow runs from browser input through HomeController to the relevant parser or generator, then returns results to the web UI or API caller. AIS services share a bit-packing layer; Type 5 generation emits two NMEA sentences. The source excerpts show these core routes and service calls; other README capabilities are represented only where documented.

Main entry points: [`Controllers/HomeController.cs`](https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Controllers/HomeController.cs) (Home controller), [`Services/ParserServices.cs`](https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Services/ParserServices.cs) (Type 1 service), [`Views/Home/Index.cshtml`](https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Views/Home/Index.cshtml) (Workbench UI), [`Program.cs`](https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Program.cs) (ASP.NET app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_view["Workbench UI<br/>[Index.cshtml]"]
  node_clientjs["UI interactions<br/>[site.js]"]
  node_models["Inputs and results<br/>[Models.cs]"]
end

subgraph group_routing["Request handling"]
  node_app["ASP.NET app<br/>[Program.cs]"]
  node_controller["Home controller<br/>[HomeController.cs]"]
end

subgraph group_ais["AIS operations"]
  node_type1["Type 1 service<br/>[ParserServices.cs]"]
  node_type5["Type 5 service<br/>[ParserServices.cs]"]
end

subgraph group_core["Parsing and encoding"]
  node_nmea["NMEA parser<br/>[ParserServices.cs]"]
  node_bits["AIS bit codec<br/>[ParserServices.cs]"]
end

node_browser(("Browser user"))

node_app -->|"routes requests"| node_controller
node_browser -->|"opens workbench"| node_view
node_view -->|"uses scripts"| node_clientjs
node_browser -->|"submits forms or API"| node_controller
node_controller -->|"returns results"| node_view
node_controller -->|"reads and updates"| node_models
node_controller -->|"parses NMEA"| node_nmea
node_controller -->|"generates or parses"| node_type1
node_controller -->|"generates or parses"| node_type5
node_controller -->|"peeks AIS type"| node_bits
node_type1 -->|"encodes or decodes"| node_bits
node_type1 -->|"parses sentence"| node_nmea
node_type5 -->|"encodes or decodes"| node_bits
node_type5 -->|"parses sentences"| node_nmea

click node_app "https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Program.cs"
click node_controller "https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Controllers/HomeController.cs"
click node_view "https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Views/Home/Index.cshtml"
click node_clientjs "https://github.com/ahmadluqman48/nmeaaisparser/blob/master/wwwroot/js/site.js"
click node_models "https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Models/Models.cs"
click node_nmea "https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Services/ParserServices.cs"
click node_bits "https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Services/ParserServices.cs"
click node_type1 "https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Services/ParserServices.cs"
click node_type5 "https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Services/ParserServices.cs"

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_view,node_clientjs,node_models,node_browser toneBlue
class node_app,node_controller toneAmber
class node_type1,node_type5 toneMint
class node_nmea,node_bits toneRose
```

## Components

### Web interface

- [Workbench UI](https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Views/Home/Index.cshtml): `Views/Home/Index.cshtml`
- [UI interactions](https://github.com/ahmadluqman48/nmeaaisparser/blob/master/wwwroot/js/site.js): `wwwroot/js/site.js`
- [Inputs and results](https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Models/Models.cs): `Models/Models.cs`

### Request handling

- [ASP.NET app](https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Program.cs): `Program.cs`
- [Home controller](https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Controllers/HomeController.cs): `Controllers/HomeController.cs`

### AIS operations

- [Type 1 service](https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Services/ParserServices.cs): `Services/ParserServices.cs`
- [Type 5 service](https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Services/ParserServices.cs): `Services/ParserServices.cs`

### Parsing and encoding

- [NMEA parser](https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Services/ParserServices.cs): `Services/ParserServices.cs`
- [AIS bit codec](https://github.com/ahmadluqman48/nmeaaisparser/blob/master/Services/ParserServices.cs): `Services/ParserServices.cs`

### Other components

- **Browser user**

## Connections

- ASP.NET app → Home controller: routes requests
- Browser user → Workbench UI: opens workbench
- Workbench UI → UI interactions: uses scripts
- Browser user → Home controller: submits forms or API
- Home controller → Workbench UI: returns results
- Home controller → Inputs and results: reads and updates
- Home controller → NMEA parser: parses NMEA
- Home controller → Type 1 service: generates or parses
- Home controller → Type 5 service: generates or parses
- Home controller → AIS bit codec: peeks AIS type
- Type 1 service → AIS bit codec: encodes or decodes
- Type 1 service → NMEA parser: parses sentence
- Type 5 service → AIS bit codec: encodes or decodes
- Type 5 service → NMEA parser: parses sentences
