How alphayu/adnc works
ADNC is a .NET framework and reference implementation for modular business systems that can evolve into microservices. Its principal flow is an external request entering the Ocelot gateway, passing authentication and routing, and reaching a service API whose application/domain layers use shared persistence or integrations before returning a result. The graph preserves the documented infrastructure capabilities and shared service building blocks. Relationships beyond the sampled code are cited to the README; unsampled demo-service implementations are not represented as inspected components.
Main entry points: AbstractAppService.cs Business application · IAdoQuerierRepository.cs Repository contracts · Program.cs Ocelot gateway · ServiceRouter.cs Service routing
Components 22
Gateway
- Ocelot gateway
src/Gateways/Ocelot/Program.cs - Service routing
src/Gateways/Ocelot/ServiceRouter.cs - JWT validation
src/Gateways/Ocelot/Identity/JwtSecurityTokenHandlerExtension.cs
Infrastructure
- Discovery/configuration
src/Infrastructures/Consul - Event bus
src/Infrastructures/EventBus - Redis provider
src/Infrastructures/Redis/Providers/StackExchange/DefaultRedisProvider.cs - Redis caching
src/Infrastructures/Redis.Caching/Provider/DefaultCachingProvider.cs - Repository implementations
src/Infrastructures/Repository.EfCore/Repositories/EfRepository.cs - Dapper repository
src/Infrastructures/Repository.Dapper/DapperRepository.cs - Mongo repository
src/Infrastructures/Repository.EfCore.MongoDB/Repositories/MongoDbRepository.cs - ID generation
src/Infrastructures/IdGenerater/Yitter/IdGenerater.cs - Core primitives
src/Infrastructures/Core/Json/SystemTextJson.cs
Shared service layers
- Web API/auth
src/ServiceShared/WebApi/Authentication/Bearer/BearerAuthenticationHandler.cs - API contracts
src/ServiceShared/Application.Contracts/ResultModels/ProblemDetails.cs - Application services
src/ServiceShared/Application/Services/AbstractAppService.cs - Remote clients/tokens
src/ServiceShared/Remote/Handlers/Token/TokenFactory.cs - Domain model
src/ServiceShared/Domain/Entities/AggregateRoot.cs - Repository contracts
src/Infrastructures/Repository/Interface/IAdoQuerierRepository.cs
Service workflow
- Business service API
src/ServiceShared/WebApi/Controller/AdncControllerBase.cs - Business application
src/ServiceShared/Application/Services/AbstractAppService.cs - Business domain
src/ServiceShared/Domain/Entities/AggregateRoot.cs
Other components
- API client
Connections 19
- API client → Ocelot gateway: sends request
README.md - Ocelot gateway → JWT validation: validates JWT
README.md - Ocelot gateway → Service routing: routes request
README.md - Service routing → Discovery/configuration: discovers services
README.md - Service routing → Business service API: forwards request
README.md - Business service API → Business application: invokes service
- Business application → Business domain: uses domain
- Business service API → API contracts: returns result
src/ServiceShared/WebApi/Controller/AdncControllerBase.cs - Business application → Repository contracts: uses repositories
README.md - Repository contracts → Repository implementations: implemented by
README.md - Repository contracts → Dapper repository: implemented by
README.md - Repository contracts → Mongo repository: implemented by
README.md - Business application → Event bus: publishes events
README.md - Business application → Redis caching: uses caching
README.md - Redis caching → Redis provider: uses provider
- Business application → Remote clients/tokens: calls services
README.md - Remote clients/tokens → Discovery/configuration: resolves endpoints
src/ServiceShared/Application/Registrar/AbstractApplicationDependencyRegistrar.RpcClient.cs - Business application → ID generation: generates identifiers
README.md - Business application → Core primitives: uses primitives
README.md