fix: YAML folded scalar parser, delete redirect, #protocols routing, forked_from null

- Fix YAML fallback parser to properly handle folded scalars (>-) at
  both top-level (description, outcome, practice) and step-level
  (step descriptions). Previously stored '>-' as the literal value
  instead of the folded text.

- Fix delete protocol/collection: reset currentRoute guard so
  navigate('library') actually works after deletion.

- Change #library hash to #protocols throughout (routing, nav links,
  breadcrumb shows 'protocols/' on the main page).

- Fix breadcrumb home click not working from detail pages (allow
  re-navigation to library even if currentRoute matches).

- Fix forked_from: null showing as a clickable link — now suppressed
  when value is null or the string 'null'.

- README: replace curl seed instructions with About page button,
  add About page customization instructions for whitelabeling.
This commit is contained in:
Protocolbot
2026-07-06 20:42:44 -06:00
parent 524d9b9c95
commit 4c05c1067e
4 changed files with 93 additions and 84 deletions
+13 -17
View File
@@ -69,7 +69,7 @@ protocol-droid/
```
4. The database schema auto-initializes on first API request (creates `data/protocol_droid.db`)
5. Visit the site and register — the **first user to register becomes admin**
6. Optionally load seed protocols: sign in as admin and `POST /api/seed` (or use the API endpoint with curl: `curl -b cookies.txt -X POST https://your-site/api/seed`)
5. Optionally load seed protocols: Go to the **About** page and click **"Load seed protocols"** (visible to admins only). This loads 6 example protocols into your library in one click. No curl needed.
**No default admin credentials exist.** A fresh deployment has an empty database. The first registration creates the admin account. Seed protocols are optional and must be explicitly loaded.
@@ -103,22 +103,7 @@ cd protocol-droid
php -S localhost:8000
```
The SQLite database is created automatically at `data/protocol_droid.db`. The first registration creates the admin account. To load the 6 sample protocols (Round Robin Check-In, Consent Decision-Making, etc.):
```bash
# After registering as admin:
curl -c cookies.txt -X POST http://localhost:8000/api/auth/login \
-H 'Content-Type: application/json' \
-d '{"username":"your-username","password":"your-password"}'
curl -b cookies.txt -X POST http://localhost:8000/api/seed
```
To remove all seed protocols (or any protocols), delete them individually:
```bash
curl -b cookies.txt -X DELETE http://localhost:8000/api/protocols/round-robin-check-in
```
The SQLite database is created automatically at `data/protocol_droid.db`. The first registration creates the admin account. To load the 6 sample protocols, go to the **About** page and click **"Load seed protocols"** (admins only).
## API
@@ -173,6 +158,17 @@ practice: >-
Use a talking object. Keep time gently. For large groups, break into smaller rounds.
```
## Customizing the About page
The About page is plain HTML in `frontend/index.html`, inside the `<section id="view-about">` element. To customize it for your deployment:
1. Edit `frontend/index.html`
2. Find the `<!-- ABOUT VIEW -->` section
3. Modify the text, links, and sections as needed
4. Upload the file to your server
No rebuild step is needed — the HTML is served directly. The "Seed protocols" section at the bottom is automatically shown only to admin users, so you can leave it or remove it.
## License
Hippocratic License (HL3-CORE) — do no harm. See https://firstdonoharm.dev/