{"id":31588475,"url":"https://github.com/yanchikfox/clinicmanager","last_synced_at":"2026-05-04T00:31:51.211Z","repository":{"id":317851476,"uuid":"1068704588","full_name":"YanchikFox/ClinicManager","owner":"YanchikFox","description":"JavaFX desktop suite for clinics: onboarding, scheduling, appointments, and notification automation on SQLite.","archived":false,"fork":false,"pushed_at":"2025-10-03T12:27:46.000Z","size":72013,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-03T13:31:55.735Z","etag":null,"topics":["desktop-app","flyway","gradle","healthcare","java","javafx","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YanchikFox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-02T19:30:26.000Z","updated_at":"2025-10-03T13:13:53.000Z","dependencies_parsed_at":"2025-10-03T13:32:02.728Z","dependency_job_id":null,"html_url":"https://github.com/YanchikFox/ClinicManager","commit_stats":null,"previous_names":["yanchikfox/clinicmanager"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/YanchikFox/ClinicManager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YanchikFox%2FClinicManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YanchikFox%2FClinicManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YanchikFox%2FClinicManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YanchikFox%2FClinicManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YanchikFox","download_url":"https://codeload.github.com/YanchikFox/ClinicManager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YanchikFox%2FClinicManager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278547821,"owners_count":26004775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["desktop-app","flyway","gradle","healthcare","java","javafx","sqlite"],"created_at":"2025-10-06T02:09:36.197Z","updated_at":"2026-05-04T00:31:51.192Z","avatar_url":"https://github.com/YanchikFox.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# 🏥 Clinic Manager ![Gradle CI](https://github.com/YanchikFox/ClinicManager/actions/workflows/gradle-ci.yml/badge.svg)\n\nDesktop suite for running a modern medical practice. Clinic Manager bundles patient onboarding, doctor scheduling, visit management, and notification automation into a single JavaFX experience backed by SQLite.\n\n\u003c/div\u003e\n\n---\n\n## Contents\n- [Highlights](#highlights)\n- [Feature tour](#feature-tour)\n- [Architecture](#architecture)\n- [Data model at a glance](#data-model-at-a-glance)\n- [Quick start](#quick-start)\n- [Daily workflows](#daily-workflows)\n- [Development guide](#development-guide)\n- [Troubleshooting](#troubleshooting)\n\n## Highlights\n- **Two-role access** – patients and doctors receive dedicated dashboards tailored to their needs.\n- **Virtual time engine** – simulate busy clinic days in minutes; appointments, slots, and reminders react instantly.\n- **Automation-first design** – background jobs clean expired slots, auto-generate availability, and nudge patients before visits.\n- **Offline friendly** – bootstrap a fresh SQLite database locally with one Gradle task; Flyway migrations and demo seed data live in version control for reproducible demos.\n\n## Feature tour\n| Area | What you get |\n| --- | --- |\n| **Authentication \u0026 onboarding** | Email/password login, guided registration for patients and licensed doctors, automatic provisioning of medical cards and initial time slots. |\n| **Patient cockpit** | Browse the doctor list, book or reschedule visits, save favourites, review medical history, and read notifications in one window. |\n| **Doctor cockpit** | Monitor the live schedule, manage availability slots, review upcoming appointments, and record visit outcomes without leaving the panel. |\n| **Virtual time controls** | Shared start/stop/set time controls for doctors and patients with granular listeners that trigger automation on every tick. |\n| **Notifications** | Real-time reminders for upcoming visits, status changes, and administrative actions delivered straight into the patient UI. |\n\n\u003e 💡 **Tip:** Launch the virtual clock before a demo to showcase automated slot clean-up and visit completion.\n\n## Architecture\n```\nsrc/main/java/com/clinicmanager\n├── app/            ─► Application bootstrap \u0026 login wiring\n├── gui/            ─► JavaFX controllers and UI helpers\n├── controller/     ─► Shared presentation logic between dashboards\n├── model/          ─► Domain entities (accounts, doctors, patients, visits)\n├── repository/     ─► SQLite data access objects managed by a central context\n├── service/        ─► Business rules (registration, scheduling, notifications)\n├── time/           ─► Virtual clock, tick handler, automation hooks\n└── security/       ─► Password hashing and token utilities\n```\n- **DefaultApplicationContainer** initialises the SQLite connection, repository manager, and reusable services for dependency injection across controllers.\n- **RepositoryManager** exposes typed repositories (accounts, doctors, patients, schedules, slots, appointments, notifications) that share one lifecycle-managed connection.\n- **TimeManager** and **TimeTickHandler** coordinate the virtual clock, dispatching events to update schedules, finalise overdue visits, and push reminders.\n\n## Data model at a glance\n| Table | Purpose |\n| --- | --- |\n| `accounts` | Authentication records with hashed passwords and role metadata. |\n| `doctors`, `patients` | Profile details, contact info, and role-specific flags. |\n| `schedules` \u0026 `slots` | Availability templates and generated visit slots. |\n| `appointments` | Booked visits with status tracking and timestamps. |\n| `medical_cards` \u0026 `medical_records` | Longitudinal patient history authored by doctors. |\n| `notifications` | User-facing alerts triggered by automation or manual actions. |\n| `favorite_doctors` | Patient shortcuts to frequently booked practitioners. |\n\nSchema migrations live in `src/main/resources/db/migration/` and are executed with Flyway. No binary database is tracked in Git—each developer generates a local copy on demand.\n\n## Quick start\n1. **Install dependencies**\n   - JDK 17+\n   - (Optional) A local Gradle install – the project bundles the Gradle Wrapper.\n   - No manual JAR download is required: Gradle pulls JavaFX (via the OpenJFX plugin), SQLite, SLF4J, and all supporting native\n     artifacts automatically during the build.\n2. **Initialise the database** (creates `clinic.db` next to the project root)\n   ```bash\n   ./gradlew initDatabase\n   ```\n   The helper task wraps the `DatabaseSetup` tool and will also accept a custom location via\n   `./gradlew initDatabase -PdbPath=path/to/your.db`. If you prefer to interact with Flyway\n   directly you can still invoke `./gradlew flywayMigrate`. Skipping this step is fine as well\n   – the application triggers the same migrations when it boots.\n3. **Run the desktop app**\n   ```bash\n   ./gradlew run\n   ```\n4. **Sign in or register** using the start menu. Sample credentials from the demo seed migration include:\n   - Doctor: `doctor.stone@example.com` / `doctor123`\n   - Patient: `alice.johnson@example.com` / `patient123`\n   Feel free to create fresh ones through the registration flow.\n\n### Database refresh\nNeed a clean slate? Remove the old file and re-run the migrations:\n```bash\nrm -f clinic.db\n./gradlew flywayMigrate\n```\nFlyway picks up any migration files under `src/main/resources/db/migration/`, so new scripts run automatically for every developer.\n\n## Daily workflows\n- **Front desk demo:** Register a patient and doctor, then jump into the patient dashboard to book a visit. Switch to the doctor panel to confirm the appointment and add a medical record.\n- **Scheduling blitz:** From the doctor panel, open the schedule manager, generate new slots, and let the virtual clock run to showcase automatic clean-up.\n- **Notification spotlight:** Trigger reminders by scheduling an appointment that starts in the next few virtual minutes, then fast-forward using the time controls.\n\n## Development guide\n- **Build \u0026 test**\n  ```bash\n  ./gradlew build       # compile \u0026 run unit tests\n  ./gradlew run         # launch JavaFX client\n  ./gradlew jlinkZip    # produce a self-contained runtime image\n  ```\n- Gradle resolves runtime dependencies (JavaFX, SQLite JDBC, SLF4J, etc.) on demand, so keep the `lib/` directory empty and out\n  of version control.\n- **Coding conventions**\n  - Keep controller logic thin; push domain decisions into services.\n  - Register new repositories with the central manager to reuse the shared connection.\n  - Extend the virtual time automation through `TimeTickHandler` to keep behaviour consistent.\n- **Database access**\n  - `RepositoryManager` owns a single JDBC connection and passes it to every repository.\n    Use try-with-resources (`new RepositoryManager(url)`) or call `closeAll()` during\n    shutdown to dispose of the shared handle.\n  - For multi-step workflows, temporarily disable auto-commit on the connection retrieved\n    from the manager, execute repository calls, then `commit()`/`rollback()` to wrap the\n    operations in one transaction.\n- **UI tweaks**\n  - FXML layouts live under `src/main/resources/gui`.\n  - CSS themes are bundled alongside FXML for quick styling iterations.\n\n## Troubleshooting\n| Symptom | Fix |\n| --- | --- |\n| JavaFX runtime error on startup | Ensure `--module-path` isn’t overridden in your IDE; prefer running via the Gradle `run` task. |\n| SQLite database locked | Close lingering app instances or IDE database explorers, then relaunch the app. |\n| No notifications appear | Confirm the virtual clock is running and that appointments fall within the reminder window. |\n| Time controls disabled | Log in as a doctor or patient; only authenticated users can adjust the virtual clock. |\n\nEnjoy building a clinic experience that feels alive! 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanchikfox%2Fclinicmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyanchikfox%2Fclinicmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyanchikfox%2Fclinicmanager/lists"}