init: 初始化 AssetX 项目仓库

包含 webapp(Next.js 用户端)、webapp-back(Go 后端)、
antdesign(管理后台)、landingpage(营销落地页)、
数据库 SQL 和配置文件。
This commit is contained in:
2026-03-27 11:26:43 +00:00
commit 2ee4553b71
634 changed files with 988255 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
/**
* Design System - Tokens Index
*
* 统一导出所有设计 tokens
*/
export { primitives } from './primitives';
export { semanticTokens, lightTokens, darkTokens } from './semantic-tokens';
export { radius } from './radius';
export { spacing } from './spacing';
export { typography } from './typography';
export type { PrimitiveColors } from './primitives';
export type { SemanticTokens, LightTokens, DarkTokens } from './semantic-tokens';
export type { Radius } from './radius';
export type { Spacing } from './spacing';
export type { Typography } from './typography';

View File

@@ -0,0 +1,75 @@
/**
* Design System - Primitive Colors
*
* 原始色板定义,包含所有基础颜色值
* 这些值直接映射到设计规范中的颜色
*/
export const primitives = {
// 基础色
base: {
1: '#ffffff',
10: '#222222',
12: '#000000',
},
// 品牌色系(灰度)
brand: {
1: '#fcfcfd',
2: '#f9fafb',
3: '#f3f4f6',
4: '#e5e7eb',
5: '#d1d5db',
6: '#9ca1af',
7: '#6b7280',
8: '#4b5563',
9: '#374151',
10: '#1f2937',
11: '#111827',
12: '#030712',
},
// 绿色系(成功/强调)
green: {
1: '#e1f8ec',
9: '#10b981',
10: '#00ad76',
11: '#008352',
},
// 蓝色系(链接/强调)
blue: {
1: '#ebf2ff',
9: '#1447e6',
10: '#0d3cc7',
11: '#0831a8',
},
// 红色系(警告/错误)
red: {
9: '#ef4444',
10: '#dc2626',
11: '#b91c1c',
},
// 黄色系(警告)
yellow: {
9: '#f59e0b',
10: '#d97706',
11: '#b45309',
},
// Dark Mode 专用色
dark: {
zinc: {
50: '#fafafa',
400: '#a1a1aa',
500: '#71717a',
800: '#27272a',
900: '#18181b',
950: '#0a0a0a',
},
},
} as const;
export type PrimitiveColors = typeof primitives;

View File

@@ -0,0 +1,19 @@
/**
* Design System - Border Radius
*
* 圆角规范定义
*/
export const radius = {
none: '0',
sm: '0.125rem', // 2px
base: '0.25rem', // 4px
md: '0.375rem', // 6px
lg: '0.5rem', // 8px
xl: '0.75rem', // 12px
'2xl': '1rem', // 16px
'3xl': '1.5rem', // 24px
full: '9999px', // 圆形
} as const;
export type Radius = typeof radius;

View File

@@ -0,0 +1,102 @@
/**
* Design System - Semantic Tokens
*
* 语义化颜色 tokens定义 Light 和 Dark 模式下的颜色用途
* 组件应该使用这些语义化的名称,而不是直接使用原始色板
*/
import { primitives } from './primitives';
/**
* Light Mode Semantic Tokens
*/
export const lightTokens = {
text: {
primary: primitives.brand[11], // #111827 - 主要文本
secondary: primitives.brand[8], // #4b5563 - 次要文本
tertiary: primitives.brand[6], // #9ca1af - 辅助文本
inverse: primitives.base[1], // #ffffff - 反色文本(深色背景上)
disabled: primitives.brand[5], // #d1d5db - 禁用文本
},
bg: {
base: primitives.base[1], // #ffffff - 主背景
subtle: primitives.brand[2], // #f9fafb - 次级背景
surface: primitives.base[1], // #ffffff - 卡片/表面背景
elevated: primitives.brand[3], // #f3f4f6 - 提升背景
overlay: 'rgba(0, 0, 0, 0.5)', // 遮罩层
},
border: {
normal: primitives.brand[4], // #e5e7eb - 标准边框
subtle: primitives.brand[3], // #f3f4f6 - 微妙边框
strong: primitives.brand[5], // #d1d5db - 强调边框
},
accent: {
green: primitives.green[9], // #10b981 - 绿色强调
greenBg: primitives.green[1], // #e1f8ec - 绿色背景
blue: primitives.blue[9], // #1447e6 - 蓝色强调
blueBg: primitives.blue[1], // #ebf2ff - 蓝色背景
red: primitives.red[9], // #ef4444 - 红色强调
yellow: primitives.yellow[9], // #f59e0b - 黄色强调
},
special: {
black: primitives.base[12], // #000000 - 纯黑(特殊用途)
white: primitives.base[1], // #ffffff - 纯白(特殊用途)
},
} as const;
/**
* Dark Mode Semantic Tokens
*/
export const darkTokens = {
text: {
primary: primitives.dark.zinc[50], // #fafafa - 主要文本
secondary: primitives.dark.zinc[400], // #a1a1aa - 次要文本
tertiary: primitives.dark.zinc[500], // #71717a - 辅助文本
inverse: primitives.brand[11], // #111827 - 反色文本(浅色背景上)
disabled: primitives.dark.zinc[500], // #71717a - 禁用文本
},
bg: {
base: primitives.dark.zinc[950], // #0a0a0a - 主背景
subtle: primitives.dark.zinc[950], // #0a0a0a - 次级背景
surface: primitives.dark.zinc[900], // #18181b - 卡片/表面背景
elevated: primitives.dark.zinc[800], // #27272a - 提升背景
overlay: 'rgba(0, 0, 0, 0.7)', // 遮罩层
},
border: {
normal: primitives.dark.zinc[800], // #27272a - 标准边框
subtle: primitives.dark.zinc[900], // #18181b - 微妙边框
strong: '#3f3f46', // 强调边框
},
accent: {
green: primitives.green[9], // #10b981 - 绿色强调(保持一致)
greenBg: 'rgba(16, 185, 129, 0.15)', // 绿色背景(透明)
blue: primitives.blue[9], // #1447e6 - 蓝色强调(保持一致)
blueBg: 'rgba(20, 71, 230, 0.15)', // 蓝色背景(透明)
red: primitives.red[9], // #ef4444 - 红色强调
yellow: primitives.yellow[9], // #f59e0b - 黄色强调
},
special: {
black: primitives.base[12], // #000000 - 纯黑(特殊用途)
white: primitives.base[1], // #ffffff - 纯白(特殊用途)
},
} as const;
/**
* 导出统一的 semantic tokens 结构
*/
export const semanticTokens = {
light: lightTokens,
dark: darkTokens,
} as const;
export type SemanticTokens = typeof semanticTokens;
export type LightTokens = typeof lightTokens;
export type DarkTokens = typeof darkTokens;

View File

@@ -0,0 +1,24 @@
/**
* Design System - Spacing
*
* 间距规范定义
*/
export const spacing = {
0: '0',
1: '0.25rem', // 4px
2: '0.5rem', // 8px
3: '0.75rem', // 12px
4: '1rem', // 16px
5: '1.25rem', // 20px
6: '1.5rem', // 24px
8: '2rem', // 32px
10: '2.5rem', // 40px
12: '3rem', // 48px
16: '4rem', // 64px
20: '5rem', // 80px
24: '6rem', // 96px
32: '8rem', // 128px
} as const;
export type Spacing = typeof spacing;

View File

@@ -0,0 +1,178 @@
/**
* Design System - Typography Tokens
*
* 字体大小和样式规范定义
*/
/**
* Serif Display 系列 (Domine/Noto Serif)
* 用于大标题、引用等展示性文本
*/
export const serifDisplay = {
giant: {
bold: { fontSize: '100px', lineHeight: '100%', fontWeight: '700', letterSpacing: '-0.03em' },
regular: { fontSize: '100px', lineHeight: '100%', fontWeight: '400', letterSpacing: '-0.03em' },
},
hero: {
bold: { fontSize: '64px', lineHeight: '110%', fontWeight: '700', letterSpacing: '-0.02em' },
regular: { fontSize: '64px', lineHeight: '110%', fontWeight: '400', letterSpacing: '-0.02em' },
},
title1: {
bold: { fontSize: '48px', lineHeight: '120%', fontWeight: '700', letterSpacing: '-0.01em' },
regular: { fontSize: '48px', lineHeight: '120%', fontWeight: '400', letterSpacing: '-0.01em' },
},
title2: {
bold: { fontSize: '32px', lineHeight: '120%', fontWeight: '700', letterSpacing: '-0.01em' },
regular: { fontSize: '32px', lineHeight: '120%', fontWeight: '400', letterSpacing: '-0.01em' },
},
quote: {
bold: { fontSize: '24px', lineHeight: '130%', fontWeight: '700', letterSpacing: '-0.005em' },
regular: { fontSize: '24px', lineHeight: '130%', fontWeight: '400', letterSpacing: '-0.005em' },
},
text: {
bold: { fontSize: '16px', lineHeight: '150%', fontWeight: '700' },
regular: { fontSize: '16px', lineHeight: '150%', fontWeight: '400' },
},
} as const;
/**
* Sans Heading 系列 (Inter/Noto Sans)
* 用于标题和子标题
*/
export const sansHeading = {
h1: {
bold: { fontSize: '48px', lineHeight: '120%', fontWeight: '700', letterSpacing: '-0.01em' },
medium: { fontSize: '48px', lineHeight: '120%', fontWeight: '500', letterSpacing: '-0.01em' },
regular: { fontSize: '48px', lineHeight: '120%', fontWeight: '400', letterSpacing: '-0.01em' },
},
h2: {
bold: { fontSize: '32px', lineHeight: '120%', fontWeight: '700', letterSpacing: '-0.01em' },
medium: { fontSize: '32px', lineHeight: '120%', fontWeight: '500', letterSpacing: '-0.01em' },
regular: { fontSize: '32px', lineHeight: '120%', fontWeight: '400', letterSpacing: '-0.01em' },
},
h3: {
bold: { fontSize: '24px', lineHeight: '130%', fontWeight: '700', letterSpacing: '-0.005em' },
medium: { fontSize: '24px', lineHeight: '130%', fontWeight: '500', letterSpacing: '-0.005em' },
regular: { fontSize: '24px', lineHeight: '130%', fontWeight: '400', letterSpacing: '-0.005em' },
},
h4: {
bold: { fontSize: '20px', lineHeight: '140%', fontWeight: '700' },
medium: { fontSize: '20px', lineHeight: '140%', fontWeight: '500' },
regular: { fontSize: '20px', lineHeight: '140%', fontWeight: '400' },
},
} as const;
/**
* Sans Body 系列
* 用于正文和段落文本
*/
export const sansBody = {
large: {
bold: { fontSize: '18px', lineHeight: '150%', fontWeight: '700' },
medium: { fontSize: '18px', lineHeight: '150%', fontWeight: '500' },
regular: { fontSize: '18px', lineHeight: '150%', fontWeight: '400' },
},
default: {
bold: { fontSize: '16px', lineHeight: '150%', fontWeight: '700' },
medium: { fontSize: '16px', lineHeight: '150%', fontWeight: '500' },
regular: { fontSize: '16px', lineHeight: '150%', fontWeight: '400' },
},
small: {
bold: { fontSize: '14px', lineHeight: '150%', fontWeight: '700' },
medium: { fontSize: '14px', lineHeight: '150%', fontWeight: '500' },
regular: { fontSize: '14px', lineHeight: '150%', fontWeight: '400' },
},
} as const;
/**
* Sans Caption 系列
* 用于说明文字、标签等小字
*/
export const sansCaption = {
tiny: {
bold: { fontSize: '12px', lineHeight: '150%', fontWeight: '700', letterSpacing: '0.01em' },
medium: { fontSize: '12px', lineHeight: '150%', fontWeight: '500', letterSpacing: '0.01em' },
regular: { fontSize: '12px', lineHeight: '150%', fontWeight: '400', letterSpacing: '0.01em' },
},
minuscule: {
bold: { fontSize: '10px', lineHeight: '150%', fontWeight: '700', letterSpacing: '0.02em' },
medium: { fontSize: '10px', lineHeight: '150%', fontWeight: '500', letterSpacing: '0.02em' },
regular: { fontSize: '10px', lineHeight: '150%', fontWeight: '400', letterSpacing: '0.02em' },
},
} as const;
/**
* Mono Numeric 系列 (JetBrains Mono)
* 用于数字、统计数据展示
*/
export const monoNumeric = {
giant: {
extraBold: { fontSize: '48px', lineHeight: '110%', fontWeight: '800', letterSpacing: '-0.01em' },
bold: { fontSize: '48px', lineHeight: '110%', fontWeight: '700', letterSpacing: '-0.01em' },
medium: { fontSize: '48px', lineHeight: '110%', fontWeight: '500', letterSpacing: '-0.01em' },
regular: { fontSize: '48px', lineHeight: '110%', fontWeight: '400', letterSpacing: '-0.01em' },
},
huge: {
extraBold: { fontSize: '32px', lineHeight: '120%', fontWeight: '800', letterSpacing: '-0.005em' },
bold: { fontSize: '32px', lineHeight: '120%', fontWeight: '700', letterSpacing: '-0.005em' },
medium: { fontSize: '32px', lineHeight: '120%', fontWeight: '500', letterSpacing: '-0.005em' },
regular: { fontSize: '32px', lineHeight: '120%', fontWeight: '400', letterSpacing: '-0.005em' },
},
large: {
extraBold: { fontSize: '24px', lineHeight: '130%', fontWeight: '800' },
bold: { fontSize: '24px', lineHeight: '130%', fontWeight: '700' },
medium: { fontSize: '24px', lineHeight: '130%', fontWeight: '500' },
regular: { fontSize: '24px', lineHeight: '130%', fontWeight: '400' },
},
default: {
extraBold: { fontSize: '16px', lineHeight: '140%', fontWeight: '800' },
bold: { fontSize: '16px', lineHeight: '140%', fontWeight: '700' },
medium: { fontSize: '16px', lineHeight: '140%', fontWeight: '500' },
regular: { fontSize: '16px', lineHeight: '140%', fontWeight: '400' },
},
} as const;
/**
* Mono Code 系列
* 用于代码、技术文本
*/
export const monoCode = {
small: {
extraBold: { fontSize: '14px', lineHeight: '150%', fontWeight: '800' },
bold: { fontSize: '14px', lineHeight: '150%', fontWeight: '700' },
medium: { fontSize: '14px', lineHeight: '150%', fontWeight: '500' },
regular: { fontSize: '14px', lineHeight: '150%', fontWeight: '400' },
},
tiny: {
extraBold: { fontSize: '12px', lineHeight: '150%', fontWeight: '800' },
bold: { fontSize: '12px', lineHeight: '150%', fontWeight: '700' },
medium: { fontSize: '12px', lineHeight: '150%', fontWeight: '500' },
regular: { fontSize: '12px', lineHeight: '150%', fontWeight: '400' },
},
minuscule: {
extraBold: { fontSize: '10px', lineHeight: '150%', fontWeight: '800' },
bold: { fontSize: '10px', lineHeight: '150%', fontWeight: '700' },
medium: { fontSize: '10px', lineHeight: '150%', fontWeight: '500' },
regular: { fontSize: '10px', lineHeight: '150%', fontWeight: '400' },
},
} as const;
/**
* 统一导出
*/
export const typography = {
serif: {
display: serifDisplay,
},
sans: {
heading: sansHeading,
body: sansBody,
caption: sansCaption,
},
mono: {
numeric: monoNumeric,
code: monoCode,
},
} as const;
export type Typography = typeof typography;