DTD HealthSupply 0.3.0 - self-hosted
====================================

HealthSupply with Administration, running on YOUR
server. Everything you store (database, files, backups) stays on this machine. DTD never receives your data; the server
only asks dtdconsultancy.com whether a newer, DTD-signed version exists (sending just its version number).

The full guide is docs/INSTALL.md (also on dtdconsultancy.com). Quick start:

WINDOWS (Windows 10/11 or Windows Server 2016+)
  1. Unzip this folder.
  2. Open PowerShell with "Run as administrator" in the unzipped folder and run:
       powershell -ExecutionPolicy Bypass -File .\install.ps1 -Port 8102
     Optional: -AppOrigin https://dtd.yourcompany.co.uk   -NoFirewall
  3. Open the address it prints. The FIRST account you create becomes the administrator.
  Program: C:\Program Files\DTD HealthSupply    Data: C:\ProgramData\DTD HealthSupply\data
  Remove:  powershell -ExecutionPolicy Bypass -File "C:\Program Files\DTD HealthSupply\uninstall.ps1"   (data is kept;
           add -RemoveData to delete it)

LINUX (x64, systemd)
  1. tar -xzf dtd-healthsupply-0.3.0-linux-x64.tar.gz && cd dtd-healthsupply-0.3.0-linux-x64
  2. sudo ./install.sh --port 8102 [--origin https://dtd.yourcompany.co.uk]
  3. Open the address it prints. The FIRST account you create becomes the administrator.
  Program: /opt/dtd-healthsupply    Data: /var/lib/dtd-healthsupply    Service: systemctl status dtd-healthsupply
  Remove:  sudo /opt/dtd-healthsupply/uninstall.sh   (data is kept; add --remove-data to delete it)

AFTER INSTALLING
  - Free trial: every app for 30 days. Then enter the licence key DTD sends you in
    Administration > Licence & updates. If a licence ends, your data stays readable but cannot be changed.
  - Plans (per organisation, excluding VAT; see Administration > Licence & updates for limits and upgrades):
  - Single site: GBP 79 a month, or GBP 790 a year (two months free); up to 10 users, 1 site.
  - Group: GBP 199 a month, or GBP 1990 a year (two months free); up to 50 users, 10 sites.
    Limits are gentle: admins are warned as they near, a short grace allowance keeps work moving, and nobody
    already using the app loses access.
  - Regulatory reference data (thresholds, PPNs, Companies House and NHS dates) is checked by DTD before each
    release and arrives with updates; the date it was checked is on the About page. Keep updates switched on.
  - Optional: Companies House lookups use your own free API key (Administration > Licence & updates). TenderPilot
    can search Find a Tender's public notices; your server calls these services directly, never through DTD.
  - People join by invitation (Team & settings > Invite).
  - Updates install automatically between 01:00 and 05:00 (switch off in Administration). The database is backed
    up first, and a version that will not start is rolled back automatically.
  - Backups: run   node launcher.mjs backup --data <data folder>   from the program folder (Windows: use
    node\node.exe), or stop the service and copy the data folder. Keep copies somewhere else.
  - For HTTPS, put a reverse proxy (IIS, Caddy, nginx) in front and set TRUST_PROXY=1 in config.json.

Settings live in config.json in the data folder: PORT, APP_ORIGIN, SIGNUP_MODE (invite), HOST, TRUST_PROXY,
UPDATE_MANIFEST_URL. Restart the service after changing them. Logs: <data folder>/logs/dtd-healthsupply.log

Node.js is included (folder "node"; its licence is node/LICENSE). Support: dtdconsultancy.com
