Internal documentation — not for public distribution
Protocol Health Club © 2026

Quick Start

Access the dashboard, run a smoke test, and check environment variables.

Access the Dashboard

# SSH tunnel from your local machine
ssh -L 3000:localhost:3000 ubuntu@protocolhc.duckdns.org

# Then open in browser
http://localhost:3000

Run a Smoke Test

cd /home/ubuntu/app
.venv/bin/python smoke_test.py

Expected output:

[Junction]      PASS  production/us — HTTP 200
[GoHighLevel]   PASS  HTTP 200

── Summary ──────────────────────
  Junction      PASS
  GoHighLevel   PASS

Start the Next.js Server

cd /home/ubuntu/app/web
nohup npm run dev -- --port 3000 > /tmp/nextjs.log 2>&1 &

# Verify it's running
curl -s -o /dev/null -w "%{http_code}" http://localhost:3000
# → 200

Environment Variables

All secrets live in /home/ubuntu/app/.env and web/.env.local:

# Junction
JUNCTION_API_KEY=pk_us_...
JUNCTION_ENV=production
JUNCTION_REGION=us

# AWS Bedrock
AWS_BEARER_TOKEN_BEDROCK=ABSK...
AWS_REGION=us-east-1

# Bedrock model IDs
BEDROCK_MODEL_FAST=us.anthropic.claude-haiku-4-5-20251001-v1:0
BEDROCK_MODEL_SMART=us.anthropic.claude-sonnet-4-6
BEDROCK_MODEL_OPUS=us.anthropic.claude-opus-4-7

# GoHighLevel
GHL_ACCESS_TOKEN=pit-...
GHL_LOCATION_ID=VXhSATpOGAvRAnd0iu7x

# DuckDNS
DUCKDNS_TOKEN=...
DUCKDNS_DOMAIN=protocolhc

Repo Layout

app/
├── .env                     ← all secrets (never committed)
├── docs/                    ← internal markdown reference
├── smoke_test.py            ← API auth verification
├── docs-site/               ← this docs site (Next.js)
└── web/                     ← pipeline dashboard (Next.js)
    ├── pipeline.db          ← SQLite trace store
    ├── public/output/       ← generated client PDFs
    └── lib/
        ├── bedrock.ts       ← Bedrock client
        ├── db.ts            ← SQLite setup
        └── pipeline/        ← pipeline step modules
            ├── runner.ts    ← orchestrator
            ├── parse.ts     ← biomarker extraction
            ├── analyze.ts   ← clinical analysis
            └── generatePdf.ts