feat: shared rendering, footer, terms of service, git deployment, consistency fixes

Rendering consistency:
- Create shared renderProtocolPill() and renderCollectionPill() functions
  used everywhere: library, collection detail, user profile, picker
- All protocol/collection modules now look identical across all contexts
- Profile page collections and protocols use the same shared renderers
- Protocol grids wrapped in .protocol-grid for consistent spacing

New features:
- Footer with CC-BY 4.0 license link and Terms of Service link
- Terms of Service page stating admin reserves right to remove content
- CC-BY 4.0 default license for submitted content

Deployment:
- README now recommends git clone for initial deployment
- README documents git pull for updates without data loss
- All nav links use #protocols instead of #library

Bug fixes (from previous commits, re-applied to current codebase):
- Delete redirect: reset currentRoute guard so navigate works after delete
- #protocols routing instead of #library
- forked_from: null no longer shows as clickable link
- Source field suppressed when it duplicates author
- Collections say 'curated by' instead of 'authored by'
- Breadcrumb home click works from detail pages
- Search debounce and double-navigation guard
This commit is contained in:
Protocolbot
2026-07-06 22:40:34 -06:00
parent d3077c78b0
commit 1148c19fd6
4 changed files with 169 additions and 107 deletions
+38 -15
View File
@@ -62,20 +62,39 @@ protocol-droid/
### On Cloudron
1. Create a LAMP app in Cloudron (no MySQL addon needed — uses SQLite)
2. Upload all files to the app's web root
2. Clone the repo into the app's web root:
```bash
cd /var/www/html # or your Cloudron app's web root
git clone https://git.medlab.host/ntnsndr/protocol-droid.git .
```
3. Ensure the `data/` directory is writable by the web server:
```bash
mkdir -p data && chown www-data:www-data data && chmod 775 data
```
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**
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.
6. 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.
### Updating
To update an existing deployment without losing data, simply pull the latest code:
```bash
cd /path/to/protocol-droid
git pull
```
The SQLite database (`data/protocol_droid.db`) is not tracked by git and will be preserved across updates. The schema uses `CREATE TABLE IF NOT EXISTS` so existing tables are never overwritten.
### On any LAMP server
1. Upload files to your web root (or a subdirectory like `/protocol-droid/`)
1. Clone the repo to your web root (or a subdirectory like `/protocol-droid/`):
```bash
cd /var/www/html/protocol-droid
git clone https://git.medlab.host/ntnsndr/protocol-droid.git .
```
2. Ensure the `data/` directory is writable by the web server
3. Visit the site and register — first user becomes admin
@@ -103,7 +122,22 @@ 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, go to the **About** page and click **"Load seed protocols"** (admins only).
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
```
## API
@@ -158,17 +192,6 @@ 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/