# murcex/m-core architecture

> Architecture diagram of the GitHub repository murcex/m-core, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/murcex/m-core
- Repository: https://github.com/murcex/m-core

## Overview

##### Project type and purpose
- This is a monorepo hosting multiple .NET solutions (Configurator, Crane, Implements, KirokuG2, PlyQor, Sensor), each exposing C# Azure Functions (Function apps) or CLI tools (Crane) backed by SQL Server scripts.
- Purpose: provide a suite of domain-specific microservices and libraries for configuration, auditing, data ingestion/processing (KirokuG2, PlyQor, Sensor) plus a standalone SQL-deployment CLI (Crane) and shared “Implements” modules (serialization, encryption, logging).

##### File structure
- Top-level folders = distinct products or modules.
- `<Product>/…-database` contains SQL schema/procs.
- `<Product>/*-solution` contains one or more Azure Function projects (`Function.Injektr`, `Function.Processor`, `Function.Service`, `Function.Storage`, `Function.Scanner`, etc.), each with `host.json` and triggers in `Functions/`.
- Within solutions there’s an `Internal.Engine` library (business logic + data-access components) and a client SDK project (`Module.Client`).
- `Implements` holds reusable modules (configuration, conversion, encryption, logging).
- `Crane` is a console-app solution with a core engine and SQL deployment tasks.
- `Modules/…nupkg` holds built NuGet packages.

##### Key insights from README
- Minimal direct insight; directs to broader “M Apps” documentation.
- Confirms this is part of a larger product family (“M-Apps”).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% External and Shared Feeds
    subgraph "External Application"
        ExtApp["External App"]:::client
    end

    subgraph "NuGet Package Feed"
        NuGet["Modules/*.nupkg"]:::nuget
    end

    %% Implements Modules
    subgraph "Implements Modules"
        IAudit["Implements.Application.Audit"]:::implement
        IConfig["Implements.Module.Configuration"]:::implement
        IConv["Implements.Module.Converter"]:::implement
        IDeser["Implements.Module.Deserializer"]:::implement
        IEncrypt["Implements.Module.Encryption"]:::implement
        ILogger["Implements.Module.Logger"]:::implement
    end

    %% Configurator Product
    subgraph "Configurator"
        CClient["Configurator.Module.Client"]:::client
        CAuditDefault["Configurator.Function.Audit.Default (HTTP)"]:::functionApp
        CAuditEmbedded["Configurator.Function.Audit.Embedded (HTTP)"]:::functionApp
        CAuditMemory["Configurator.Function.Audit.Memory (HTTP)"]:::functionApp
        CService["Configurator.Function.Service (HTTP)"]:::functionApp
        CEngine["Configurator.Internal.Storage"]:::engine
        CDB["ConfiguratorDB"]:::db
    end

    %% KirokuG2 Product
    subgraph "KirokuG2"
        K2Client["KirokuG2.Module.Client"]:::client
        K2Injektr["KirokuG2.Function.Injektr (HTTP)"]:::functionApp
        K2Processor["KirokuG2.Function.Processor (Timer)"]:::functionApp
        K2Service["KirokuG2.Function.Service (HTTP)"]:::functionApp
        K2Engine["KirokuG2.Internal.Loader"]:::engine
        K2DB["KirokuG2DB"]:::db
    end

    %% PlyQor Product
    subgraph "PlyQor"
        PClient["PlyQor.Module.Client"]:::client
        PInjektr["PlyQor.Function.Injektr (HTTP)"]:::functionApp
        PStorage["PlyQor.Function.Storage (Timer)"]:::functionApp
        PEngine["PlyQor.Internal.Engine"]:::engine
        PDB["PlyQorDB"]:::db
    end

    %% Sensor Product
    subgraph "Sensor"
        SScanner["Sensor.Function.Scanner (Event)"]:::functionApp
        SEngine["Sensor.Internal.Engine"]:::engine
        SDB["SensorDB"]:::db
    end

    %% Crane CLI Tool
    subgraph "Crane CLI"
        CLICrane["Crane (console)"]:::client
        CEngineCrane["Crane.Internal.Engine"]:::engine
    end

    %% Connections: External -> Client -> Functions -> Engine -> DB
    ExtApp --> CClient
    CClient --> CService
    CService --> CEngine
    CEngine --> CDB

    ExtApp --> K2Client
    K2Client --> K2Service
    K2Service --> K2Engine
    K2Engine --> K2DB

    ExtApp --> PClient
    PClient --> PInjektr
    PInjektr --> PEngine
    PEngine --> PDB

    %% Sensor Flow
    SScanner --> SEngine
    SEngine --> SDB

    %% Timer/Processor Flows
    K2Processor --> K2Engine
    PStorage --> PEngine

    %% Crane CLI flows
    CLICrane --> CEngineCrane
    CEngineCrane --> CDB
    CEngineCrane --> K2DB
    CEngineCrane --> PDB
    CEngineCrane --> SDB

    %% Implements usage
    IAudit --> CAuditDefault
    IAudit --> CAuditEmbedded
    IAudit --> CAuditMemory
    IConfig --> CEngine
    IConv --> CEngine
    IDeser --> CEngine
    IEncrypt --> CEngine
    ILogger --> CEngine

    IAudit --> K2Engine
    IConfig --> K2Engine
    IConv --> K2Engine
    IDeser --> K2Engine
    IEncrypt --> K2Engine
    ILogger --> K2Engine

    IAudit --> PEngine
    IConfig --> PEngine
    IConv --> PEngine
    IDeser --> PEngine
    IEncrypt --> PEngine
    ILogger --> PEngine

    IAudit --> SEngine
    IConfig --> SEngine
    IConv --> SEngine
    IDeser --> SEngine
    IEncrypt --> SEngine
    ILogger --> SEngine

    %% NuGet feed
    CClient --> NuGet
    K2Client --> NuGet
    PClient --> NuGet
    IAudit --> NuGet
    IConfig --> NuGet
    IConv --> NuGet
    IDeser --> NuGet
    IEncrypt --> NuGet
    ILogger --> NuGet
    CEngine --> NuGet
    K2Engine --> NuGet
    PEngine --> NuGet
    SEngine --> NuGet

    %% Click events
    click CAuditDefault "https://github.com/murcex/m-core/blob/master/Configurator/configurator-solution/Configurator.Function.Audit.Default"
    click CAuditEmbedded "https://github.com/murcex/m-core/blob/master/Configurator/configurator-solution/Configurator.Function.Audit.Embedded"
    click CAuditMemory "https://github.com/murcex/m-core/blob/master/Configurator/configurator-solution/Configurator.Function.Audit.Memory"
    click CService "https://github.com/murcex/m-core/blob/master/Configurator/configurator-solution/Configurator.Function.Service"
    click CEngine "https://github.com/murcex/m-core/blob/master/Configurator/configurator-solution/Configurator.Internal.Storage"
    click CClient "https://github.com/murcex/m-core/blob/master/Configurator/configurator-solution/Configurator.Module.Client"
    click K2DB "https://github.com/murcex/m-core/tree/master/KirokuG2/kirokug2-database"
    click K2Injektr "https://github.com/murcex/m-core/blob/master/KirokuG2/kirokug2-solution/KirokuG2.Function.Injektr"
    click K2Processor "https://github.com/murcex/m-core/blob/master/KirokuG2/kirokug2-solution/KirokuG2.Function.Processor"
    click K2Service "https://github.com/murcex/m-core/blob/master/KirokuG2/kirokug2-solution/KirokuG2.Function.Service"
    click K2Engine "https://github.com/murcex/m-core/blob/master/KirokuG2/kirokug2-solution/KirokuG2.Internal.Loader"
    click K2Client "https://github.com/murcex/m-core/blob/master/KirokuG2/kirokug2-solution/KirokuG2.Module.Client"
    click CLICrane "https://github.com/murcex/m-core/tree/master/Crane/crane-deploysql/Crane"
    click CEngineCrane "https://github.com/murcex/m-core/blob/master/Crane/crane-solution/Crane/Crane.Internal.Engine"
    click IAudit "https://github.com/murcex/m-core/blob/master/Implements/implements-solution/Implements.Application.Audit"
    click IConfig "https://github.com/murcex/m-core/blob/master/Implements/implements-solution/Implements.Module.Configuration"
    click IConv "https://github.com/murcex/m-core/blob/master/Implements/implements-solution/Implements.Module.Converter"
    click IDeser "https://github.com/murcex/m-core/blob/master/Implements/implements-solution/Implements.Module.Deserializer"
    click IEncrypt "https://github.com/murcex/m-core/blob/master/Implements/implements-solution/Implements.Module.Encryption"
    click ILogger "https://github.com/murcex/m-core/blob/master/Implements/implements-solution/Implements.Module.Logger"
    click PDB "https://github.com/murcex/m-core/tree/master/PlyQor/plyqor-database"
    click PInjektr "https://github.com/murcex/m-core/blob/master/PlyQor/plyqor-solution/PlyQor.Function.Injektr"
    click PStorage "https://github.com/murcex/m-core/blob/master/PlyQor/plyqor-solution/PlyQor.Function.Storage"
    click PEngine "https://github.com/murcex/m-core/blob/master/PlyQor/plyqor-solution/PlyQor.Internal.Engine"
    click PClient "https://github.com/murcex/m-core/blob/master/PlyQor/plyqor-solution/PlyQor.Module.Client"
    click SDB "https://github.com/murcex/m-core/tree/master/Sensor/sensor-database"
    click SScanner "https://github.com/murcex/m-core/blob/master/Sensor/sensor-solution/Sensor.Function.Scanner"
    click SEngine "https://github.com/murcex/m-core/blob/master/Sensor/sensor-solution/Sensor.Internal.Engine"

    %% Styles
    classDef functionApp fill:#B3D4FC,stroke:#1E70BF,color:#000
    classDef engine fill:#FFD699,stroke:#B37400,color:#000
    classDef db fill:#C6F6D5,stroke:#2F855A,color:#000
    classDef client fill:#E2E8F0,stroke:#4A5568,color:#000
    classDef implement fill:#E9D8FD,stroke:#6B46C1,color:#000
    classDef nuget fill:#FEF3C7,stroke:#D97706,color:#000
```
