# hamzadenizyilmaz/gib-framework architecture

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

- Interactive diagram: https://gitdiagram.com/hamzadenizyilmaz/gib-framework
- Repository: https://github.com/hamzadenizyilmaz/gib-framework

## Overview

GIB Framework is a multi-tenant e-invoicing platform for Turkish e-Fatura and e-Arşiv workflows. Its principal flow prepares invoices, applies tax and compliance checks, then supports approval, signing, submission, and archiving; marketplace and commerce integrations can also turn incoming orders into invoices. The graph preserves major documented capabilities, including GİB Portal, messaging, and audit. Several links are documented at product level; frontend-to-backend wiring and unsampled implementation details are left unverified rather than inferred.

Main entry points: [`GIBFramework/Services/Invoices/InvoiceService.cs`](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Invoices/InvoiceService.cs) (Invoice workflow), [`GIBFramework/ClientApp/src/App.jsx`](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/ClientApp/src/App.jsx) (Web application), [`GIBFramework/Controllers`](https://github.com/hamzadenizyilmaz/gib-framework/tree/main/GIBFramework/Controllers) (REST controllers), [`GIBFramework/DAL/Invoices/InvoiceRepository.cs`](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/DAL/Invoices/InvoiceRepository.cs) (Invoice repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_web["Web application<br/>[App.jsx]"]
  node_api["REST controllers"]
end

subgraph group_invoice["Invoice lifecycle"]
  node_invoice_service["Invoice workflow<br/>[InvoiceService.cs]"]
  node_invoice_model["Invoice records<br/>[Invoice.cs]"]
  node_invoice_store[("Invoice repository")]
  node_portal_service["GİB Portal workflow"]
  node_portal_client["Portal client<br/>[GibPortalClient.cs]"]
end

subgraph group_controls["Tax and compliance"]
  node_tax_engine["Tax calculation<br/>[TaxEngine.cs]"]
  node_compliance_engine["Compliance rules"]
  node_rule_data["Rule definitions"]
end

subgraph group_documents["Documents and evidence"]
  node_ubl_writer["UBL generation"]
  node_ubl_validator["UBL validation<br/>[UblValidator.cs]"]
  node_signing["XAdES signing<br/>[XadesSigner.cs]"]
  node_pdf["PDF rendering"]
  node_evidence[("Evidence vault")]
end

subgraph group_platform["Platform services"]
  node_integrations["Order integrations"]
  node_messaging["Email and SMS"]
  node_audit[("Audit trail<br/>[SqlAuditTrail.cs]")]
  node_tenant_context["Tenant context"]
  node_sql[("SQL Server")]
end

node_user(("Tenant user"))
node_gib{{"GİB services"}}
node_external_channels{{"Mail and SMS providers"}}
node_commerce{{"Commerce platforms"}}

node_user -->|"uses"| node_web
node_web -.->|"calls API"| node_api
node_api -.->|"handles invoice actions"| node_invoice_service
node_invoice_service -->|"creates and updates"| node_invoice_model
node_invoice_service -->|"persists invoices"| node_invoice_store
node_invoice_service -.->|"validates tax"| node_tax_engine
node_invoice_service -.->|"checks rules"| node_compliance_engine
node_compliance_engine -.->|"uses rule sets"| node_rule_data
node_invoice_service -.->|"generates UBL"| node_ubl_writer
node_ubl_writer -.->|"validates output"| node_ubl_validator
node_invoice_service -.->|"signs document"| node_signing
node_invoice_service -.->|"renders PDF"| node_pdf
node_invoice_service -->|"archives evidence"| node_evidence
node_invoice_service -.->|"submits via portal"| node_portal_service
node_portal_service -.->|"uses client"| node_portal_client
node_portal_client -.->|"communicates with"| node_gib
node_commerce -->|"sends orders"| node_integrations
node_integrations -->|"creates invoices"| node_invoice_service
node_invoice_service -.->|"notifies recipients"| node_messaging
node_messaging -->|"delivers messages"| node_external_channels
node_invoice_service -->|"records actions"| node_audit
node_tenant_context -->|"scopes connections"| node_sql
node_invoice_store -.->|"reads and writes"| node_sql

click node_web "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/ClientApp/src/App.jsx"
click node_api "https://github.com/hamzadenizyilmaz/gib-framework/tree/main/GIBFramework/Controllers"
click node_invoice_service "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Invoices/InvoiceService.cs"
click node_invoice_model "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Models/Invoices/Invoice.cs"
click node_invoice_store "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/DAL/Invoices/InvoiceRepository.cs"
click node_tax_engine "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Tax/TaxEngine.cs"
click node_compliance_engine "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Compliance/ComplianceEngine.cs"
click node_rule_data "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/DAL/Compliance/JsonRuleSetLoader.cs"
click node_ubl_writer "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Ubl/UblInvoiceWriter.cs"
click node_ubl_validator "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Ubl/UblValidator.cs"
click node_signing "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Signing/XadesSigner.cs"
click node_pdf "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Documents/PdfInvoiceRenderer.cs"
click node_evidence "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Infrastructure/Storage/FileSystemEvidenceVault.cs"
click node_portal_service "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/GibPortal/GibPortalService.cs"
click node_portal_client "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Infrastructure/GibPortal/GibPortalClient.cs"
click node_integrations "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Integrations/IntegrationService.cs"
click node_messaging "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Messaging/MessageDeliveryService.cs"
click node_audit "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/DAL/Audit/SqlAuditTrail.cs"
click node_tenant_context "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Infrastructure/Tenancy/RequestTenantContext.cs"
click node_sql "https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/DAL/SqlConnectionFactory.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_web,node_api,node_user toneBlue
class node_invoice_service,node_invoice_model,node_invoice_store,node_portal_service,node_portal_client toneAmber
class node_tax_engine,node_compliance_engine,node_rule_data toneMint
class node_ubl_writer,node_ubl_validator,node_signing,node_pdf,node_evidence toneRose
class node_integrations,node_messaging,node_audit,node_tenant_context,node_sql,node_gib,node_external_channels,node_commerce toneIndigo
```

## Components

### User experience

- [Web application](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/ClientApp/src/App.jsx): `GIBFramework/ClientApp/src/App.jsx`
- [REST controllers](https://github.com/hamzadenizyilmaz/gib-framework/tree/main/GIBFramework/Controllers): `GIBFramework/Controllers`

### Invoice lifecycle

- [Invoice workflow](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Invoices/InvoiceService.cs): `GIBFramework/Services/Invoices/InvoiceService.cs`
- [Invoice records](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Models/Invoices/Invoice.cs): `GIBFramework/Models/Invoices/Invoice.cs`
- [Invoice repository](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/DAL/Invoices/InvoiceRepository.cs): `GIBFramework/DAL/Invoices/InvoiceRepository.cs`
- [GİB Portal workflow](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/GibPortal/GibPortalService.cs): `GIBFramework/Services/GibPortal/GibPortalService.cs`
- [Portal client](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Infrastructure/GibPortal/GibPortalClient.cs): `GIBFramework/Infrastructure/GibPortal/GibPortalClient.cs`

### Tax and compliance

- [Tax calculation](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Tax/TaxEngine.cs): `GIBFramework/Services/Tax/TaxEngine.cs`
- [Compliance rules](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Compliance/ComplianceEngine.cs): `GIBFramework/Services/Compliance/ComplianceEngine.cs`
- [Rule definitions](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/DAL/Compliance/JsonRuleSetLoader.cs): `GIBFramework/DAL/Compliance/JsonRuleSetLoader.cs`

### Documents and evidence

- [UBL generation](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Ubl/UblInvoiceWriter.cs): `GIBFramework/Services/Ubl/UblInvoiceWriter.cs`
- [UBL validation](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Ubl/UblValidator.cs): `GIBFramework/Services/Ubl/UblValidator.cs`
- [XAdES signing](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Signing/XadesSigner.cs): `GIBFramework/Services/Signing/XadesSigner.cs`
- [PDF rendering](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Documents/PdfInvoiceRenderer.cs): `GIBFramework/Services/Documents/PdfInvoiceRenderer.cs`
- [Evidence vault](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Infrastructure/Storage/FileSystemEvidenceVault.cs): `GIBFramework/Infrastructure/Storage/FileSystemEvidenceVault.cs`

### Platform services

- [Order integrations](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Integrations/IntegrationService.cs): `GIBFramework/Services/Integrations/IntegrationService.cs`
- [Email and SMS](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Services/Messaging/MessageDeliveryService.cs): `GIBFramework/Services/Messaging/MessageDeliveryService.cs`
- [Audit trail](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/DAL/Audit/SqlAuditTrail.cs): `GIBFramework/DAL/Audit/SqlAuditTrail.cs`
- [Tenant context](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/Infrastructure/Tenancy/RequestTenantContext.cs): `GIBFramework/Infrastructure/Tenancy/RequestTenantContext.cs`
- [SQL Server](https://github.com/hamzadenizyilmaz/gib-framework/blob/main/GIBFramework/DAL/SqlConnectionFactory.cs): `GIBFramework/DAL/SqlConnectionFactory.cs`

### Other components

- **Tenant user**
- **GİB services**
- **Mail and SMS providers**
- **Commerce platforms**

## Connections

- Tenant user → Web application: uses (evidence: `README.md`)
- Web application → REST controllers: calls API
- REST controllers → Invoice workflow: handles invoice actions
- Invoice workflow → Invoice records: creates and updates (evidence: `GIBFramework/Services/Invoices/InvoiceService.cs`)
- Invoice workflow → Invoice repository: persists invoices (evidence: `GIBFramework/Services/Invoices/InvoiceService.cs`)
- Invoice workflow → Tax calculation: validates tax (evidence: `GIBFramework/Services/Invoices/InvoiceService.cs`)
- Invoice workflow → Compliance rules: checks rules (evidence: `GIBFramework/Services/Invoices/InvoiceService.cs`)
- Compliance rules → Rule definitions: uses rule sets
- Invoice workflow → UBL generation: generates UBL (evidence: `GIBFramework/Services/Invoices/InvoiceService.cs`)
- UBL generation → UBL validation: validates output
- Invoice workflow → XAdES signing: signs document
- Invoice workflow → PDF rendering: renders PDF
- Invoice workflow → Evidence vault: archives evidence (evidence: `GIBFramework/Services/Invoices/InvoiceService.cs`)
- Invoice workflow → GİB Portal workflow: submits via portal (evidence: `GIBFramework/Services/GibPortal/GibPortalService.cs`)
- GİB Portal workflow → Portal client: uses client (evidence: `GIBFramework/Services/GibPortal/GibPortalService.cs`)
- Portal client → GİB services: communicates with
- Commerce platforms → Order integrations: sends orders (evidence: `README.md`)
- Order integrations → Invoice workflow: creates invoices (evidence: `GIBFramework/Services/Integrations/IntegrationService.cs`)
- Invoice workflow → Email and SMS: notifies recipients
- Email and SMS → Mail and SMS providers: delivers messages (evidence: `README.md`)
- Invoice workflow → Audit trail: records actions (evidence: `GIBFramework/Services/Invoices/InvoiceService.cs`)
- Tenant context → SQL Server: scopes connections (evidence: `GIBFramework/DAL/SqlConnectionFactory.cs`)
- Invoice repository → SQL Server: reads and writes
