feat: 重建 Bell GoAdmin 产品骨架 (#62)

This commit is contained in:
QiuSW
2026-08-27 18:20:40 +08:00
parent b37c350096
commit f5a3dd796b
715 changed files with 75278 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
# Bell GoAdmin 来源清单
Bell 的后端与管理端是从冻结 GoAdmin 完整应用源码派生的独立产品副本,不在本机参考仓库中开发。
| 组件 | 上游 | 冻结 commit | Bell 导入路径 | 许可证 |
|---|---|---|---|---|
| go-admin | https://github.com/go-admin-team/go-admin.git | `f06540883b41d03782bb6b2c4150f298f328c6b6` | `Bell/server/` | MIT,见 `go-admin-LICENSE.md` 及 `Bell/server/LICENSE.md` |
| go-admin-ui | https://github.com/go-admin-team/go-admin-ui.git | `67d393d713877572fab0b897296a4c1d525fc81d` | `Bell/ui/` | MIT,见 `go-admin-ui-LICENSE` 及 `Bell/ui/LICENSE` |
| go-admin-doc | https://github.com/go-admin-team/go-admin-doc.git | `424855aacf6905f3fde860c3331385cb25529a0d` | 只读参考,不导入产品源码 | MIT |
## 导入排除项
- 三个上游仓库的 `.git/`:避免嵌套仓库;来源由上表完整 commit 固定。
- `go-admin/go-admin-db.db`:上游跟踪的本地演示 SQLite 数据库,不属于产品源码,且 Bell 正式数据库为 PostgreSQL。
- `go-admin-ui/node_modules/`:本机生成依赖目录,不属于上游跟踪源码;依赖由 `pnpm-lock.yaml` 重建。
- 日志、构建产物和本机未跟踪文件未导入。
除上述排除项外,冻结提交中的应用源码、Cobra 命令、Gin/GORM/Casbin/JWT 链、迁移、Router、Store、Axios、Layout、Element Plus 组件及测试均保留。默认模块源码也保留,Bell 只通过菜单可见性和路由注册进行收敛。
## Bell 相对上游的首轮差异
- 生产配置固定使用 Bell 独立 PostgreSQL、端口和命名空间;数据库 URL 与 JWT secret 必须从 `BELL_*` 进程环境提供。
- 初始管理员必须在迁移时显式提供,仓库不保存默认账号、密码或可用 secret;登录页不预填凭据。
- JWT realm 与前端 token key 使用 Bell 独立名称,只接受 Authorization header,不复用 Sense Cookie/token。
- 保留用户、角色、菜单、认证和审计基础能力;隐藏部门、岗位、字典、参数、日志、代码生成、任务及监控等骨架阶段无关菜单。
- 保留 jobs/other 源码作为扩展边界,但不注册其后端路由,因此隐藏入口不能通过直接访问绕过。
- PostgreSQL 迁移继续使用上游 Cobra/GORM migration 链,并由环境输入创建一次性初始管理员。
## 已阅读的冻结 go-admin-doc
- `docs/guide/index.md`:确认 Gin、GORM、Casbin、JWT 与内置模块边界。
- `docs/intro/cmd/server.md`、`docs/intro/cmd/migrate.md`:保留 Cobra `server` / `migrate` 启动链和显式配置文件入口。
- `docs/intro/advanced/config.md`、`router.md`、`api.md`:沿用配置加载、Router 注册、中间件和 API 分层方式。
- `docs/intro/advanced/models.md`、`dto.md`、`service.md`、`db.md`:保留 Model/DTO/Service/GORM 结构,并采用文档列出的 PostgreSQL 驱动。
- 冻结 go-admin-ui 的 `README.md`、`src/router/**`、`src/store/**`、`src/api/**`、`src/layout/**`:保留 Router/Store/请求封装/Layout/动态菜单与按钮权限链。
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 go-admin-team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 wenjianzhang
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.