Skip to content

LynCareOS documentation portal — deploy & protect

Version: 1.7
Last Updated: 2026-08-06 14:48:00
Status: Operational guide — Cloudflare Pages + Access (Google)

Private documentation portal for LynCareOS: curated pathways, markdown library viewer (Mermaid), Calm Care presentation. Not the public marketing site.


ItemLocation
Build outputdocs-portal-dist/ (generated — do not edit by hand)
Sourcedocs/10-MAPPINGS/ + whitelisted docs/**/*.md (see scripts/build-docs-portal.ps1)
EngineHybrid: Astro Starlight (docs-portal/) for specs + Calm Care HTML pathways (docs/10-MAPPINGS/)
Pages projectlyncareos-docs-portal
Recommended URLhttps://docs.lyncareos.com
Terminal window
cd D:\Projects\LynCareOS
.\scripts\build-docs-portal.ps1 -Full
npx --yes serve docs-portal-dist -l 8787

-Full (owner-only bundle) includes:

LayerContents
Starlight library101+ specs at /business/…, /architecture/…, Pagefind search, Calm Care theme CSS
Pathways + mapsWhitelisted HTML hub, workflows, vis-network maps
Knowledge portal/knowledge/ — REQ ↔ code map (PMB rebuild on -Full)
BrandPNG icon, illustration SVGs, marketing images when present

| Starlight build | Requires Node; first -Full build installs Playwright Chromium for Mermaid SSR in specs |

Terminal window
.\scripts\deploy-docs-portal.ps1

Deploy always runs -Full — appropriate for Access-gated docs.lyncareos.com (never a public product surface).

Canonical release path: run deploy-docs-portal.ps1 from this machine. This workspace does not use Git; do not wait on CI.

Requires .env.production:

  • CLOUDFLARE_API_TOKEN
  • CLOUDFLARE_ACCOUNT_ID

In Cloudflare dashboard → lyncareos.com zone:

TypeNameTargetProxy
CNAMEdocslyncareos-docs-portal.pages.devProxied (orange)

After first deploy, Wrangler shows the *.pages.dev hostname. Custom domain docs.lyncareos.com is added under Pages → lyncareos-docs-portal → Custom domains.


3. Cloudflare Access + Google (required for private access)

Section titled “3. Cloudflare Access + Google (required for private access)”

This portal uses Cloudflare Zero Trust Access — not a Worker password gate and not basic auth.

  1. Cloudflare Zero Trust → Settings → Authentication
  2. Add → Google
  3. Complete Google OAuth setup (Cloudflare guided flow or your own Google Cloud OAuth client)
  4. Save
  1. Access → Applications → Add an application
  2. Type: Self-hosted
  3. Application name: LynCareOS Docs Portal
  4. Session duration: 24 hours (or 168h to match app Access app)
  5. Application domain:
    • Subdomain: docs
    • Domain: lyncareos.com
    • Path: leave empty (protect entire host)
  1. Add a policy → name: Owner Gmail
  2. Action: Allow
  3. Include: Emails → your Gmail address (e.g. you@gmail.com)
  4. Save

Default deny applies to everyone else — they see the Cloudflare Access login, not the portal.

CheckStatus
Access app LynCareOS Docs Portal on docs.lyncareos.comActive
Allow policy Owner GmailAllow — newellie@gmail.com only (precedence 1)
*.lyncareos-docs-portal.pages.dev deploy previewsAccess-gated (302 to login without session)
Portal contentStatic files only — no DB, no server-side code execution

Hardening options (recommended): require MFA on the Allow policy; shorten session duration; do not add @lyncareos.com email domain rules until you intentionally onboard staff.

Not protected by Access: raw markdown in git if the repository is public — keep the GitHub repo private for IP safety. Access protects the hosted hub only.

  1. Open https://docs.lyncareos.com in a private window
  2. Redirect to Google sign-in
  3. After login with allowed email → portal home (hub.html)
  4. Open Library → 00-INDEX.md renders with tables and Mermaid

Browser
→ Cloudflare Access (Google OAuth, email allowlist)
→ Cloudflare Pages (static)
├── hub.html, pathway-*.html, spec-viewer.html
├── hub/index.html → hub.html (Access bookmark `/hub`)
├── library/*.md (bundled specs)
└── doc-manifest.json (whitelist)

Access protects all paths including library/*.md fetches — same session cookie.


Manual / agent (canonical in this workspace):

  1. Edit markdown or portal HTML under docs/ (especially docs/10-MAPPINGS/)
  2. .\scripts\deploy-docs-portal.ps1 (builds with -Full then Wrangler upload)
  3. Hard-refresh browser after ~1 minute

Optional CI: .github/workflows/docs-portal.yml if the repo uses GitHub — not required here.

Starlight / MDX (future): see docs/plans/2026-08-06-docs-portal-cd-and-starlight.md.

No VPS or Tunnel changes required — fully separate from app.lyncareos.com.


After deploy-docs-portal.ps1 succeeds, spot-check locally in docs-portal-dist/ or after Access login on docs.lyncareos.com:

CheckExpect
Hubhub.html — PNG lockup, six hub-flow tiles, concept maps grid, architecture strip
WorkflowsAll three blocks have swimlane SVG + chip detail panels (Care Start, capture, commerce)
DomainsConstellation + layer specs open in spec-viewer.html
LibrarySidebar search + Mermaid render on a diagram-heavy doc
Knowledge/knowledge/ shows hub banner; knowledge-overview.html explains PMB % vs delivery
Mapsmapa_investor_journey.html overlay nav; map hubs use portal chrome
Cachedocs/10-MAPPINGS/_headers — HTML/CSS/JS no-store on Pages

SymptomFix
Raw markdown in browserYou opened .md directly — use spec-viewer.html?doc=...
Viewer says manifest missingRun build-docs-portal.ps1 before serve/deploy
Mermaid blankCheck browser console; large diagrams may need scroll/zoom
403 on library fetchAccess session expired — re-login with Google
file:// does not workUse npx serve docs-portal-dist locally