# tochemey/netcore8583 architecture

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

- Interactive diagram: https://gitdiagram.com/tochemey/netcore8583
- Repository: https://github.com/tochemey/netcore8583

## Overview

NetCore8583 is a .NET ISO 8583 message construction and parsing library; it does not perform network I/O. Its main workflow configures a MessageFactory, which creates messages from templates or parses supplied bytes into message fields; IsoMessage can then encode the result as bytes. Separate capabilities include XML and builder-based configuration, composite/custom fields, and standalone EMV BER-TLV parsing/building. Internal wiring is based on the README and sampled factory, configuration, composite, and TLV source; unsampled subsystem links are omitted where uncertain.

Main entry points: [`NetCore8583/MessageFactory.cs`](https://github.com/tochemey/netcore8583/blob/main/NetCore8583/MessageFactory.cs) (MessageFactory), [`NetCore8583/IsoMessage.cs`](https://github.com/tochemey/netcore8583/blob/main/NetCore8583/IsoMessage.cs) (IsoMessage), [`NetCore8583/Parse`](https://github.com/tochemey/netcore8583/tree/main/NetCore8583/Parse) (Field parsers), [`NetCore8583/Tlv/TlvParser.cs`](https://github.com/tochemey/netcore8583/blob/main/NetCore8583/Tlv/TlvParser.cs) (TLV parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_configuration["Factory configuration"]
  node_builder_api["Builder API"]
  node_xml_config["XML configuration<br/>[ConfigParser.cs]"]
  node_factory["MessageFactory<br/>[MessageFactory.cs]"]
  node_factory_settings["Headers and templates<br/>[MessageFactory.cs]"]
  node_parse_maps["Parse maps"]
end

subgraph group_messages["ISO message flow"]
  node_iso_message["IsoMessage<br/>[IsoMessage.cs]"]
  node_iso_value["IsoValue<br/>[IsoValue.cs]"]
  node_bitmap["Message bitmap<br/>[Bitmap128.cs]"]
end

subgraph group_fields["Field encoding"]
  node_field_parsers["Field parsers"]
  node_field_types["ISO field types<br/>[IsoType.cs]"]
  node_composite["Composite fields<br/>[CompositeField.cs]"]
  node_custom_fields["Custom field codecs<br/>[ICustomField.cs]"]
  node_binary_codecs["Binary codecs"]
end

subgraph group_emv["EMV TLV"]
  node_tlv_parser["TLV parser<br/>[TlvParser.cs]"]
  node_tlv_builder["TLV builder<br/>[TlvBuilder.cs]"]
  node_tlv_tag["TLV tag model<br/>[TlvTag.cs]"]
  node_emv_dictionary["EMV tag dictionary<br/>[EmvTags.cs]"]
  node_tlv_extensions["Message TLV extensions"]
end

node_consumer(("Library consumer"))
node_message_bytes["ISO message bytes"]

node_consumer -->|"configures"| node_builder_api
node_consumer -->|"loads config"| node_xml_config
node_builder_api -->|"builds"| node_factory
node_xml_config -->|"configures"| node_factory
node_factory -->|"uses"| node_factory_settings
node_factory -->|"uses"| node_parse_maps
node_consumer -->|"creates or parses"| node_factory
node_message_bytes -->|"parsed by"| node_factory
node_factory -->|"creates or parses"| node_iso_message
node_factory -->|"dispatches parsing"| node_field_parsers
node_field_parsers -->|"decodes fields"| node_iso_value
node_iso_message -->|"stores fields"| node_iso_value
node_iso_message -->|"encodes presence"| node_bitmap
node_iso_message -->|"encodes to"| node_message_bytes
node_field_parsers -->|"interprets types"| node_field_types
node_composite -->|"uses subfield parsers"| node_field_parsers
node_custom_fields -->|"field decoding"| node_factory
node_binary_codecs -->|"encodes values"| node_iso_value
node_consumer -->|"parses TLV"| node_tlv_parser
node_tlv_parser -->|"produces tags"| node_tlv_tag
node_tlv_parser -->|"looks up descriptions"| node_emv_dictionary
node_consumer -->|"builds TLV"| node_tlv_builder
node_tlv_builder -->|"serializes tags"| node_tlv_tag
node_tlv_extensions -->|"parses field data"| node_tlv_parser
node_tlv_extensions -->|"builds field data"| node_tlv_builder
node_tlv_extensions -->|"reads or updates"| node_iso_message

click node_builder_api "https://github.com/tochemey/netcore8583/tree/main/NetCore8583/Builder"
click node_xml_config "https://github.com/tochemey/netcore8583/blob/main/NetCore8583/Parse/ConfigParser.cs"
click node_factory "https://github.com/tochemey/netcore8583/blob/main/NetCore8583/MessageFactory.cs"
click node_factory_settings "https://github.com/tochemey/netcore8583/blob/main/NetCore8583/MessageFactory.cs"
click node_parse_maps "https://github.com/tochemey/netcore8583/tree/main/NetCore8583/Parse"
click node_iso_message "https://github.com/tochemey/netcore8583/blob/main/NetCore8583/IsoMessage.cs"
click node_iso_value "https://github.com/tochemey/netcore8583/blob/main/NetCore8583/IsoValue.cs"
click node_bitmap "https://github.com/tochemey/netcore8583/blob/main/NetCore8583/Extensions/Bitmap128.cs"
click node_field_parsers "https://github.com/tochemey/netcore8583/tree/main/NetCore8583/Parse"
click node_field_types "https://github.com/tochemey/netcore8583/blob/main/NetCore8583/IsoType.cs"
click node_composite "https://github.com/tochemey/netcore8583/blob/main/NetCore8583/Codecs/CompositeField.cs"
click node_custom_fields "https://github.com/tochemey/netcore8583/blob/main/NetCore8583/ICustomField.cs"
click node_binary_codecs "https://github.com/tochemey/netcore8583/tree/main/NetCore8583/Codecs"
click node_tlv_parser "https://github.com/tochemey/netcore8583/blob/main/NetCore8583/Tlv/TlvParser.cs"
click node_tlv_builder "https://github.com/tochemey/netcore8583/blob/main/NetCore8583/Tlv/TlvBuilder.cs"
click node_tlv_tag "https://github.com/tochemey/netcore8583/blob/main/NetCore8583/Tlv/TlvTag.cs"
click node_emv_dictionary "https://github.com/tochemey/netcore8583/blob/main/NetCore8583/Tlv/EmvTags.cs"
click node_tlv_extensions "https://github.com/tochemey/netcore8583/blob/main/NetCore8583/Tlv/IsoMessageTlvExtensions.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_builder_api,node_xml_config,node_factory,node_factory_settings,node_parse_maps toneBlue
class node_iso_message,node_iso_value,node_bitmap toneAmber
class node_field_parsers,node_field_types,node_composite,node_custom_fields,node_binary_codecs toneMint
class node_tlv_parser,node_tlv_builder,node_tlv_tag,node_emv_dictionary,node_tlv_extensions toneRose
class node_consumer,node_message_bytes toneIndigo
```

## Components

### Factory configuration

- [Builder API](https://github.com/tochemey/netcore8583/tree/main/NetCore8583/Builder): `NetCore8583/Builder`
- [XML configuration](https://github.com/tochemey/netcore8583/blob/main/NetCore8583/Parse/ConfigParser.cs): `NetCore8583/Parse/ConfigParser.cs`
- [MessageFactory](https://github.com/tochemey/netcore8583/blob/main/NetCore8583/MessageFactory.cs): `NetCore8583/MessageFactory.cs`
- [Headers and templates](https://github.com/tochemey/netcore8583/blob/main/NetCore8583/MessageFactory.cs): `NetCore8583/MessageFactory.cs`
- [Parse maps](https://github.com/tochemey/netcore8583/tree/main/NetCore8583/Parse): `NetCore8583/Parse`

### ISO message flow

- [IsoMessage](https://github.com/tochemey/netcore8583/blob/main/NetCore8583/IsoMessage.cs): `NetCore8583/IsoMessage.cs`
- [IsoValue](https://github.com/tochemey/netcore8583/blob/main/NetCore8583/IsoValue.cs): `NetCore8583/IsoValue.cs`
- [Message bitmap](https://github.com/tochemey/netcore8583/blob/main/NetCore8583/Extensions/Bitmap128.cs): `NetCore8583/Extensions/Bitmap128.cs`

### Field encoding

- [Field parsers](https://github.com/tochemey/netcore8583/tree/main/NetCore8583/Parse): `NetCore8583/Parse`
- [ISO field types](https://github.com/tochemey/netcore8583/blob/main/NetCore8583/IsoType.cs): `NetCore8583/IsoType.cs`
- [Composite fields](https://github.com/tochemey/netcore8583/blob/main/NetCore8583/Codecs/CompositeField.cs): `NetCore8583/Codecs/CompositeField.cs`
- [Custom field codecs](https://github.com/tochemey/netcore8583/blob/main/NetCore8583/ICustomField.cs): `NetCore8583/ICustomField.cs`
- [Binary codecs](https://github.com/tochemey/netcore8583/tree/main/NetCore8583/Codecs): `NetCore8583/Codecs`

### EMV TLV

- [TLV parser](https://github.com/tochemey/netcore8583/blob/main/NetCore8583/Tlv/TlvParser.cs): `NetCore8583/Tlv/TlvParser.cs`
- [TLV builder](https://github.com/tochemey/netcore8583/blob/main/NetCore8583/Tlv/TlvBuilder.cs): `NetCore8583/Tlv/TlvBuilder.cs`
- [TLV tag model](https://github.com/tochemey/netcore8583/blob/main/NetCore8583/Tlv/TlvTag.cs): `NetCore8583/Tlv/TlvTag.cs`
- [EMV tag dictionary](https://github.com/tochemey/netcore8583/blob/main/NetCore8583/Tlv/EmvTags.cs): `NetCore8583/Tlv/EmvTags.cs`
- [Message TLV extensions](https://github.com/tochemey/netcore8583/blob/main/NetCore8583/Tlv/IsoMessageTlvExtensions.cs): `NetCore8583/Tlv/IsoMessageTlvExtensions.cs`

### Other components

- **Library consumer**
- **ISO message bytes**

## Connections

- Library consumer → Builder API: configures
- Library consumer → XML configuration: loads config
- Builder API → MessageFactory: builds
- XML configuration → MessageFactory: configures
- MessageFactory → Headers and templates: uses
- MessageFactory → Parse maps: uses
- Library consumer → MessageFactory: creates or parses
- ISO message bytes → MessageFactory: parsed by
- MessageFactory → IsoMessage: creates or parses
- MessageFactory → Field parsers: dispatches parsing
- Field parsers → IsoValue: decodes fields
- IsoMessage → IsoValue: stores fields
- IsoMessage → Message bitmap: encodes presence
- IsoMessage → ISO message bytes: encodes to
- Field parsers → ISO field types: interprets types
- Composite fields → Field parsers: uses subfield parsers
- Custom field codecs → MessageFactory: field decoding
- Binary codecs → IsoValue: encodes values
- Library consumer → TLV parser: parses TLV
- TLV parser → TLV tag model: produces tags
- TLV parser → EMV tag dictionary: looks up descriptions
- Library consumer → TLV builder: builds TLV
- TLV builder → TLV tag model: serializes tags
- Message TLV extensions → TLV parser: parses field data
- Message TLV extensions → TLV builder: builds field data
- Message TLV extensions → IsoMessage: reads or updates
