# dineshchinnasamy07/acme-next architecture

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

- Interactive diagram: https://gitdiagram.com/dineshchinnasamy07/acme-next
- Repository: https://github.com/dineshchinnasamy07/acme-next

## Overview

ACME-Next is a microservices ERP; the tree shows implemented authentication, organization, and master-data services alongside finance, fixed-asset, payroll, and reporting API projects. The main evidenced user workflow is HTTP requests to authentication and office-management controllers, which delegate to application systems; login also selects the portal or head-office database. The README documents broader ERP modules, but their runtime interactions are not shown here, so those branches are represented as capabilities without inferred call chains.

Main entry points: [`ApiGateways/Program.cs`](https://github.com/dineshchinnasamy07/acme-next/blob/main/ApiGateways/Program.cs) (API gateways), [`Bosco.Auth.Application/Features`](https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Auth.Application/Features) (Authentication and users), [`Bosco.Organization.Application/Features/Office`](https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Organization.Application/Features/Office) (Office systems), [`Bosco.Auth.Api/AuthControllers`](https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Auth.Api/AuthControllers) (Auth endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_auth["Authentication"]
  node_auth_api["Auth endpoints<br/>[AuthControllers]"]
  node_user_system["Authentication and users<br/>[Features]"]
  node_jwt["JWT token service<br/>[JwtTokenService.cs]"]
  node_auth_store[("Auth database<br/>[AuthDbContext.cs]")]
  node_auth_repos["Auth repositories<br/>[Repositories]"]
end

subgraph group_org["Organization"]
  node_org_api["Office endpoints"]
  node_org_systems["Office systems<br/>[Office]"]
  node_org_repos["Office repositories<br/>[Repositories]"]
  node_office_restore["Office database restore"]
end

subgraph group_masters["Master Data"]
  node_masters_api["Master endpoints<br/>[MastersControllers]"]
  node_finance_masters["Finance master systems<br/>[FinanceMasters]"]
  node_masters_repos["Master repositories<br/>[FinanceMasters]"]
  node_masters_store[("Masters database")]
end

subgraph group_erp["ERP Modules"]
  node_finance["Finance service<br/>[Program.cs]"]
  node_fixed_assets["Fixed asset service<br/>[Program.cs]"]
  node_payroll["Payroll service<br/>[Program.cs]"]
  node_reports["Reports service<br/>[Program.cs]"]
end

subgraph group_shared["Shared Infrastructure"]
  node_gateway["API gateways<br/>[Program.cs]"]
  node_jwt_validation["JWT validation"]
  node_messages["Shared messages<br/>[MessageRender.cs]"]
  node_messaging["Event messaging"]
end

node_user(("ERP user"))

node_user -->|"submits credentials"| node_auth_api
node_auth_api -->|"delegates login"| node_user_system
node_user_system -.->|"resolves office"| node_auth_repos
node_user_system -.->|"issues token"| node_jwt
node_auth_repos -.->|"persists auth data"| node_auth_store
node_user -->|"manages offices"| node_org_api
node_org_api -->|"delegates operations"| node_org_systems
node_org_systems -.->|"uses repositories"| node_org_repos
node_org_systems -.->|"restores database"| node_office_restore
node_user -->|"manages master data"| node_masters_api
node_masters_api -->|"delegates periods"| node_finance_masters
node_finance_masters -.->|"uses repositories"| node_masters_repos
node_masters_repos -.->|"reads and writes"| node_masters_store
node_gateway -.->|"routes requests"| node_auth_api
node_gateway -.->|"routes requests"| node_org_api
node_gateway -.->|"routes requests"| node_masters_api
node_jwt -->|"shares validation"| node_jwt_validation
node_finance -.->|"provides finance capability"| node_finance_masters
node_user -.->|"uses ERP module"| node_fixed_assets
node_user -.->|"uses ERP module"| node_payroll
node_user -.->|"uses ERP module"| node_reports

click node_auth_api "https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Auth.Api/AuthControllers"
click node_user_system "https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Auth.Application/Features"
click node_jwt "https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Auth.Infrastructure/Security/JwtTokenService.cs"
click node_auth_store "https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Auth.Infrastructure/Persistence/AuthDbContext.cs"
click node_auth_repos "https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Auth.Infrastructure/Repositories"
click node_org_api "https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Organization.Api/OrganizationControllers"
click node_org_systems "https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Organization.Application/Features/Office"
click node_org_repos "https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Organization.Infrastructure/Repositories"
click node_office_restore "https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Organization.Infrastructure/Services/HeadOfficeDatabaseRestorer.cs"
click node_masters_api "https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Masters.Api/MastersControllers"
click node_finance_masters "https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Masters.Application/Features/HeadOfficeMasters/FinanceMasters"
click node_masters_repos "https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Masters.Infrastructure/Repositories/HeadOfficeMasters/FinanceMasters"
click node_masters_store "https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Masters.Infrastructure/Persistence/MastersDbContext.cs"
click node_finance "https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Finance.Api/Program.cs"
click node_fixed_assets "https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.FixedAsset.Api/Program.cs"
click node_payroll "https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Payroll.Api/Program.cs"
click node_reports "https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Reports.Api/Program.cs"
click node_gateway "https://github.com/dineshchinnasamy07/acme-next/blob/main/ApiGateways/Program.cs"
click node_jwt_validation "https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Common/Security/JwtAuthenticationExtensions.cs"
click node_messages "https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Common/MessageRender.cs"
click node_messaging "https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Messaging/InMemoryEventBus.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_auth_api,node_user_system,node_jwt,node_auth_store,node_auth_repos,node_user toneBlue
class node_org_api,node_org_systems,node_org_repos,node_office_restore toneAmber
class node_masters_api,node_finance_masters,node_masters_repos,node_masters_store toneMint
class node_finance,node_fixed_assets,node_payroll,node_reports toneRose
class node_gateway,node_jwt_validation,node_messages,node_messaging toneIndigo
```

## Components

### Authentication

- [Auth endpoints](https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Auth.Api/AuthControllers): `Bosco.Auth.Api/AuthControllers`
- [Authentication and users](https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Auth.Application/Features): `Bosco.Auth.Application/Features`
- [JWT token service](https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Auth.Infrastructure/Security/JwtTokenService.cs): `Bosco.Auth.Infrastructure/Security/JwtTokenService.cs`
- [Auth database](https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Auth.Infrastructure/Persistence/AuthDbContext.cs): `Bosco.Auth.Infrastructure/Persistence/AuthDbContext.cs`
- [Auth repositories](https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Auth.Infrastructure/Repositories): `Bosco.Auth.Infrastructure/Repositories`

### Organization

- [Office endpoints](https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Organization.Api/OrganizationControllers): `Bosco.Organization.Api/OrganizationControllers`
- [Office systems](https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Organization.Application/Features/Office): `Bosco.Organization.Application/Features/Office`
- [Office repositories](https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Organization.Infrastructure/Repositories): `Bosco.Organization.Infrastructure/Repositories`
- [Office database restore](https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Organization.Infrastructure/Services/HeadOfficeDatabaseRestorer.cs): `Bosco.Organization.Infrastructure/Services/HeadOfficeDatabaseRestorer.cs`

### Master Data

- [Master endpoints](https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Masters.Api/MastersControllers): `Bosco.Masters.Api/MastersControllers`
- [Finance master systems](https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Masters.Application/Features/HeadOfficeMasters/FinanceMasters): `Bosco.Masters.Application/Features/HeadOfficeMasters/FinanceMasters`
- [Master repositories](https://github.com/dineshchinnasamy07/acme-next/tree/main/Bosco.Masters.Infrastructure/Repositories/HeadOfficeMasters/FinanceMasters): `Bosco.Masters.Infrastructure/Repositories/HeadOfficeMasters/FinanceMasters`
- [Masters database](https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Masters.Infrastructure/Persistence/MastersDbContext.cs): `Bosco.Masters.Infrastructure/Persistence/MastersDbContext.cs`

### ERP Modules

- [Finance service](https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Finance.Api/Program.cs): `Bosco.Finance.Api/Program.cs`
- [Fixed asset service](https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.FixedAsset.Api/Program.cs): `Bosco.FixedAsset.Api/Program.cs`
- [Payroll service](https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Payroll.Api/Program.cs): `Bosco.Payroll.Api/Program.cs`
- [Reports service](https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Reports.Api/Program.cs): `Bosco.Reports.Api/Program.cs`

### Shared Infrastructure

- [API gateways](https://github.com/dineshchinnasamy07/acme-next/blob/main/ApiGateways/Program.cs): `ApiGateways/Program.cs`
- [JWT validation](https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Common/Security/JwtAuthenticationExtensions.cs): `Bosco.Common/Security/JwtAuthenticationExtensions.cs`
- [Shared messages](https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Common/MessageRender.cs): `Bosco.Common/MessageRender.cs`
- [Event messaging](https://github.com/dineshchinnasamy07/acme-next/blob/main/Bosco.Messaging/InMemoryEventBus.cs): `Bosco.Messaging/InMemoryEventBus.cs`

### Other components

- **ERP user**

## Connections

- ERP user → Auth endpoints: submits credentials (evidence: `Bosco.Auth.Api/AuthControllers/AuthController/AuthController.cs`)
- Auth endpoints → Authentication and users: delegates login (evidence: `Bosco.Auth.Api/AuthControllers/AuthController/AuthController.cs`)
- Authentication and users → Auth repositories: resolves office
- Authentication and users → JWT token service: issues token
- Auth repositories → Auth database: persists auth data (evidence: `Bosco.Auth.Infrastructure/Repositories/UserRepository.cs`)
- ERP user → Office endpoints: manages offices (evidence: `Bosco.Organization.Api/OrganizationControllers/HeadOfficeController/HeadOfficesController.cs`)
- Office endpoints → Office systems: delegates operations (evidence: `Bosco.Organization.Api/OrganizationControllers/HeadOfficeController/HeadOfficesController.cs`)
- Office systems → Office repositories: uses repositories
- Office systems → Office database restore: restores database
- ERP user → Master endpoints: manages master data (evidence: `Bosco.Masters.Api/MastersControllers/HeadOfficeMastersController/FinanceMasters/AccountingPeriodController.cs`)
- Master endpoints → Finance master systems: delegates periods (evidence: `Bosco.Masters.Api/MastersControllers/HeadOfficeMastersController/FinanceMasters/AccountingPeriodController.cs`)
- Finance master systems → Master repositories: uses repositories
- Master repositories → Masters database: reads and writes
- API gateways → Auth endpoints: routes requests
- API gateways → Office endpoints: routes requests
- API gateways → Master endpoints: routes requests
- JWT token service → JWT validation: shares validation (evidence: `Bosco.Auth.Infrastructure/Security/JwtTokenService.cs`)
- Finance service → Finance master systems: provides finance capability
- ERP user → Fixed asset service: uses ERP module
- ERP user → Payroll service: uses ERP module
- ERP user → Reports service: uses ERP module
