ระบบจัดตารางเวรอัตโนมัติ – คำนวณและปรับแต่งตารางเวรแพทย์อย่างชาญฉลาด
Translation pending
HealthJavaScript · HTMLGitHub @PleumAOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
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.
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
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.Read the full 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 |