Platform operator guide to the public sandbox hospital: the real HMS on made-up data, passwordless role entry, the nightly reset, its guardrails and commands.

Sandbox Hospital

The sandbox is a normal hospital on the platform that is marked as a sandbox. It runs the real HMS (every screen, every workflow, the real APIs) on made-up people, so anyone can try any role without an account. It is reset every night.

What visitors see

/sa/try returns Not found on every real hospital and on letsupdoc.com/sa.

Nightly reset

php artisan sa:sandbox:reset --all runs every night at 02:00 Riyadh time. For each sandbox it:

  1. Deletes only that hospital's rows (the same per-table list as export and delete) and the people who belong only to it, including staff and patients that visitors added. Other hospitals are never touched.
  2. Keeps the hospital, its addresses and its branches; re-creates the default roles and privileges and the PDPL vendor defaults.
  3. Seeds the made-up staff, patients and workflow states again, with times relative to now.
  4. Removes uploaded files stored under the hospital's folder.

The reset runs in one database transaction: if anything fails, the previous data stays and the error is logged. A reset takes well under a minute.

Guardrails

Area In the sandbox
Text messages and email Never sent. SMS always goes to the log (kept in the notification log as stubbed); invites are never mailed.
AI Works, up to SA_SANDBOX_AI_CALLS_PER_DAY calls a day (default 300). After that the features show their rule-based answers and the banner says so. AI requests are limited to SA_SANDBOX_AI_PER_MINUTE per IP (default 6 a minute).
Video Works between the sandbox's own doctor and patients; a call ends after SA_SANDBOX_VIDEO_MAX_MINUTES (default 15).
Uploads Images or PDF only, up to 2 MB, stored under the sandbox's own folder and deleted on reset.
Hospital settings Roles and privileges, staff, doctor hours and PDPL settings can be changed (they are reset). The hospital's addresses, logo and branding cannot.
New staff and patient logins The email address is always rewritten onto @sandbox.letsupdoc.test, so a visitor can never attach or reserve a real person's address.
Downloads Allowed (the data is made up). File names start with SANDBOX- and CSV files start with a SANDBOX - made-up data line.
Entry At most SA_SANDBOX_ENTRIES_PER_HOUR role entries per IP per hour (default 20).
Audit Every action is still audited, so the audit log shows activity.

Commands

Command What it does
php artisan sa:sandbox:create sandbox demo Creates the sandbox hospital sandbox (enterprise plan, active) at demo.letsupdoc.com and seeds it.
php artisan sa:sandbox:reset sandbox Resets one sandbox now. Refuses any hospital that is not a sandbox.
php artisan sa:sandbox:reset --all Resets every sandbox (the nightly job).

Make it the public demo

Set SA_SANDBOX_PUBLIC_URL=https://demo.letsupdoc.com (then php artisan config:cache). The role cards on /sa/hub and Try the Demo on the /sa landing page then open the sandbox. Without it they keep opening the fixture demo at /sa/demo, which keeps working either way.

Related pages