refactor: 品牌重塑 my-app → Alfred·阿福

将项目从模板标识 my-app 全部替换为产品标识 Alfred·阿福,
去掉所有模板措辞,文档语态转为产品视角。

核心标识替换:
- name: my-app → alfred
- title: My App → Alfred·阿福
- subtitle: Bun 全栈应用 → 智能信息处理中枢
- description: 全栈开发框架 → 基于 AI 的信息综合处理平台
- 日志路径: my-app.log → alfred.log
- 构建产物: dist/my-app → dist/alfred(由 APP.name 自动适配)

文档更新:
- README.md 重写为产品介绍
- docs/README.md 去掉模板段落
- docs/user/ 从模板使用指南改为产品手册
- docs/development/ 标识替换 + 去模板措辞
- openspec/config.yaml 去模板项目描述
- LICENSE 填入 Copyright 2025 lanyuanxiaoyao
This commit is contained in:
2026-05-27 09:38:57 +08:00
parent 7ebf5ee5dc
commit 34071a421a
19 changed files with 61 additions and 87 deletions

View File

@@ -1,14 +1,14 @@
# 用户文档
本文档是 my-app 的用户使用入口,说明如何使用模板、配置、部署和排查问题。
本文档是 Alfred·阿福 的用户使用入口,说明如何安装、配置、部署和排查问题。
适用场景:使用本模板创建新项目、编写配置、生产部署、排查运行问题。
适用场景:首次安装、编写配置、生产部署、排查运行问题。
## 文档索引
| 文档 | 内容 |
| ---------------------------------- | ------------------------------------------- |
| [usage.md](usage.md) | 克隆模板、配置应用信息、准备配置、开始开发 |
| [usage.md](usage.md) | 快速开始、安装配置 |
| [config.md](config.md) | YAML 结构、变量语法、server/storage/logging |
| [deploy.md](deploy.md) | 生产构建、可执行文件运行、运行时配置 |
| [troubleshoot.md](troubleshoot.md) | 常见问题:配置校验、变量解析、构建失败 |
@@ -17,14 +17,14 @@
| 任务 | 建议阅读 |
| -------- | -------------------------------------------------------------- |
| 首次使用 | [项目快速开始](../../README.md#快速开始)、[使用模板](usage.md) |
| 首次使用 | [项目快速开始](../../README.md#快速开始)、[安装配置](usage.md) |
| 编写配置 | [配置文件](config.md) |
| 生产部署 | [部署](deploy.md)、[故障排查](troubleshoot.md) |
| 排查问题 | [故障排查](troubleshoot.md) |
## 用户文档更新规则
- 使用模板流程、应用信息配置、初始化步骤变化时,更新 [usage.md](usage.md)。
- 安装、配置、快速开始流程变化时,更新 [usage.md](usage.md)。
- 配置结构、变量语法、server/storage/logging 字段变化时,更新 [config.md](config.md)。
- 生产构建、可执行文件运行、运行时依赖变化时,更新 [deploy.md](deploy.md)。
- 常见错误、配置校验、构建失败排查方式变化时,更新 [troubleshoot.md](troubleshoot.md)。

View File

@@ -20,7 +20,7 @@ server:
level: info
file:
level: info
path: "./logs/my-app.log"
path: "./logs/alfred.log"
rotation:
size: 50MB
frequency: daily
@@ -57,7 +57,7 @@ server:
| 字段 | 类型 | 说明 |
| ----- | ------ | ----------------------------------------------- |
| level | string | 文件日志级别,未设置时继承 server.logging.level |
| path | string | 日志文件路径,默认 <dataDir>/logs/my-app.log |
| path | string | 日志文件路径,默认 <dataDir>/logs/alfred.log |
### server.logging.file.rotation

View File

@@ -6,7 +6,7 @@
```bash
bun run build
./dist/my-app config.yaml
./dist/alfred config.yaml
```
启动后:
@@ -24,7 +24,7 @@ scripts/build.ts 执行三步流水线:
```text
1. Vite build -> dist/web/(前端静态资源,含 code splitting
2. Code generation -> .build/static-assets.ts + .build/server-entry.ts含版本号字面量注入
3. Bun compile -> dist/my-app(单可执行文件)
3. Bun compile -> dist/alfred(单可执行文件)
```
- Vite 构建前端资源到 dist/web/,自动 code splittingvendor-react、vendor-tdesign、vendor-chart
@@ -36,7 +36,7 @@ scripts/build.ts 执行三步流水线:
| 产物 | 用途 |
| ----------- | ---------------------------------------- |
| dist/my-app | 生产可执行文件(含前端资源,单文件部署) |
| dist/alfred | 生产可执行文件(含前端资源,单文件部署) |
| dist/web/ | Vite 构建的前端资源(构建中间产物) |
## 构建参数

View File

@@ -1,6 +1,6 @@
# 故障排查
本文档记录使用模板时的常见问题和排查入口。
本文档记录使用 Alfred·阿福时的常见问题和排查入口。
## 配置校验失败

View File

@@ -1,31 +1,14 @@
# 使用模板
# 快速开始
本文档说明如何使用本模板创建新项目
本文档说明如何安装和配置 Alfred·阿福
## 1. 克隆模板
## 1. 安装依赖
```bash
git clone <template-repo-url> my-project
cd my-project
rm -rf .git && git init
bun install
```
## 2. 配置应用信息
编辑 `src/shared/app.ts`,修改应用元信息:
```typescript
export const APP = {
name: "your-app", // 机器标识kebab-case
title: "Your App", // 人类可读标题
subtitle: "你的副标题", // 副标题
description: "应用描述", // SEO meta 描述
} as const;
```
同时修改 `package.json``name` 字段保持一致,`version` 字段管理应用版本号。
## 3. 准备配置文件
## 2. 准备配置文件
```bash
cp config.example.yaml config.yaml
@@ -33,24 +16,7 @@ cp config.example.yaml config.yaml
按需编辑 `config.yaml` 中的监听地址、日志、存储路径等配置。配置文件为启动时的必传参数。
## 4. 清理 OpenSpec 历史
删除模板自带的 OpenSpec 变更历史,保留框架配置:
```bash
rm -rf openspec/specs/*
rm -rf openspec/changes/*
```
`openspec/config.yaml``openspec/schemas/fast-drive/` 需要保留,其中包含项目开发规范配置与自定义 OpenSpec workflow schema。
## 5. 安装依赖
```bash
bun install
```
## 6. 开始开发
## 3. 启动开发模式
```bash
bun run dev config.yaml