Files
blog/frontend
zhaoxi bfc83a2400 feat: 个人博客全栈实现(Rust/Axum + React/Tailwind + PostgreSQL)
后端(Axum + sqlx):
- GitHub OAuth 三层权限(管理员/用户/游客),MOCK_OAUTH 本地调试开关
- 文章 CRUD、草稿自动保存、发布/私有分离,发布时渲染 HTML
- 目录(folder 路径分层)、标签、评论、RSS、热门文章(按评论数)
- pages 表驱动动态内容:关于页、首页标题、个人名片
- S3 兼容对象存储图片上传接口(rust-s3,未配置时明确报错)
- 发布时自动提取正文首图作为封面 cover_url
- sqlx migrate 管理 5 个迁移

前端(React + Tailwind):
- 白天 Editorial / 黑夜星空双主题
- 首页(列表 + 热门侧栏 + 可编辑大标题)、文库(目录树+标签+搜索)
- Profile 页(GitHub 风格名片卡,全部字段后台可编辑)
- 后台:文件树文章管理、CodeMirror 编辑器(实时预览/自动保存/传图)
- Markdown 渲染:KaTeX 公式、代码块语言标注 + 双主题语法高亮
- 有封面的文章卡片自动整行展示,全局 ErrorBoundary

部署:
- docker-compose 本地三容器(postgres/backend/frontend)
- k8s manifests(适配 Caddy 终结 TLS → 隧道 → traefik 明文路由)
- 前端静态文件可由 Caddy 直接托管,集群只需 backend + postgres
- 可选 postgres 每日备份到 S3 的 CronJob
2026-07-18 19:15:49 +08:00
..

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the Oxlint configuration

If you are developing a production application, we recommend enabling type-aware lint rules by installing oxlint-tsgolint and editing .oxlintrc.json:

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",
  "plugins": ["react", "typescript", "oxc"],
  "options": {
    "typeAware": true
  },
  "rules": {
    "react/rules-of-hooks": "error",
    "react/only-export-components": ["warn", { "allowConstantExport": true }]
  }
}

See the Oxlint rules documentation for the full list of rules and categories.