mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-04-23 14:42:51 +08:00
docs: 📝 rEADME (#195)
[skip ci] Co-authored-by: tk <fiyne1a@dingtalk.com>
This commit is contained in:
parent
26e3698f57
commit
d1503a859b
60
README.md
60
README.md
@ -14,7 +14,7 @@ https://na.tools92.top
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker run -p 8080:8080 nsnail/netadmin
|
docker run -p 8080:8080 nsnail/netadmin
|
||||||
# 需翻墙
|
# 需魔法上网
|
||||||
```
|
```
|
||||||
|
|
||||||
## 构建步骤
|
## 构建步骤
|
||||||
@ -27,14 +27,17 @@ dotnet --list-sdks
|
|||||||
# 2. 克隆代码仓库
|
# 2. 克隆代码仓库
|
||||||
git clone https://github.com/nsnail/NetAdmin.git && cd ./NetAdmin
|
git clone https://github.com/nsnail/NetAdmin.git && cd ./NetAdmin
|
||||||
|
|
||||||
# 3. 检查本机 redis 运行状态
|
# 3. 确认本机 redis 处于运行状态
|
||||||
redis-cli dbsize
|
redis-server # 启动
|
||||||
|
redis-cli # 连接测试
|
||||||
# 下载 redis for windows:https://github.com/redis-windows/redis-windows/releases
|
# 下载 redis for windows:https://github.com/redis-windows/redis-windows/releases
|
||||||
# 下载 redis for linux/mac:https://redis.io/download
|
# 下载 redis for linux/mac:https://redis.io/download
|
||||||
|
|
||||||
# 4. 运行后端 WebApi
|
# 4. 运行后端 WebApi
|
||||||
dotnet run --project ./src/backend/NetAdmin.AdmServer.Host/NetAdmin.AdmServer.Host.csproj --urls http://[::]:5010 -is
|
dotnet run --project ./src/backend/NetAdmin.AdmServer.Host/NetAdmin.AdmServer.Host.csproj --urls http://[::]:5010 -is
|
||||||
# 浏览器打开 http://localhost:5010 ,将看到Swagger(Knife4jUI)界面
|
# -i 插入种子数据
|
||||||
|
# -s 同步数据库结构
|
||||||
|
# 浏览器访问 http://localhost:5010 ,将看到Swagger(Knife4jUI)界面
|
||||||
|
|
||||||
# 5. 检查 nodejs 版本 >=20
|
# 5. 检查 nodejs 版本 >=20
|
||||||
node -v
|
node -v
|
||||||
@ -45,42 +48,54 @@ cd ./src/frontend/admin && npm install
|
|||||||
|
|
||||||
# 7. 运行前端项目
|
# 7. 运行前端项目
|
||||||
npm run dev
|
npm run dev
|
||||||
# 浏览器打开 http://localhost:5020 ,将看到管理界面(默认用户名:root,密码:1234qwer)
|
# 浏览器访问 http://localhost:5020 ,将看到管理界面(默认用户名密码:root 1234qwer)
|
||||||
```
|
```
|
||||||
|
|
||||||
## 文件目录树
|
## 文件目录
|
||||||
|
|
||||||
```
|
```
|
||||||
|
+---.github # github 工程文件目录
|
||||||
+---.template.config # dotnet 项目模板配置目录
|
+---.template.config # dotnet 项目模板配置目录
|
||||||
+---assets # 项目资源文件目录
|
+---assets # 项目资源文件目录
|
||||||
+---build # 构建相关的工程文件目录
|
+---build # 构建相关的工程文件目录
|
||||||
+---dist # 编译生成的二进制文件目录
|
+---dist # 编译生成的二进制文件目录
|
||||||
|
+---docker # docker 镜像构建文件目录
|
||||||
+---docs # 项目开发文档目录
|
+---docs # 项目开发文档目录
|
||||||
+---refs # 引用的第三方包的仓库目录
|
+---refs # 引用的第三方包的仓库目录
|
||||||
+---scripts # 各种工具脚本文件目录
|
+---scripts # 各种工具脚本文件目录
|
||||||
+---src # 项目源码文件目录
|
+---src # 项目源码文件目录
|
||||||
```
|
```
|
||||||
|
|
||||||
## 后端项目架构
|
## 项目架构
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
flowchart TD
|
flowchart TD
|
||||||
H["NetAdmin.Host\n公共主机层\n(.Net自托管主机程序)\n(输入输出格式化)\n(数据校验、鉴权)\n(...所有HTTP管道过滤器中间件)"] --> C["NetAdmin.Cache\n公共缓存层\n(基于Redis或MemoryCache的缓存策略实现)"]
|
sys-host["NetAdmin.SysComponent.Host\n(系统组件:主机层)"]
|
||||||
C --> A["NetAdmin.Application\n公共业务逻辑层\n(内部服务增删改查)\n(外部服务增删改查)\n(...所有业务用例的计算与组合逻辑的模块化)"]
|
sys-cache["NetAdmin.SysComponent.Cache\n(系统组件:缓存层)"]
|
||||||
A --> D["NetAdmin.Domain\n数据实体层\n(数据库关系实体映射)\n(DTO数据传输对象)\n(...所有数据模型的抽象与封装)"]
|
sys-app["NetAdmin.SysComponent.Application\n(系统组件:应用层)"]
|
||||||
D --> I["NetAdmin.Infrastructure\n基础设施层\n(第三方组件和Nuget包引用)\n(公共构建和程序运行配置)\n(公共常量枚举异常定义)\n(全球化化和多语言)\n(...所有公共Utility工具)"]
|
sys-domain["NetAdmin.SysComponent.Domain\n(系统组件:数据实体层)"]
|
||||||
|
sys-infra["NetAdmin.SysComponent.Infrastructure\n(系统组件:基础设施层)"]
|
||||||
XH["NetAdmin.XXX.Host\n(WebApi)"]-->H
|
host["NetAdmin.Host\n框架:主机层\n(.Net自托管主机程序)\n(输入输出格式化)\n(数据校验、鉴权)\n(...所有HTTP管道过滤器中间件)"]
|
||||||
XS["NetAdmin.XXXService\n(常驻内存服务)"]-->H
|
cache["NetAdmin.Cache\n框架:缓存层\n(基于Redis或MemoryCache的缓存策略实现)"]
|
||||||
XS["NetAdmin.XXXService\n(常驻内存服务)"]-->XC
|
app["NetAdmin.Application\n框架:业务应用层\n(内部服务增删改查)\n(外部服务增删改查)\n(...所有业务用例的计算与组合逻辑的模块化)"]
|
||||||
XC["NetAdmin.XXX.Cache\n(缓存层实例)"]-->C
|
domain["NetAdmin.Domain\n框架:数据实体层\n(数据库关系实体映射)\n(DTO数据传输对象)\n(...所有数据模型的抽象与封装)"]
|
||||||
XA["NetAdmin.XXX.Application\n(业务逻辑层实例)"]-->A
|
infra["NetAdmin.Infrastructure\n框架:基础设施层\n(第三方组件和Nuget包引用)\n(公共构建和程序运行配置)\n(公共常量枚举异常定义)\n(全球化化和多语言)\n(...所有公共Utility工具)"]
|
||||||
|
biz-host["YourSolution.XXX.Host\n(业务实例:主机层)"]
|
||||||
XH-->XC
|
biz-cache["YourSolution.XXX.Cache\n(业务实例:缓存层)"]
|
||||||
XC-->XA
|
biz-app["YourSolution.XXX.Application\n(业务实例:应用层)"]
|
||||||
|
biz-domain["YourSolution.XXX.Domain\n(业务实例:数据实体层)"]
|
||||||
|
biz-infra["YourSolution.XXX.Infrastructure\n(业务实例:基础设施层)"]
|
||||||
|
biz-host-->biz-cache-->biz-app-->biz-domain-->biz-infra
|
||||||
|
sys-host-->sys-cache-->sys-app-->sys-domain-->sys-infra
|
||||||
|
host-->cache-->app-->domain-->infra
|
||||||
|
biz-host-->sys-host-->host
|
||||||
|
biz-cache-->sys-cache-->cache
|
||||||
|
biz-app-->sys-app-->app
|
||||||
|
biz-domain-->sys-domain-->domain
|
||||||
|
biz-infra-->sys-infra-->infra
|
||||||
```
|
```
|
||||||
|
|
||||||
## 引用的开源代码 / 特别鸣谢
|
## 特别鸣谢
|
||||||
|
|
||||||
| 语言 | 集成领域 | 开源库 |
|
| 语言 | 集成领域 | 开源库 |
|
||||||
|------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
@ -88,7 +103,6 @@ XC-->XA
|
|||||||
| C# | 数据库关系映射 | [FreeSql](https://github.com/dotnetcore/FreeSql) |
|
| C# | 数据库关系映射 | [FreeSql](https://github.com/dotnetcore/FreeSql) |
|
||||||
| C# | 代码质量检查 | [Roslynator.Analyzers](https://github.com/josefpihrt/roslynator) \| [SonarAnalyzer.CSharp](https://github.com/SonarSource/sonar-dotnet) \| [StyleCop.Analyzers](https://github.com/DotNetAnalyzers/StyleCopAnalyzers) |
|
| C# | 代码质量检查 | [Roslynator.Analyzers](https://github.com/josefpihrt/roslynator) \| [SonarAnalyzer.CSharp](https://github.com/SonarSource/sonar-dotnet) \| [StyleCop.Analyzers](https://github.com/DotNetAnalyzers/StyleCopAnalyzers) |
|
||||||
| C# | 单元测试框架 | [xunit](https://github.com/xunit/xunit) \| [coverlet.collector](https://github.com/coverlet-coverage/coverlet) |
|
| C# | 单元测试框架 | [xunit](https://github.com/xunit/xunit) \| [coverlet.collector](https://github.com/coverlet-coverage/coverlet) |
|
||||||
| C# | 分布式锁 | [RedLock.net](https://github.com/samcook/RedLock.net) |
|
|
||||||
| C# | 控制台终端界面库 | [Spectre.Console](https://github.com/spectreconsole/spectre.console) |
|
| C# | 控制台终端界面库 | [Spectre.Console](https://github.com/spectreconsole/spectre.console) |
|
||||||
| C# | 扩展函数库 | [NSExt](https://github.com/nsnail/ns-ext.git) |
|
| C# | 扩展函数库 | [NSExt](https://github.com/nsnail/ns-ext.git) |
|
||||||
| C# | 图形处理库 | [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp) |
|
| C# | 图形处理库 | [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp) |
|
||||||
@ -96,8 +110,6 @@ XC-->XA
|
|||||||
| C# | 性能监控采集 | [prometheus-net.AspNetCore](https://github.com/prometheus-net/prometheus-net) |
|
| C# | 性能监控采集 | [prometheus-net.AspNetCore](https://github.com/prometheus-net/prometheus-net) |
|
||||||
| C# | 雪花ID生成器 | [Yitter.IdGenerator](https://github.com/yitter/idgenerator) |
|
| C# | 雪花ID生成器 | [Yitter.IdGenerator](https://github.com/yitter/idgenerator) |
|
||||||
| C# | 自动化版本管理 | [MinVer](https://github.com/adamralph/minver) |
|
| C# | 自动化版本管理 | [MinVer](https://github.com/adamralph/minver) |
|
||||||
| C# | JavaScript引擎 | [MsieJavaScriptEngine](https://github.com/Taritsyn/MsieJavaScriptEngine) |
|
|
||||||
| C# | WebApi图形界面 | [IGeekFan.AspNetCore.Knife4jUI](https://github.com/luoyunchong/IGeekFan.AspNetCore.Knife4jUI) |
|
|
||||||
| TypeScript | SPA基础框架 | [Vue](https://github.com/vuejs/core) |
|
| TypeScript | SPA基础框架 | [Vue](https://github.com/vuejs/core) |
|
||||||
| TypeScript | 前端构建工具 | [Vite](https://github.com/vitejs/vite) |
|
| TypeScript | 前端构建工具 | [Vite](https://github.com/vitejs/vite) |
|
||||||
| TypeScript | UI控件库 | [Element Plus](https://github.com/element-plus/element-plus) |
|
| TypeScript | UI控件库 | [Element Plus](https://github.com/element-plus/element-plus) |
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Import Project="$(SolutionDir)/build/code.quality.props"/>
|
<Import Project="$(SolutionDir)/build/code.quality.props"/>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../NetAdmin.Infrastructure/NetAdmin.Infrastructure.csproj"/>
|
<ProjectReference Include="../NetAdmin.SysComponent.Infrastructure/NetAdmin.SysComponent.Infrastructure.csproj"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="$(SolutionDir)/assets/res/NetAdmin.AdmServer.Statements.ln">
|
<None Include="$(SolutionDir)/assets/res/NetAdmin.AdmServer.Statements.ln">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user