尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证An automatic, zero-backend, client-side on-call and night shift scheduler for hospital doctors and medical staff, featuring Monte Carlo simulation and strict constraint management.
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
PleumA.github.io
Automatic On-Call & Night Shift Doctor Scheduler
This website was developed by Vibe Code using Antigravity model Gemini 3.1 Pro, combined with Claude Sonnet 4.6 (Thinking) for allocating night-shift doctor duties.
📖 How the algorithm works (Technical Logic Report) — A detailed, deep-dive technical reference on the Monte Carlo solver engine, constraint cascades, scoring metrics, and system architecture. Essential reading for anyone auditing or extending this medical scheduling tool.查看完整 README ↗This website was developed by Vibe Code using Antigravity model Gemini 3.1 Pro, combined with Claude Sonnet 4.6 (Thinking) for allocating night-shift doctor duties.
📖 How the algorithm works (Technical Logic Report) — A detailed, deep-dive technical reference on the Monte Carlo solver engine, constraint cascades, scoring metrics, and system architecture. Essential reading for anyone auditing or extending this medical scheduling tool.
A:R1, B:R2) and calculates duty separately for each role pool. When OFF, treats all doctors as a single pool.
R1), leaving individual cell doctor chips completely free of role suffixes. Suffixes are also moved to headers in exported Excel spreadsheets and copied clipboard data.R1:12, R2:10), or per doctor when Role-Based mode is OFF (e.g., A:5, B:4).
ขาดคน (Missing) without crashing and displays a warning toast.ขาดคน) if no eligible doctor is available due to constraints. When OFF (default), a 5-level Must-Fill cascade progressively relaxes spacing, conflict, and off-request rules to force-fill the slot.A:B or A conflicts with B) from working the same shift.1, 2) are removed from headers and badges to keep layout cells clean.Ctrl+Z or the Undo button (shown once there is something to undo) to revert cell edits and Reset-all. Undo rebuilds the schedule from the solver's original picks, so it never needs a new solver run. Removing a doctor is not undoable.popover panel from the header button. On phones each schedule row becomes a card and the header scrolls away instead of sticking..ics file (RFC 5545) or open Google Calendar for everyone, a role group, or one person (pick the scope next to the buttons).sw.js) and a web app manifest (manifest.json) cache the app files, the locally compiled stylesheet (dist/output.css), fonts, and the version-pinned third-party libraries (SheetJS, Lucide 1.55.0) for offline use in hospital wards with spotty Wi-Fi. The app's own files are fetched network-first (a new deploy shows on the next load; offline falls back to the cache); CDN files are cache-first.git clone https://github.com/PleumA/PleumA.github.io
cd PleumA.github.io
npm install # install all dependencies
npm run build # compile Tailwind CSS → dist/output.css
npm test # run all 43 test suites (all should pass ✅)
npm run lint # ESLint + Prettier check (0 errors expected)
npx serve . # serve locally at http://localhost:3000
For a full contributor setup guide, see DEVELOPER_GUIDE.md.
Designed with mobile first-class support in mind to ensure zero stutters on phone browsers:
parseUIConfig): All DOM elements, rules, arrays, and quotas are compiled exactly once into a static state block (parseUIConfig) before the calculation runs. This prevents thousands of slow, redundant DOM lookups and key array allocations from occurring inside the Monte Carlo simulation's hot inner loop or rendering loops.renderTableView and renderCalendarView, standard inline <svg> strings are utilized. This eliminates reliance on automatic DOM-scanning icon libraries (e.g., Lucide) which are notorious for causing layout thrashing and application freezing during table updates.Set structures for conflict checking, holiday checking, and off-day requests instead of traversing nested arrays, improving search execution speeds.setTimeout(..., 0)) sequentially after chunks of iteration logic, maintaining a fluid 60FPS UI and allowing loaders to spin.-webkit-overflow-scrolling: touch and minimum viewport widths to prevent layout squishing on mobile portrait screens.Math.random() tie-breakers in the .sort() callback), which prevents infinite loops or crashes in modern browser sorting engines.< 768px): Replaces cramped inline absolute cell dropdowns on mobile screens with a full-screen blurred Bottom Sheet. Doctor selection elements inside are scaled to a minimum of 48px height with generous touch padding for error-free mobile interaction.Built for high reliability, clean execution, and security:
innerHTML insertion (schedule cells, calendar grid, stats, fairness row, title attributes) goes through esc(...), or the value is bound via textContent.jsArg(...) (a JSON literal, HTML-escaped), so names containing quotes or apostrophes (e.g., O'Connor) cannot break out of the attribute.document.execCommand methods with the modern, asynchronous navigator.clipboard.writeText API, assuring future-proof support and clean error handling via toasts.sanitizeConfig checks the shape of an imported JSON file, coerces values and cleans names (sanitizeName) before anything is applied. If applying still fails, the app is restored from a getCurrentConfig() snapshot, so a bad file never leaves a half-imported state.applyTranslations()), resolving potential browser-freezing infinite recursion loops.| File | Purpose |
|---|---|
index.html | Single-page app shell — layout, Tailwind classes, modals, PWA manifest link, service worker registration |
app.js | Scheduling state, Monte Carlo solver, UI handlers, calendar-export UI, focus-trap utility (~5 400 lines) |
structuredInputs.js | Dynamic structured components — chips, dropdowns, steppers |
translations.js | Dual-language (Thai / English) dictionaries plus shared helpers (esc, sanitizeName) |
calendarExport.js | .ics builder and duty-event collection for calendar export |
sw.js | Service worker — network-first for app files, cache-first for pinned CDN files |
manifest.json | PWA manifest — install config, theme colour |
src/input.css | Tailwind CSS entry point (@tailwind directives) |
dist/output.css | Generated — compiled & minified Tailwind CSS (run npm run build) |
tailwind.config.js | Tailwind config: darkMode: 'class', extended colours |
postcss.config.js | PostCSS pipeline: tailwindcss + autoprefixer |
.eslintrc.cjs | ESLint rules (eslint:recommended + prettier) |
.prettierrc | Prettier formatting config |
.github/workflows/ci.yml | GitHub Actions CI: lint → test → build |
sitemap.xml | Single-page sitemap for SEO |
robots.txt | Crawler permission file |
tests/*.test.js | 43 test suites covering solver logic, UI DOM (jsdom, via tests/domHarness.js), quotas, XSS, import rollback, undo/overrides, calendar export, service worker, and guard tests for Tailwind classes and translation copy. Run with npm test. |
run-tests.js | Built-in test runner — no Jest required; fails on / output and on timeouts |
.json backup file, and instantly import them later to restore your precise environment without re-typing..xlsx download support (via SheetJS).localStorage.UNHANDLEDTypeErrorDESIGN_SYSTEM.md | Reusable component classes and colour tokens |
DEVELOPER_GUIDE.md | Full contributor setup, build, lint, test, and release guide |
CONTRIBUTING.md | Contribution guidelines |
CHANGELOG.md | Version history (Keep a Changelog format) |
logic_report.md | Deep-dive technical reference on the Monte Carlo solver |