feat: Phase 0 — monorepo 骨架 + 全表迁移 + FastAPI/Next 骨架 + CI

- uv(workspace) + pnpm monorepo;docker-compose(pg+api+web)
- SQLAlchemy 16 MVP 表 + Alembic 初版迁移(无漂移,users stub)
- FastAPI 骨架:统一错误信封(带 request_id) + structlog + /jobs/:id + OpenAPI
- Next.js 骨架:纸感主题 token + OpenAPI→TS 客户端代码生成(gen:api)
- CI(ruff/mypy/pytest + pg service + alembic 漂移校验)
- 四份设计规格(PRODUCT/UX/ARCHITECTURE/DEV_PLAN) + CLAUDE.md
This commit is contained in:
Yaojia Wang
2026-06-18 11:38:28 +02:00
commit d3dc620a71
74 changed files with 12960 additions and 0 deletions

50
apps/web/app/globals.css Normal file
View File

@@ -0,0 +1,50 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
/* 纸感设计 tokenUX_SPEC §2.1 */
:root {
--color-bg: #f5f1e8;
--color-panel: #fbf8f1;
--color-ink: #2b2620;
--color-ink-soft: #6b6356;
--color-line: #e5ddcd;
--color-cinnabar: #a23b2e;
--color-cinnabar-wash: #a23b2e14;
--color-conflict: #b5543a;
--color-overdue: #c8893a;
--color-pass: #5a6b4f;
--color-info: #4a5a6b;
}
body {
background: var(--color-bg);
color: var(--color-ink);
}
/* 流式打字机光标:朱砂闪烁;尊重 prefers-reduced-motionUX §10。 */
.typewriter-cursor {
animation: typewriter-blink 1s step-end infinite;
}
@keyframes typewriter-blink {
50% {
opacity: 0;
}
}
/* 冲突就地标注锚点朱砂波浪下划线UX §8.3)。 */
.conflict-anchor {
text-decoration: underline wavy var(--color-conflict);
text-underline-offset: 3px;
transition: background-color 0.15s ease;
}
@media (prefers-reduced-motion: reduce) {
.typewriter-cursor {
animation: none;
}
.conflict-anchor {
transition: none;
}
}

23
apps/web/app/layout.tsx Normal file
View File

@@ -0,0 +1,23 @@
import type { Metadata } from "next";
import "./globals.css";
import { ToastProvider } from "@/components/Toast";
export const metadata: Metadata = {
title: "网文创作工作流",
description: "把写小说当软件工程:架构→生成→质检→单一真相源",
};
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="zh-CN">
<body className="font-sans antialiased">
<ToastProvider>{children}</ToastProvider>
</body>
</html>
);
}