smooth-app
전 세계 식품의 성분·영양·정보를 자유롭게 협업하고 공개하는 데이터베이스
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기自動抓取缺藥平台的替代藥品公告
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
專為臨床醫療人員、藥局採購與藥師設計的西藥供應狀態監測面板。本系統透過自動化排程介接衛福部食藥署開放資料,提供即時、視覺化且易於檢索的藥品短缺與替代資訊。 • 臨床導向的缺藥分級:嚴格區分「無替代藥品 (紅)」、「有替代藥品 (黃)」與「已解除短缺 (綠)」,協助快速確立處置優先級。 • 智慧型決策輔助: • 自動計算「缺藥持續天數」,精準標示長期斷鏈品項。 • 運用正規表達式 (Regex) 自動萃取公告內文的「替代藥品建議」與「預計恢復時間」。 • 多維度數據分析 (Recharts):提供月度/年度的紅黃綠複合疊加長條圖 (Stacked Bar Chart),視覺化呈現整體供應壓力與恢復彈性的趨勢變化。 • 高效率多條件篩選器:支援以「字串 (品名/字號)」、「狀態 (紅/黃/綠)」、「公告年份」進行交集過濾,並具備自訂排序邏輯(最新公告/缺藥最久/字母排序)。 • 雙軌資料時效警示:分別偵測兩種「畫面停在過去」的失效模式,兩者互為獨立訊號、可同時顯示。 • 排程停跑 — last_updated 逾 10 天未前進即警示(GitHub 會自動停用長期無活動 repo 的排程)。 • 上游停更 — 排程照跑但食藥署最大公告日期連續 4 個觀測區間未前進時提示。此為疑似訊號而非停更證明:同日修訂、舊公告修正、單一端點停更都不會觸發。README 전문 보기 ↗
English | 繁體中文
A drug supply monitoring dashboard designed for clinical staff, pharmacy purchasing and pharmacists. An automated schedule ingests open data from the Taiwan Food and Drug Administration (TFDA) and presents drug shortage and alternative information in a timely, visual and easily searchable form. The interface is in Traditional Chinese.
last_updated hasn't advanced for more than 10 days (GitHub automatically disables schedules in long-inactive repos).The project uses a serverless + SSG (static site generation) architecture for the highest availability and lowest hosting cost.
| Stage | Component | Logic and technology |
|---|---|---|
| Data source | Ministry of Health and Welfare open data API | Endpoint codes: 104 (alternative available), 105 (no alternative), 106 (resolved) |
| ETL | GitHub Actions + Python | Runs fetch_fda_data.py early every Friday morning, cleaning data and merging it into supply_status_latest.json. Fail-closed, and serialized with a concurrency group (only one copy of cross-run state) |
| Supplement scraping | Local scheduled task + Python | While the open data is frozen, a daily local task runs update_supplement.py, diffs a full list snapshot of the TFDA drug-supply website against the main file, and writes only supply_supplement.json (never the main file). The site may block non-Taiwan IPs, so this does not run on GitHub Actions |
| Frontend rendering | React + TypeScript + Vite | Reads static JSON and renders a responsive UI with custom CSS (BEM naming); applies the supplement diff and shows per-category red warnings when the supplement is unavailable |
| Hosting | GitHub Pages | Served from GitHub's global CDN for fast loading |
public/data/supply_status_latest.json){
"last_updated": "2026-09-08 12:04:33", // last successful ETL "check" time; advances on every successful run
"upstream_max_date": "2026/08/31", // latest upstream announcement date; null means no baseline to compare
"frozen_runs": 0, // consecutive observation periods without the upstream date advancing
"last_observed_period": "2026-W37", // counting unit: ISO week in Taiwan time (reruns in the same week don't count)
"datasets": { }
}
⚠️ last_updated only means "checked", not "data updated". To judge whether upstream is still moving, look at
upstream_max_date / frozen_runs; the two semantics must not be mixed. The last three fields are optional;
if an older data file lacks them the frontend disables the stale-upstream prompt rather than erroring.
To run or modify the project locally, make sure Node.js (v18+) and Python (v3.10+) are installed.
git clone https://github.com/<your-account>/TFDA-drug-shortage-dashboard.git
cd TFDA-drug-shortage-dashboard
npm install # install dependencies
npm run dev # start the local dev server
npm run build # type check (tsc) + Vite build → dist/
npm run lint # ESLint
# Fetch TFDA 104/105/106 open data and merge into public/data/supply_status_latest.json
# Fail-closed: any connection / HTTP / JSON / validation failure on any endpoint aborts without overwriting existing data
uv run --with requests python scripts/fetch_fda_data.py
# Supplement scraping (needs a Taiwan network): sync remote → scrape → commit/push if changed
uv run --with requests==2.34.2 python scripts/update_supplement.py
# Register the daily task (once; run `uv venv && uv pip install requests==2.34.2` first)
powershell -File scripts/register_supplement_task.ps1
npm run test # data pipeline + supplement apply (Vitest, 207 cases)
uv run --with pytest --with requests pytest scripts # ETL / stale detection / supplement / task wrapper (pytest, 251 cases)
Browser behaviour (supplement banners, offline cache) is covered by SMOKE_TEST.md.
.ai-review/ keeps each increment's spec, raw Codex independent-review output and item-by-item verdicts.
Before changing a feature, read the "non-goals" section of its spec — it is the anchor against scope creep.
| Increment | Spec | Review / verdict |
|---|---|---|
| Whole-repo code review (CR-01–CR-14) | — | codex-review.md / verdict.md / remediation-log.md |
| Upstream stale detection (F1–F15b) | plan-upstream-freeze.md | plan-review-upstream-freeze.md / plan-verdict-upstream-freeze.md |
| Supplement scraping (S, three review rounds) | plan-supplement.md | plan-review-supplement.md / plan-verdict-supplement.md |