Files
wwjcloud-nest-v1/admin/docs/src/en/veben/guide/essentials/concept.md
万物街 1cd5d3bdef feat: 完成 NestJS 后端核心底座开发 (M1-M6) 和 Ant Design Vue 前端迁移
主要更新:
1. 后端核心底座完成 (M1-M6):
   - 健康检查、指标监控、分布式锁
   - 事件总线、队列系统、事务管理
   - 安全守卫、多租户隔离、存储适配器
   - 审计日志、配置管理、多语言支持

2. 前端迁移到 Ant Design Vue:
   - 从 Element Plus 迁移到 Ant Design Vue
   - 完善 system 模块 (role/menu/dept)
   - 修复依赖和配置问题

3. 文档完善:
   - AI 开发工作流文档
   - 架构约束和开发规范
   - 项目进度跟踪

4. 其他改进:
   - 修复编译错误和类型问题
   - 完善测试用例
   - 优化项目结构
2025-08-27 11:24:22 +08:00

2.3 KiB

Basic Concepts

In the new version, the entire project has been restructured. Now, we will introduce some basic concepts to help you better understand the entire document. Please make sure to read this section first.

Monorepo

Monorepo refers to the repository of the entire project, which includes all code, packages, applications, standards, documentation, configurations, etc., that is, the entire content of a Monorepo directory.

Applications

Applications refer to a complete project; a project can contain multiple applications, which can reuse the code, packages, standards, etc., within the monorepo. Applications are placed in the apps directory. Each application is independent and can be run, built, tested, and deployed separately; it can also include different component libraries, etc.

::: tip

Applications are not limited to front-end applications; they can also be back-end applications, mobile applications, etc. For example, apps/backend-mock is a back-end service.

:::

Packages

A package refers to an independent module, which can be a component, a tool, a library, etc. Packages can be referenced by multiple applications or other packages. Packages are placed in the packages directory.

You can consider these packages as independent npm packages, and they are used in the same way as npm packages.

Package Import

Importing a package in package.json:

{
  "dependencies": {
    "@vben/utils": "workspace:*"
  }
}

Package Usage

Importing a package in the code:

import { isString } from '@vben/utils';

Aliases

In the project, you can see some paths starting with #, such as #/api, #/views. These paths are aliases, used for quickly locating a certain directory. They are not implemented through vite's alias, but through the principle of subpath imports in Node.js itself. You only need to configure the imports field in package.json.

{
  "imports": {
    "#/*": "./src/*"
  }
}

To make these aliases recognizable by the IDE, we also need to configure them in tsconfig.json:

{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "#/*": ["src/*"]
    }
  }
}

This way, you can use aliases in your code.