smooth-app
A collaborative, free and open database of ingredients, nutrition facts and information on food products from around the world
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证正在加载完整 README。 以下为已保存的摘录。
Our project for the Build with AI module at AICON'26 (NUST). Assigned domain: Health Operations.
Pakistani hospitals run far over capacity (about 0.6 hospital beds per 1,000 people, one of the lowest rates in the world), and in an overloaded hospital patients get missed. A hospital owner we spoke to named missed care as his biggest operational problem: missed doses, injections, drips, dressings and doctor visits. Care slips at two points:查看完整 README ↗Our project for the Build with AI module at AICON'26 (NUST). Assigned domain: Health Operations.
Live: https://aicon26-er-dashboard-taupe.vercel.app
Pakistani hospitals run far over capacity (about 0.6 hospital beds per 1,000 people, one of the lowest rates in the world), and in an overloaded hospital patients get missed. A hospital owner we spoke to named missed care as his biggest operational problem: missed doses, injections, drips, dressings and doctor visits. Care slips at two points:
ER Command fixes both the same way: the AI reads the mess, code turns it into tasks with an owner and a due time, and the dashboard escalates anything overdue.
We tested the full pipeline (AI reading of the nurse's note plus code triage) on 300 real, anonymised emergency visits (Moon et al. 2019) and compared it with the triage nurses on the same visits. Details are in data/ktas/README.md.
| Under-triage | Urgent patients rated non-urgent | Critical (level 1) patients caught | |
|---|---|---|---|
| Triage nurses | 12.0% | 8 of 75 | 15 of 26 |
| Our pipeline | 6.3% | 2 of 75 | 22 of 26 |
| Code alone, without the AI | 48.7% | 43 of 75 |
data/care/README.md.The rulebook allows templates and boilerplate if they are disclosed. Before the event we prepared a generic starter with no domain logic (the first commit, "Starter built before AICON'26 (disclosed)"):
src/lib/ai/**): plain fetch adapters for Gemini, OpenAI, Groq and Anthropic; backup model, time limit, answer cache.src/domains/**, most of src/components/**, src/lib/usePipeline.ts, /api/extract, /api/analyze, /api/summarize, /api/status). The ER app does not use the pipeline; we are removing it as the ER screens replace it.Everything for the ER dashboard, all visible in the commit history:
src/er/types.ts); the triage, allocation, simulation, care-plan and rounds engine (src/er/engine.ts); order reading (src/er/orders.ts, /api/care); note parsing and AI prompts (src/er/intake.ts, src/er/prompts.ts); the /api/intake and /api/advise routes; synthetic demo patients (src/er/mock.ts); the evaluation on real visits (scripts/evaluate.ts), the real-case replay pool (src/er/replay.ts) and the evidence numbers (src/er/evidence.ts).src/components/command/) was a full redesign by Hafi. It is modelled on award-winning bedside monitors and hospital command centres, and uses Atkinson Hyperlegible for legibility on a projector.src/er/mock.ts are synthetic.You need Node.js 22 or newer (node -v to check).
npm install
cp .env.example .env.local
npm run dev
Open http://localhost:3000. It works without an AI key: intake falls back to simple rules and the brief to a template, shown with an amber "rules" badge.
Add the AI key: create a free key at https://aistudio.google.com/apikey, paste it after GEMINI_API_KEY= in .env.local, restart npm run dev, then open http://localhost:3000/api/status?ping=1 and check for "ping":"ok". Git ignores .env.local, so the key never reaches GitHub.
Test the AI without the UI:
curl -s -X POST localhost:3000/api/intake -H 'content-type: application/json' -d '{"note":"67 saal mard, seene mein dard aur paseena, BP 88/60, pulse 112, sat 94"}'
Nurse note ─► AI intake ─► Code triage ─► Code allocation ─► Dashboard ─► Code alerts ─► AI brief
(EN / UR / (vitals, (level 1–5, (bed zone, (patients, (no beds, (EN or UR,
Roman Urdu) needs, flags) doctor match) beds, KPIs) boarding ...) for the
unsure) charge nurse)
Code and AI split the work. The AI reads messy notes and writes the brief. Code does everything that must be exact and auditable: the triage level, bed and doctor allocation, wait times and KPIs. The AI's only influence on priority is highRisk, which can raise a patient's level and never lower it.
| Part | File |
|---|---|
| Shared types (the contract between backend and frontend) | src/er/types.ts |
| Triage, allocation, simulation, KPIs, alerts | src/er/engine.ts |
| AI prompts | src/er/prompts.ts |
| Cleaning AI output, rules fallback | src/er/intake.ts |
| Synthetic demo patients | src/er/mock.ts |
| AI routes | src/app/api/intake, src/app/api/advise |
| AI provider layer | src/lib/ai/ |
src/er/demo-notes.ts have their real AI answers saved in src/er/demo-answers.json, which is part of the repo. They come back instantly with cached: true, on the laptop and on the live site, even if Gemini is down. The 2 sample photos for New arrival (public/demo/slip-*.jpg, see data/intake/README.md) have saved answers too. If you change the prompt, run node scripts/warm.ts with the dev server running to refresh them all, or node scripts/warm.ts slips to refresh only the sample photos..ai-cache/ on that machine, so a repeated demo replays instantly. The live site can't save files, so it asks Gemini fresh.AI_FALLBACK_MODEL, which has its own free quota. A brief server error gets one retry first.AI_TIME_LIMIT seconds (25 by default), the routes fall back to rules instead of keeping the audience waiting.main as production and every other branch as a preview. The project needs these environment variables: AI_PROVIDER=gemini, AI_MODEL=gemini-3.5-flash-lite, AI_FALLBACK_MODEL=gemini-3.1-flash-lite and GEMINI_API_KEY. Saved answers in .ai-cache/ stay on your laptop; the deployed site asks the AI live.Hafi works on backend, Haider on frontend. File ownership, the API contract, the task lists and the Git flow are in AGENTS.md, which Codex, Cursor and Copilot read automatically (Claude Code through CLAUDE.md). Each laptop has its own gitignored ME.md naming its person and role.
| Problem | Fix |
|---|---|
| Amber "rules" badge everywhere | Key missing in .env.local, or the server was not restarted |
/api/status?ping=1 says API key not valid | Copy the key again from AI Studio |
models/... is not found | Change AI_MODEL to a model listed at https://ai.google.dev/gemini-api/docs/models |
| Same old answer every time | That's the cache. Delete .ai-cache/ |
| Port 3000 in use | npm run dev -- -p 3001 |