# aliqadorah/direct-service-transportation-system architecture

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

- Interactive diagram: https://gitdiagram.com/aliqadorah/direct-service-transportation-system
- Repository: https://github.com/aliqadorah/direct-service-transportation-system

## Overview

DirectService is a multi-tenant business application combining transportation operations, accounting, and platform administration. Users enter through the web client and server; domain services support operational records, invoicing and cash, accounting and reports, while platform services handle identity, companies, and tenants. The tree also shows shared collaboration, imports, files, and reporting capabilities. Source evidence is limited: the README is empty and many modules were not sampled, so uncertain wiring is omitted or marked unverified.

Main entry points: [`src/Modules/Accounting/DirectService.Accounting.Infrastructure/Http/AccountingEndpoints.cs`](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Accounting/DirectService.Accounting.Infrastructure/Http/AccountingEndpoints.cs) (Accounting API), [`src/Shared/DirectService.Shared.Infrastructure/Persistence/MasterDbContext.cs`](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Shared/DirectService.Shared.Infrastructure/Persistence/MasterDbContext.cs) (Master database), [`src/Hosts/DirectService.Web/Program.cs`](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Hosts/DirectService.Web/Program.cs) (Web host), [`src/Hosts/DirectService.Web.Client/Program.cs`](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Hosts/DirectService.Web.Client/Program.cs) (Web client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_client["Web client<br/>[Program.cs]"]
  node_server["Web host<br/>[Program.cs]"]
  node_authapi["Auth endpoints<br/>[AuthEndpoints.cs]"]
  node_live["Live collaboration<br/>[LiveHub.cs]"]
end

subgraph group_transport["Transportation operations"]
  node_trips["Trips and masters<br/>[TripService.cs]"]
  node_tariffs["Tariffs<br/>[TariffService.cs]"]
  node_invoices["Transport invoicing<br/>[InvoiceService.cs]"]
  node_cash["Cash and settlement"]
  node_transportreports["Transport reports"]
end

subgraph group_accounting["Accounting"]
  node_journal["Journal posting<br/>[PostingEngine.cs]"]
  node_books["Accounting books"]
  node_apar["Payables and receivables"]
  node_budgets["Budgets<br/>[BudgetService.cs]"]
  node_ledger["Ledger reporting"]
  node_accountingapi["Accounting API"]
  node_einvoice["E-invoicing<br/>[EInvoiceWorker.cs]"]
end

subgraph group_platform["Platform services"]
  node_identity["Identity and sessions<br/>[AuthService.cs]"]
  node_session["Session lifecycle<br/>[SessionService.cs]"]
  node_tenant["Tenant lifecycle"]
  node_company["Company settings"]
end

subgraph group_shared["Shared infrastructure"]
  node_masterdb[("Master database<br/>[MasterDbContext.cs]")]
  node_dbcontract["Database contract<br/>[IAppDbContext.cs]"]
  node_search["Global search"]
  node_spreadsheet["Spreadsheet tools"]
  node_reports["Report builder"]
  node_exports["Exports<br/>[ExportService.cs]"]
end

node_user(("Business user"))

node_user -->|"uses"| node_client
node_client -.->|"calls API"| node_server
node_server -.->|"hosts"| node_authapi
node_server -.->|"hosts"| node_accountingapi
node_server -->|"configures"| node_masterdb
node_authapi -.->|"delegates to"| node_identity
node_identity -->|"uses"| node_dbcontract
node_session -->|"uses"| node_dbcontract
node_dbcontract -->|"implemented by"| node_masterdb
node_client -->|"uses lookups"| node_trips
node_trips -.->|"supports"| node_invoices
node_tariffs -.->|"supports pricing"| node_invoices
node_cash -.->|"settles"| node_invoices
node_accountingapi -.->|"routes to"| node_apar
node_accountingapi -.->|"routes to"| node_budgets
node_accountingapi -.->|"routes to"| node_ledger
node_journal -->|"uses"| node_dbcontract
node_einvoice -.->|"processes documents"| node_apar
node_accountingapi -.->|"configures"| node_einvoice
node_search -.->|"queries"| node_masterdb
node_reports -.->|"queries"| node_masterdb
node_exports -.->|"reads data"| node_masterdb
node_spreadsheet -.->|"provides file exchange"| node_client

click node_client "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Hosts/DirectService.Web.Client/Program.cs"
click node_server "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Hosts/DirectService.Web/Program.cs"
click node_authapi "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Hosts/DirectService.Web/Endpoints/AuthEndpoints.cs"
click node_live "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Hosts/DirectService.Web/Realtime/LiveHub.cs"
click node_trips "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Transportation/DirectService.Transportation.Application/Trips/TripService.cs"
click node_tariffs "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Transportation/DirectService.Transportation.Application/Pricing/TariffService.cs"
click node_invoices "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Transportation/DirectService.Transportation.Application/Invoicing/InvoiceService.cs"
click node_cash "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Transportation/DirectService.Transportation.Application/Cash/SettlementService.cs"
click node_transportreports "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Transportation/DirectService.Transportation.Application/Reports/StandardReportService.cs"
click node_journal "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Accounting/DirectService.Accounting.Application/Posting/PostingEngine.cs"
click node_books "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Accounting/DirectService.Accounting.Application/Books/ChartOfAccountsService.cs"
click node_apar "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Accounting/DirectService.Accounting.Application/ApAr/ApArDocumentService.cs"
click node_budgets "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Accounting/DirectService.Accounting.Application/Budgets/BudgetService.cs"
click node_ledger "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Accounting/DirectService.Accounting.Application/Ledger/LedgerReportService.cs"
click node_accountingapi "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Accounting/DirectService.Accounting.Infrastructure/Http/AccountingEndpoints.cs"
click node_einvoice "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Accounting/DirectService.Accounting.Infrastructure/EInvoicing/EInvoiceWorker.cs"
click node_identity "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Platform/DirectService.Platform.Application/Identity/AuthService.cs"
click node_session "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Platform/DirectService.Platform.Application/Identity/SessionService.cs"
click node_tenant "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Platform/DirectService.Platform.Application/Tenants/TenantLifecycleService.cs"
click node_company "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Platform/DirectService.Platform.Application/Companies/CompanySettingsService.cs"
click node_masterdb "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Shared/DirectService.Shared.Infrastructure/Persistence/MasterDbContext.cs"
click node_dbcontract "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Shared/DirectService.SharedKernel/IAppDbContext.cs"
click node_search "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Shared/DirectService.Shared.Infrastructure/Collaboration/GlobalSearchService.cs"
click node_spreadsheet "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Shared/DirectService.Shared.Infrastructure/Files/SpreadsheetService.cs"
click node_reports "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Shared/DirectService.Shared.Infrastructure/Reports/ReportBuilderService.cs"
click node_exports "https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Shared/DirectService.Shared.Infrastructure/Collaboration/ExportService.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_client,node_server,node_authapi,node_live,node_user toneBlue
class node_trips,node_tariffs,node_invoices,node_cash,node_transportreports toneAmber
class node_journal,node_books,node_apar,node_budgets,node_ledger,node_accountingapi,node_einvoice toneMint
class node_identity,node_session,node_tenant,node_company toneRose
class node_masterdb,node_dbcontract,node_search,node_spreadsheet,node_reports,node_exports toneIndigo
```

## Components

### Web experience

- [Web client](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Hosts/DirectService.Web.Client/Program.cs): `src/Hosts/DirectService.Web.Client/Program.cs`
- [Web host](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Hosts/DirectService.Web/Program.cs): `src/Hosts/DirectService.Web/Program.cs`
- [Auth endpoints](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Hosts/DirectService.Web/Endpoints/AuthEndpoints.cs): `src/Hosts/DirectService.Web/Endpoints/AuthEndpoints.cs`
- [Live collaboration](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Hosts/DirectService.Web/Realtime/LiveHub.cs): `src/Hosts/DirectService.Web/Realtime/LiveHub.cs`

### Transportation operations

- [Trips and masters](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Transportation/DirectService.Transportation.Application/Trips/TripService.cs): `src/Modules/Transportation/DirectService.Transportation.Application/Trips/TripService.cs`
- [Tariffs](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Transportation/DirectService.Transportation.Application/Pricing/TariffService.cs): `src/Modules/Transportation/DirectService.Transportation.Application/Pricing/TariffService.cs`
- [Transport invoicing](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Transportation/DirectService.Transportation.Application/Invoicing/InvoiceService.cs): `src/Modules/Transportation/DirectService.Transportation.Application/Invoicing/InvoiceService.cs`
- [Cash and settlement](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Transportation/DirectService.Transportation.Application/Cash/SettlementService.cs): `src/Modules/Transportation/DirectService.Transportation.Application/Cash/SettlementService.cs`
- [Transport reports](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Transportation/DirectService.Transportation.Application/Reports/StandardReportService.cs): `src/Modules/Transportation/DirectService.Transportation.Application/Reports/StandardReportService.cs`

### Accounting

- [Journal posting](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Accounting/DirectService.Accounting.Application/Posting/PostingEngine.cs): `src/Modules/Accounting/DirectService.Accounting.Application/Posting/PostingEngine.cs`
- [Accounting books](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Accounting/DirectService.Accounting.Application/Books/ChartOfAccountsService.cs): `src/Modules/Accounting/DirectService.Accounting.Application/Books/ChartOfAccountsService.cs`
- [Payables and receivables](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Accounting/DirectService.Accounting.Application/ApAr/ApArDocumentService.cs): `src/Modules/Accounting/DirectService.Accounting.Application/ApAr/ApArDocumentService.cs`
- [Budgets](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Accounting/DirectService.Accounting.Application/Budgets/BudgetService.cs): `src/Modules/Accounting/DirectService.Accounting.Application/Budgets/BudgetService.cs`
- [Ledger reporting](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Accounting/DirectService.Accounting.Application/Ledger/LedgerReportService.cs): `src/Modules/Accounting/DirectService.Accounting.Application/Ledger/LedgerReportService.cs`
- [Accounting API](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Accounting/DirectService.Accounting.Infrastructure/Http/AccountingEndpoints.cs): `src/Modules/Accounting/DirectService.Accounting.Infrastructure/Http/AccountingEndpoints.cs`
- [E-invoicing](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Modules/Accounting/DirectService.Accounting.Infrastructure/EInvoicing/EInvoiceWorker.cs): `src/Modules/Accounting/DirectService.Accounting.Infrastructure/EInvoicing/EInvoiceWorker.cs`

### Platform services

- [Identity and sessions](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Platform/DirectService.Platform.Application/Identity/AuthService.cs): `src/Platform/DirectService.Platform.Application/Identity/AuthService.cs`
- [Session lifecycle](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Platform/DirectService.Platform.Application/Identity/SessionService.cs): `src/Platform/DirectService.Platform.Application/Identity/SessionService.cs`
- [Tenant lifecycle](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Platform/DirectService.Platform.Application/Tenants/TenantLifecycleService.cs): `src/Platform/DirectService.Platform.Application/Tenants/TenantLifecycleService.cs`
- [Company settings](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Platform/DirectService.Platform.Application/Companies/CompanySettingsService.cs): `src/Platform/DirectService.Platform.Application/Companies/CompanySettingsService.cs`

### Shared infrastructure

- [Master database](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Shared/DirectService.Shared.Infrastructure/Persistence/MasterDbContext.cs): `src/Shared/DirectService.Shared.Infrastructure/Persistence/MasterDbContext.cs`
- [Database contract](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Shared/DirectService.SharedKernel/IAppDbContext.cs): `src/Shared/DirectService.SharedKernel/IAppDbContext.cs`
- [Global search](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Shared/DirectService.Shared.Infrastructure/Collaboration/GlobalSearchService.cs): `src/Shared/DirectService.Shared.Infrastructure/Collaboration/GlobalSearchService.cs`
- [Spreadsheet tools](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Shared/DirectService.Shared.Infrastructure/Files/SpreadsheetService.cs): `src/Shared/DirectService.Shared.Infrastructure/Files/SpreadsheetService.cs`
- [Report builder](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Shared/DirectService.Shared.Infrastructure/Reports/ReportBuilderService.cs): `src/Shared/DirectService.Shared.Infrastructure/Reports/ReportBuilderService.cs`
- [Exports](https://github.com/aliqadorah/direct-service-transportation-system/blob/main/src/Shared/DirectService.Shared.Infrastructure/Collaboration/ExportService.cs): `src/Shared/DirectService.Shared.Infrastructure/Collaboration/ExportService.cs`

### Other components

- **Business user**

## Connections

- Business user → Web client: uses (evidence: `src/Hosts/DirectService.Web.Client/Program.cs`)
- Web client → Web host: calls API
- Web host → Auth endpoints: hosts
- Web host → Accounting API: hosts
- Web host → Master database: configures (evidence: `src/Hosts/DirectService.Web/Program.cs`)
- Auth endpoints → Identity and sessions: delegates to
- Identity and sessions → Database contract: uses (evidence: `src/Platform/DirectService.Platform.Application/Identity/AuthService.cs`)
- Session lifecycle → Database contract: uses (evidence: `src/Platform/DirectService.Platform.Application/Identity/SessionService.cs`)
- Database contract → Master database: implemented by (evidence: `src/Shared/DirectService.SharedKernel/IAppDbContext.cs`)
- Web client → Trips and masters: uses lookups (evidence: `src/Hosts/DirectService.Web.Client/Program.cs`)
- Trips and masters → Transport invoicing: supports (evidence: `src/Modules/Transportation/DirectService.Transportation.Application/Invoicing/InvoiceService.cs`)
- Tariffs → Transport invoicing: supports pricing
- Cash and settlement → Transport invoicing: settles
- Accounting API → Payables and receivables: routes to
- Accounting API → Budgets: routes to
- Accounting API → Ledger reporting: routes to
- Journal posting → Database contract: uses (evidence: `src/Modules/Accounting/DirectService.Accounting.Application/Posting/PostingEngine.cs`)
- E-invoicing → Payables and receivables: processes documents
- Accounting API → E-invoicing: configures
- Global search → Master database: queries
- Report builder → Master database: queries
- Exports → Master database: reads data
- Spreadsheet tools → Web client: provides file exchange
