基于 Deno Fresh 的现代化中文后台管理系统,具备 Islands 架构、零 JS 首屏和极致性能。
- Islands 架构:默认零 JS,按需水合交互组件
- Deno 原生:无需 node_modules,TypeScript 开箱即用
- 边缘部署:优化用于 Deno Deploy
- Preact:轻量级 UI 库
- Signals:细粒度响应式状态
- Tailwind CSS:原子化样式
├── deno.json # Deno 配置
├── dev.ts # 开发入口
├── main.ts # 生产入口
├── routes/ # 页面路由
├── islands/ # 交互组件
├── components/ # 静态组件
├── lib/ # 工具库
├── tests/ # 单元测试
├── static/ # 静态资源
└── .github/ # CI/CD 配置
deno task dev # 开发模式
deno task build # 生产构建
deno task start # 启动生产服务器deno task fmt # 格式化代码
deno task fmt:check # 检查格式
deno task lint # 代码检查
deno task check # 类型检查
deno task ci # 运行所有检查(格式、lint、类型、测试)deno task test # 运行测试
deno task test:watch # 监视模式
deno task test:coverage # 测试覆盖率(生成 lcov 报告)测试位于 tests/ 目录,包含:
tests/lib/utils.test.ts- 工具函数测试tests/lib/config.test.ts- 配置测试tests/lib/stores.test.ts- 状态管理测试
| 类别 | 技术 |
|---|---|
| 运行时 | Deno 2 |
| 核心框架 | Fresh 2 + Preact |
| 状态管理 | @preact/signals |
| 样式 | Tailwind CSS 3.4 |
- Islands 架构:只有交互组件发送到客户端
- 零配置:TypeScript、JSX 开箱即用
- 边缘优先:专为 Deno Deploy 优化
- Deno 生态:安全、现代的 JavaScript 运行时