chore: 初始化 monorepo 脚手架与代码骨架

- Bun workspaces:apps/web(Vue 3.5 + Vite 8 + naive-ui)· apps/server(Hono 4.13 + Drizzle)· packages/shared(契约类型)
- 代码骨架:四表 Drizzle schema · 11 个端点占位(501)· 管理面口令中间件 · 同步引擎占位(5 分钟 tick + 防重入)
- 命令链:dev / build / test / lint / type-check / db:*(见 AGENTS.md)
This commit is contained in:
2026-09-14 23:54:58 +08:00
parent 45b312b357
commit 138a1b7685
50 changed files with 2739 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
import { createRouter, createWebHistory } from 'vue-router'
/**
* 路由(交互设计 §0.1 / §1):
* - 无前缀 = 查看面(一期仅 `/usage-log`,`/` 重定向到它;二期候选 `/dashboard`)
* - `/manage` 前缀 = 管理面(口令门帘由 ManageLayout 承担;入口在查看面不暴露)
*/
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{ path: '/', redirect: '/usage-log' },
{
path: '/usage-log',
name: 'usage-log',
component: () => import('@/views/UsageLogView.vue'),
},
{
path: '/manage',
component: () => import('@/views/manage/ManageLayout.vue'),
children: [
{ path: '', redirect: '/manage/api-keys' },
{
path: 'api-keys',
name: 'manage-api-keys',
component: () => import('@/views/manage/ApiKeysView.vue'),
},
{
path: 'purchases',
name: 'manage-purchases',
component: () => import('@/views/manage/PurchasesView.vue'),
},
{
path: 'qpu',
name: 'manage-qpu',
component: () => import('@/views/manage/QpuView.vue'),
},
],
},
],
})
export default router