feat: 新增应用全局常量 APP,消除硬编码散落

- 新增 src/shared/app.ts,定义应用元信息(name、title、subtitle、description、version)
- 后端 3 处硬编码改为引用 APP.name
- 前端 3 处硬编码改为引用 APP.title/APP.description
- localStorage key 从 my-app.theme.preference 改为 theme.preference
- 构建脚本可执行文件名改为引用 APP.name
- 更新 README.md 和 DEVELOPMENT.md 文档
- 新增 openspec/specs/app-constants/spec.md 规范文档
This commit is contained in:
2026-05-20 15:54:15 +08:00
parent 4a38d4dac7
commit 5aed73523e
12 changed files with 112 additions and 26 deletions

7
src/shared/app.ts Normal file
View File

@@ -0,0 +1,7 @@
export const APP = {
description: "基于 Bun + React + TDesign 的全栈开发框架",
name: "my-app",
subtitle: "Bun 全栈应用",
title: "My App",
version: "0.1.0",
} as const;