Skip to content

AlphaYu/adnc-monolithic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADNC monolithic admin demo

Code changes the world, and open source moves the community forward.

English | 简体中文

Overview

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.

Related Resources

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

Core Features

  • Monolithic admin backend built with ASP.NET Core Web API and .NET 8
  • Three-layer structure: Api, Application, and Repository
  • 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, and loki targets
  • File-based local configuration with optional Consul support in non-development environments

Repository Structure

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 logging
  • src\Application: contains business logic, DTOs, validators, events, and subscribers
  • src\Repository: maintains entities, mappings, migrations, and repository extensions

Functional Scope

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

Requirements

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, database adnc_monolithic
  • MySQL syslog DB: 127.0.0.1:13308, database adnc_syslog
  • Redis: 127.0.0.1:13379, database 1
  • RabbitMQ: 127.0.0.1:5672

Quick Start

Recommended practice:

  1. Generate the database schema through EF Core migrations
  2. 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.csproj

Database seed script:

  • doc\dbsql\adnc-monolithic.sql

After startup:

  • Root page: http://localhost:5000
  • HTTP API base: http://localhost:5000/api

Development Notes

  • Local monolithic development uses ConfigurationType=File and RegisterType=Direct
  • Non-development configuration already includes Consul-based loading
  • Current CAP subscribers include OrderPaidEventSubscriber and RechargedEventSubscriber
  • Logging supports console, file, and loki

License

This project is licensed under the MIT License.

About

A streamlined ADNC monolithic demo focused on the Admin management project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors