English | 简体中文
This repository is a trimmed ADNC monolithic demo focused on the Admin management domain. It is built on .NET 8, exposes an ASP.NET Core Web API, uses EF Core + MySQL for persistence, and relies on Redis for cache-backed reads and session state.
Compared with the full upstream ADNC repository, this project is easier to run, debug, and extend locally. It keeps the core admin workflow, layered architecture, database migrations, and common infrastructure capabilities, while leaving out the full microservice landscape.
| Resource | Link |
|---|---|
| Frontend | https://github.com/AlphaYu/adnc-vue-elementplus |
| Code generator | https://code.aspdotnetcore.net |
| Online demo | https://online.aspdotnetcore.net |
| Upstream repository | https://github.com/AlphaYu/Adnc |
- Monolithic admin backend built with ASP.NET Core Web API and .NET 8
- Three-layer structure:
Api,Application, andRepository - EF Core + MySQL for business and system log storage
- Redis for caching, auth state, and read acceleration
- CAP for event processing, backed by RabbitMQ
- NLog logging with
console,file, andlokitargets - File-based local configuration with optional Consul support in non-development environments
adnc-monolithic
├── .github
├── doc
├── src
│ ├── .editorconfig
│ ├── Directory.Build.props
│ ├── Directory.Packages.props
│ ├── Api
│ ├── Application
│ └── Repository
├── .gitignore
├── README.md
├── README_ZH.md
└── LICENSE
The main solution file is src\Adnc.Demo.sln. Project responsibilities:
src\Api: hosts HTTP endpoints, configuration, middleware, health checks, and loggingsrc\Application: contains business logic, DTOs, validators, events, and subscriberssrc\Repository: maintains entities, mappings, migrations, and repository extensions
The current repository mainly covers these admin capabilities:
- Authentication and session management
- User, role, menu, and organization management
- Dictionary and dictionary data management
- System configuration management
- Customer creation, recharge, and transaction log queries
- Login log and operation log queries
Before running locally, prepare:
- .NET 8 SDK
- MySQL
- Redis
- RabbitMQ
Local development settings are defined in src\Api\appsettings.Development.json.
Default listening endpoint:
- HTTP API:
http://localhost:5000
Default local infrastructure settings:
- MySQL business DB:
127.0.0.1:13308, databaseadnc_monolithic - MySQL syslog DB:
127.0.0.1:13308, databaseadnc_syslog - Redis:
127.0.0.1:13379, database1 - RabbitMQ:
127.0.0.1:5672
Recommended practice:
- Generate the database schema through EF Core migrations
- Import the SQL seed data afterward
Commands:
dotnet restore src\Adnc.Demo.sln
dotnet ef database update --project src\Repository\Adnc.Demo.Admin.Repository.csproj --startup-project src\Api\Adnc.Demo.Admin.Api.csproj
dotnet run --project src\Api\Adnc.Demo.Admin.Api.csprojDatabase seed script:
doc\dbsql\adnc-monolithic.sql
After startup:
- Root page:
http://localhost:5000 - HTTP API base:
http://localhost:5000/api
- Local monolithic development uses
ConfigurationType=FileandRegisterType=Direct - Non-development configuration already includes Consul-based loading
- Current CAP subscribers include
OrderPaidEventSubscriberandRechargedEventSubscriber - Logging supports
console,file, andloki
This project is licensed under the MIT License.
