Brak opisu

Codex d4c11cb933 Complete production backend curriculum and apply Shuh branding 1 miesiąc temu
.openai d507c649b4 Build API service curriculum with interactive lessons and runnable FastAPI lab 1 miesiąc temu
app d4c11cb933 Complete production backend curriculum and apply Shuh branding 1 miesiąc temu
components d507c649b4 Build API service curriculum with interactive lessons and runnable FastAPI lab 1 miesiąc temu
examples d507c649b4 Build API service curriculum with interactive lessons and runnable FastAPI lab 1 miesiąc temu
hooks d507c649b4 Build API service curriculum with interactive lessons and runnable FastAPI lab 1 miesiąc temu
lib d507c649b4 Build API service curriculum with interactive lessons and runnable FastAPI lab 1 miesiąc temu
public d4c11cb933 Complete production backend curriculum and apply Shuh branding 1 miesiąc temu
scripts d4c11cb933 Complete production backend curriculum and apply Shuh branding 1 miesiąc temu
.gitignore d507c649b4 Build API service curriculum with interactive lessons and runnable FastAPI lab 1 miesiąc temu
.oxfmtrc.json d507c649b4 Build API service curriculum with interactive lessons and runnable FastAPI lab 1 miesiąc temu
.oxlintrc.json d507c649b4 Build API service curriculum with interactive lessons and runnable FastAPI lab 1 miesiąc temu
README.md d4c11cb933 Complete production backend curriculum and apply Shuh branding 1 miesiąc temu
components.json d507c649b4 Build API service curriculum with interactive lessons and runnable FastAPI lab 1 miesiąc temu
next.config.ts d507c649b4 Build API service curriculum with interactive lessons and runnable FastAPI lab 1 miesiąc temu
package-lock.json d507c649b4 Build API service curriculum with interactive lessons and runnable FastAPI lab 1 miesiąc temu
package.json d4c11cb933 Complete production backend curriculum and apply Shuh branding 1 miesiąc temu
tsconfig.json d507c649b4 Build API service curriculum with interactive lessons and runnable FastAPI lab 1 miesiąc temu
vite.config.ts d507c649b4 Build API service curriculum with interactive lessons and runnable FastAPI lab 1 miesiąc temu

README.md

术核 AI · 后端工程课件

面向掌握 Python 基础、需要补齐后端工程经验的开发者。课程按 API、数据库、持久化服务、任务、缓存、容器、部署和排障组织。

模块 标识 课时
API 服务开发 api 16
数据库开发 database 12
API + 数据库 api-database 12
异步任务开发 tasks 16
Redis 缓存 redis 10
Docker 容器化 docker 10
Linux 部署 linux 10
线上问题排查 troubleshooting 12

每节包含目标、概念、实战步骤、验收、排错、练习答案和官方文档。后七个模块另有生产场景、实现决策、故障演练和恢复验收。

本地运行

需要 Node.js 22.13 或更新版本。

npm install
npm run dev

访问终端显示的地址。原有 ?lesson=01 链接继续指向 API 课时。其他模块使用 ?module=database&lesson=01,模块概览使用 ?module=database。浏览器前进、后退和移动端目录均可用。

内容维护

  • app/lessons.json:API 模块数据。
  • public/content/{模块标识}.json:后续七个模块。按需载入,切换模块时显示载入或重试状态。
  • app/module-catalog.ts:名称、前置关系、工程边界、完成标准和课时数量。
  • app/course.tsx:通用课件页面,不需要为每个新模块复制页面代码。
  • app/lesson-types.ts:课件结构。每个模块内部课时从 01 连续编号;不保存教师视图或录制时长字段。
  • app/demos.tsx、app/task-delivery-demo.tsx:浏览器内概念演示。模型演示不发送实际后端请求。
  • app/globals.css:正文、导航和响应式样式。
  • public/brand/:从 shuh.ai 下载的原始 Logo、favicon 和来源记录。
  • scripts/build-course-content.mjs:验证课件结构、课时数、生产练习字段及文档链接格式,生成各模块 Markdown 下载。

增加课时后同步修改目录数量;分组从每节 group 字段自动生成。修改内容后运行:

npm run content
python scripts/check-python-snippets.py
node --experimental-strip-types scripts/test-course-navigation.mjs
npm exec tsc -- --noEmit
npm run build

接入视频

在 app/videos.json 中使用“模块标识/课时编号”作为键。未配置视频时,不显示播放器或空占位。旧 API 编号键仍兼容。

{
  "api/01": { "type": "file", "url": "/videos/api-01.mp4" },
  "database/01": {
    "type": "link",
    "url": "https://你的课程平台/实际视频地址",
    "title": "PostgreSQL 练习环境"
  }
}

file 用于浏览器支持的 MP4/WebM 文件,可用 captions 指定 WebVTT 中文字幕地址;link 在视频平台打开。视频文件放在 public/videos/,或使用可访问的 HTTPS 媒体地址。这里不提供上传、转码或视频平台授权功能。

实战代码与验证边界

examples/ 和 public/downloads/api-lab.zip 是已运行验证的 FastAPI 基础参考项目,包含 30 项测试。其接口不自动包含后续课程新增的 ORM、队列和部署配置。

后续模块在课件中按步骤创建和演进 notes-service,提供 SQL、Python、Compose、systemd 和 Nginx 等示例。模块 Markdown 可从网页下载。代码片段必须遵循每一步的文件路径、前置定义和替换说明,不能全部无差别追加到一个文件。外部服务实验需要学员具备对应环境;课件结构和代码语法校验不等同于真实数据库、Docker 或 Linux 故障演练已执行。

数据库使用独立 notes_lab,示例宿主端口为 PostgreSQL 5433、Redis 缓存 6380、任务 broker 6384;Redis 容量、AOF、复制实验分别使用 6381、6382、6383。容器内部使用服务名和 5432/6379,不能把宿主地址机械复制到容器里。数据库备份、停止进程、锁等待、资源限制等故障操作均限于课件指定的隔离环境。

发布

继续使用 .openai/hosting.json 中已有 Sites 项目。发布会更新既有网页,访问范围保持现有设置。页面上线只提供课件和静态下载,不会在 Sites 中启动 PostgreSQL、Celery 或 Python 示例服务。