← Foundations Course

SYSTEM FOUNDATIONS · 16

End-to-End Case Study:從 Commit 到使用者看到 Course List

這一課不再加新名詞。你要把 01–15 的每一層串起來,並在故障時用「最後成功 / 第一失敗」定位問題。

Learning outcomes

1. 開發與發布路徑

Developer edits
  ↓
git commit
  ↓
git push
  ↓
GitHub main
  ↓
CI
  ↓
build artifact
  ↓
deploy
  ↓
production URL

2. 使用者 Request 路徑

User enters URL
  ↓
DNS
  ↓
network / port / TLS
  ↓
HTTP GET /
  ↓
HTML/CSS/JS
  ↓
Browser runtime
  ↓
GET /api/courses

3. Server/Data 路徑

API request
  ↓
authentication
  ↓
authorization
  ↓
SQL SELECT
  ↓
database rows
  ↓
JSON response
  ↓
Browser state
  ↓
DOM render

4. Incident A:Domain 正常,但 /api/courses 500

DNS 與 TLS 已至少成功到能收到 HTTP 500。重點應轉向 server logs、database query、environment,而不是再改 DNS。

5. Incident B:API 200,畫面卻空白

Network:
200 OK
[
  {"id":1,"title":"JS"}
]

Console:
TypeError ...

Network/server 可能已成功;下一步查 parse/state/render。

6. Incident C:新 code GitHub 有,production 還是舊版

查 production deployment 對應 commit SHA、workflow run、artifact/version,而不是只看 repository latest commit。

Project checkpoint:Request Journey Map Final

Source
 → Git
 → GitHub
 → CI
 → Build
 → Deploy
 → DNS
 → IP/Port
 → TLS/HTTP
 → Browser runtime
 → API
 → Auth
 → Database
 → JSON
 → State
 → DOM

之後所有進階課程都只是把這張圖某一段放大。

7. Diagnostic routine

1. Reproduce
2. Identify layer
3. Find last success
4. Find first failure
5. Gather evidence
6. Form one hypothesis
7. Minimal experiment
8. Verify regression

Knowledge check

  1. 收到 HTTP 500 時,DNS 是否至少已工作到某個程度?
  2. API 200 但 UI 空白,你會依序查哪幾層?
  3. 最新 GitHub commit 為什麼不等於 production version?
  4. 不用看答案,從空白紙畫出整張 Request Journey Map。