DTD TenderLoop 0.4.3 - self-hosted
====================================

TenderLoop 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 DESKTOP APP (one person, no administrator rights: dtd-tenderloop-0.4.3-windows-desktop.zip)
  1. Unzip the desktop zip and double-click "Install DTD TenderLoop.cmd".
  2. DTD TenderLoop opens in its own window. The FIRST account you create becomes the administrator.
  It runs on this computer only (127.0.0.1), works without internet access, starts when you open it and stops
  after 30 minutes without use (or with "Stop DTD TenderLoop" in the Start menu).
  Program and data: %LOCALAPPDATA%\DTD\DTD TenderLoop   (another data folder: add -DataDir <folder> when installing)
  Remove:  Settings > Apps > DTD TenderLoop, or "Uninstall DTD TenderLoop" in the Start menu (asks whether to keep data)

WINDOWS SERVER (shared by several people; 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 8106
     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 TenderLoop    Data: C:\ProgramData\DTD TenderLoop\data
  Remove:  powershell -ExecutionPolicy Bypass -File "C:\Program Files\DTD TenderLoop\uninstall.ps1"   (data is kept;
           add -RemoveData to delete it)

LINUX (x64, systemd)
  1. tar -xzf dtd-tenderloop-0.4.3-linux-x64.tar.gz && cd dtd-tenderloop-0.4.3-linux-x64
  2. sudo ./install.sh --port 8106 [--origin https://dtd.yourcompany.co.uk]
  3. Open the address it prints. The FIRST account you create becomes the administrator.
  Program: /opt/dtd-tenderloop    Data: /var/lib/dtd-tenderloop    Service: systemctl status dtd-tenderloop
  Remove:  sudo /opt/dtd-tenderloop/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):
  - Team: GBP 89 a month, or GBP 890 a year (two months free); up to 10 users.
  - Business: GBP 179 a month, or GBP 1790 a year (two months free); up to 50 users.
    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: Administration > Data & backups (Back up now, daily automatic backups, restore steps), or run
    node launcher.mjs backup --data <data folder> from the program folder (Windows: node\node.exe).
    Keep copies somewhere else.
  - Email: Administration > Email sends notifications through YOUR OWN mail server, never through DTD.
  - 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-tenderloop.log

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