OP OperixHealthcare Operations Docs
HR1-style shell Coverage
Routes, build, and regression shortcuts

Developer Reference

Docs generation, tenancy hotspots, onboarding and scorecard surfaces, and the highest-signal regression commands for ongoing development.

Docs buildTenancyAIRegression suite
Commands

Build And Regression Shortcuts

py -3 -B documentation/generate_static_docs.py
py -3 -B documentation/check_docs_coverage.py
node documentation/capture_evidence.mjs
py -3 -B documentation/sync_public_docs.py
node documentation/run_smoke_flow.mjs
node documentation/run_self_serve_smoke_flow.mjs
npm run release:gate
php artisan db:seed --class=Database\Seeders\LiveDemoSeeder --force
powershell -ExecutionPolicy Bypass -File deploy/cpanel/package-cpanel.ps1
bash deploy/cpanel/prepare-ftp-payload.sh
php artisan test --filter=InstallerFinishReadinessTest
php artisan test --filter=LaunchCompatibilityTest
php artisan test --filter=SaaSExpansionTest
php artisan test --filter=AiIntegrationTest
php artisan test --filter=PlatformOperationsTest
php artisan test --filter=PlatformExpansionTest
php artisan test --filter=RoleDashboardModuleTest
php artisan test --filter=PharmacyBillingModuleTest
php artisan Operix:upgrade-multi-clinic
php artisan Operix:audit-tenants
php artisan Operix:repair-tenant {tenant} --write
php artisan Operix:repair-migration-state central --write
php artisan Operix:seed-demo --profile=sales
php artisan Operix:refresh-platform-health
php artisan Operix:reset-demo --clinic={tenant}
php artisan Operix:refresh-commercial-health
php artisan Operix:replay-communication-deliveries
php artisan inventory:dispatch-alerts --honor-schedule
php artisan insights:dispatch-digest --honor-schedule
php artisan ai:dispatch-daily-briefs --honor-schedule
Architecture

Route And Context Split

  • routes/platform.php keeps clinic switching, onboarding, lifecycle, memberships, and platform health outside tenant middleware.
  • routes/self-serve.php adds public plans, signup, SSO redirect and callback, owner onboarding, and Twilio delivery callbacks without forking the tenancy model.
  • Existing module routes stay on the tenant side with selected.clinic and tenant.context middleware, including scorecard, Smart Insights, AI, communications, and Plan & Limits.
  • routes/communications.php now covers both the outbound hub and first-class communication templates.
  • routes/api.php mirrors the split with central platform endpoints and clinic-scoped private endpoints for scorecards, templates, AI review metadata, and queue actions.
  • Dynamic settings are re-applied after tenancy initialization so branding, timezone, and AI defaults remain clinic-specific.
  • Queued jobs and scheduled commands iterate clinic contexts explicitly rather than assuming a single operational database.
Acceptance

Release Gate Contract

  • npm run release:gate is the repo-local release contract and should be treated as the last local proof step before a buyer-facing release.
  • The gate is intentionally sequential: platform-admin smoke flow, self-serve owner smoke flow, evidence capture, docs generation, docs coverage, then targeted Laravel suites.
  • Tenant-heavy acceptance work is kept sequential so tenant database creation, switching, and cleanup do not collide during smoke runs.
  • The highest-signal regression additions for the current hardening pass are InstallerFinishReadinessTest and LaunchCompatibilityTest.
Hotspots

Files Worth Reading First

Platform And Clinics

54 mapped file(s).

  • app/Http/Controllers/Platform/AuditExportController.php
  • app/Http/Controllers/Platform/ClinicController.php
  • app/Http/Controllers/Platform/ClinicInviteAcceptanceController.php
  • app/Http/Controllers/Platform/ClinicLifecycleController.php
Smart Insights

25 mapped file(s).

  • app/Services/Insights/SmartInsightService.php
  • app/Services/System/ModuleReadinessService.php
AI Copilot

36 mapped file(s).

  • app/Services/Ai/AiAnalyticsService.php
  • app/Services/Ai/AiRunService.php
  • app/Services/Ai/Contracts/AiProvider.php
  • app/Services/Ai/Data/AiGenerationResult.php
Pharmacy

40 mapped file(s).

  • app/Services/Pharmacy/InventoryService.php
  • app/Services/Prescription/PrescriptionService.php
Billing

13 mapped file(s).

  • app/Services/Billing/BillingService.php
Coverage summary

395 files are mapped across 17 documented modules.