# intuit/quickbooks-v3-dotnet-sdk architecture

> Architecture diagram of the GitHub repository intuit/quickbooks-v3-dotnet-sdk, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/intuit/quickbooks-v3-dotnet-sdk
- Repository: https://github.com/intuit/quickbooks-v3-dotnet-sdk

## Overview

##### Core Architectural Layers
- Data Projects:
– Include the “XsdExtension” tool and the “Intuit.Ipp.Data” project that generate and maintain classes based on the QuickBooks Online V3 service schema. These form the foundation for the strongly typed API objects.
- Core & Common Functionality:
– Represent the “Intuit.Ipp.Core” component which manages configuration, sync/async request handling, callbacks and retry policies.
– Also include the “Intuit.Ipp.Utility” (serialization, deserialization, compression and config management), “Intuit.Ipp.QueryFilter” (query logic) libraries, and the “Intuit.Ipp.Diagnostics” and “Intuit.Ipp.Exception” projects (logging and exception handling).
- Service Layer:
– Encompass the service projects such as “Intuit.Ipp.DataService” (for CRUD and batch operations on QuickBooks entities), “Intuit.Ipp.EntitlementService”, “Intuit.Ipp.GlobalTaxService”, “Intuit.Ipp.ReportService” and “Intuit.Ipp.WebHooksService” that provide APIs for specific functional areas.
- Security & Authorization:
– Include “Intuit.Ipp.OAuth2PlatformClient” which manages OAuth2 flows and logging, and “Intuit.Ipp.Security” which creates authorization headers and handles token-based security.
- Packaging and Distribution:
– Represent the “Intuit.Ipp.Nupkg” project which handles NuGet packaging, versioning and dependency configuration.
- Tests & Samples:
– Add a section for test projects (unit and integration tests found under the Code and Test folders) and for sample/template projects (such as the Installer and Template folders that provide sample apps for both ASP.NET and MVC).

##### Relationships and Interactions
- All Service Projects depend on the Core libraries (Ipp.Core, Ipp.Utility, Ipp.QueryFilter) for common tasks such as configuration management, request/response handling, retry logic and serialization.
- The Security components (OAuth2PlatformClient and Ipp.Security) supply authorization tokens and headers that are used by the Core and Service layers.
- The Data Projects (XsdExtension + Intuit.Ipp.Data) output schema-based classes which are then consumed by the Service components.
- Cross-cutting concerns like logging (via Ipp.Diagnostics) and error handling (via Ipp.Exception) span across all layers.
- Test projects interact with all components (core, service, security, etc.) to validate functionality.
- Packaging (NuGet project) consumes outputs from all libraries, preparing the final SDK distribution.

##### Representing Technologies, Frameworks, and Patterns
- Clearly label that this SDK is built using .NET Standard 2.0 while also supporting .NET Full Framework (4.6.1, 4.7.2) and .NET Core, which clarifies the cross-platform and multi-target support.
- That the SDK uses configuration-based settings (app.config), along with embedded logging capabilities that support Serilog, Fiddler trace logging and customizable log sink options.
- That the project follows a modular pattern, where each module (Data Projects, Core Libraries, Service Projects, Security) is separated to enhance maintainability and reusability.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Data Projects Subgraph
    subgraph "Data Projects"
        XSD1["XsdExtension"] 
        DataProj["Intuit.Ipp.Data"]
    end

    %% Core & Common Functionality Subgraph
    subgraph "Core & Common Functionality"
        Core["Intuit.Ipp.Core"]
        Util["Intuit.Ipp.Utility"]
        Query["Intuit.Ipp.QueryFilter"]
        Diag["Intuit.Ipp.Diagnostics"]
        Excep["Intuit.Ipp.Exception"]
    end

    %% Service Projects Subgraph
    subgraph "Service Projects"
        DS["DataService"]
        ES["EntitlementService"]
        GTS["GlobalTaxService"]
        RS["ReportService"]
        WHS["WebHooksService"]
    end

    %% Security & Authorization Subgraph
    subgraph "Security & Authorization"
        OAuth["OAuth2PlatformClient"]
        Sec["Intuit.Ipp.Security"]
    end

    %% Packaging & Distribution Subgraph
    subgraph "Packaging & Distribution"
        Nupkg["Intuit.Ipp.Nupkg"]
    end

    %% Tests & Samples Subgraph
    subgraph "Tests & Samples"
        Tests["Test Projects"]
        Inst["Installer"]
        Temp["Templates"]
    end

    %% Relationships and Interactions
    %% Data Projects ==> Service Projects
    XSD1 -->|"schemas"| DS
    DataProj -->|"classes"| DS

    %% Core & Common Functionality ==> Service Projects
    Core -->|"config/request"| DS
    Util -->|"utility"| DS
    Query -->|"filtering"| DS
    Diag -->|"logging"| DS
    Excep -->|"errorHandling"| DS

    %% Security & Authorization ==> Core & Common Functionality and Service Projects
    OAuth -->|"authTokens"| Core
    Sec -->|"securityHeaders"| DS

    %% Packaging & Distribution receives outputs from Service and Core layers
    DS -->|"SDKOutput"| Nupkg
    Core -->|"packaging"| Nupkg

    %% Tests & Samples interact with core components
    Tests -->|"validate"| Core
    Tests -->|"validate"| DS
    Tests -->|"validate"| OAuth

    %% Legend Subgraph
    subgraph "Legend"
        L1["Data Projects (Teal)"]:::data
        L2["Core & Common (Blue)"]:::core
        L3["Service Projects (Green)"]:::service
        L4["Security & Auth (Red)"]:::security
        L5["Packaging (Purple)"]:::packaging
        L6["Tests & Samples (Light Blue)"]:::tests
    end

    %% Click Events for Component Mapping
    click XSD1 "https://github.com/intuit/quickbooks-v3-dotnet-sdk/blob/master/IPPDotNetDevKitCSV3/Tools/XsdExtension/Intuit.Ipp.XsdExtension"
    click DataProj "https://github.com/intuit/quickbooks-v3-dotnet-sdk/blob/master/IPPDotNetDevKitCSV3/Tools/XsdExtension/Intuit.Ipp.Data"
    click Core "https://github.com/intuit/quickbooks-v3-dotnet-sdk/blob/master/IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Core"
    click Util "https://github.com/intuit/quickbooks-v3-dotnet-sdk/blob/master/IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Utility"
    click Query "https://github.com/intuit/quickbooks-v3-dotnet-sdk/blob/master/IPPDotNetDevKitCSV3/Code/Intuit.Ipp.QueryFilter"
    click Diag "https://github.com/intuit/quickbooks-v3-dotnet-sdk/blob/master/IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Diagnostics"
    click Excep "https://github.com/intuit/quickbooks-v3-dotnet-sdk/blob/master/IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Exception"
    click DS "https://github.com/intuit/quickbooks-v3-dotnet-sdk/blob/master/IPPDotNetDevKitCSV3/Code/Intuit.Ipp.DataService"
    click ES "https://github.com/intuit/quickbooks-v3-dotnet-sdk/blob/master/IPPDotNetDevKitCSV3/Code/Intuit.Ipp.EntitlementService"
    click GTS "https://github.com/intuit/quickbooks-v3-dotnet-sdk/blob/master/IPPDotNetDevKitCSV3/Code/Intuit.Ipp.GlobalTaxService"
    click RS "https://github.com/intuit/quickbooks-v3-dotnet-sdk/blob/master/IPPDotNetDevKitCSV3/Code/Intuit.Ipp.ReportService"
    click WHS "https://github.com/intuit/quickbooks-v3-dotnet-sdk/blob/master/IPPDotNetDevKitCSV3/Code/Intuit.Ipp.WebHooksService"
    click OAuth "https://github.com/intuit/quickbooks-v3-dotnet-sdk/blob/master/IPPDotNetDevKitCSV3/Code/Intuit.Ipp.OAuth2PlatformClient"
    click Sec "https://github.com/intuit/quickbooks-v3-dotnet-sdk/blob/master/IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Security"
    click Nupkg "https://github.com/intuit/quickbooks-v3-dotnet-sdk/blob/master/IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Nupkg"
    click Tests "https://github.com/intuit/quickbooks-v3-dotnet-sdk/tree/master/IPPDotNetDevKitCSV3/Test"
    click Inst "https://github.com/intuit/quickbooks-v3-dotnet-sdk/tree/master/Installer"
    click Temp "https://github.com/intuit/quickbooks-v3-dotnet-sdk/tree/master/Template"

    %% Class Definitions for Colors
    classDef data fill:#80cbc4,stroke:#00695c,stroke-width:2px;
    classDef core fill:#9ec2e6,stroke:#1565c0,stroke-width:2px;
    classDef service fill:#b9f6ca,stroke:#00c853,stroke-width:2px;
    classDef security fill:#ffab91,stroke:#d84315,stroke-width:2px;
    classDef packaging fill:#ce93d8,stroke:#6a1b9a,stroke-width:2px;
    classDef tests fill:#b3e5fc,stroke:#0277bd,stroke-width:2px;

    %% Assign Classes to Nodes
    class XSD1,DataProj data;
    class Core,Util,Query,Diag,Excep core;
    class DS,ES,GTS,RS,WHS service;
    class OAuth,Sec security;
    class Nupkg packaging;
    class Tests,Inst,Temp tests;
```
