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.
1. What gets deployed
Section titled “1. What gets deployed”| Item | Location |
|---|---|
| Build output | docs-portal-dist/ (generated — do not edit by hand) |
| Source | docs/10-MAPPINGS/ + whitelisted docs/**/*.md (see scripts/build-docs-portal.ps1) |
| Engine | Hybrid: Astro Starlight (docs-portal/) for specs + Calm Care HTML pathways (docs/10-MAPPINGS/) |
| Pages project | lyncareos-docs-portal |
| Recommended URL | https://docs.lyncareos.com |
Build locally
Section titled “Build locally”cd D:\Projects\LynCareOS.\scripts\build-docs-portal.ps1 -Fullnpx --yes serve docs-portal-dist -l 8787-Full (owner-only bundle) includes:
| Layer | Contents |
|---|---|
| Starlight library | 101+ specs at /business/…, /architecture/…, Pagefind search, Calm Care theme CSS |
| Pathways + maps | Whitelisted HTML hub, workflows, vis-network maps |
| Knowledge portal | /knowledge/ — REQ ↔ code map (PMB rebuild on -Full) |
| Brand | PNG icon, illustration SVGs, marketing images when present |
| Starlight build | Requires Node; first -Full build installs Playwright Chromium for Mermaid SSR in specs |
Deploy to Cloudflare Pages
Section titled “Deploy to Cloudflare Pages”.\scripts\deploy-docs-portal.ps1Deploy 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_TOKENCLOUDFLARE_ACCOUNT_ID
2. DNS (one-time)
Section titled “2. DNS (one-time)”In Cloudflare dashboard → lyncareos.com zone:
| Type | Name | Target | Proxy |
|---|---|---|---|
| CNAME | docs | lyncareos-docs-portal.pages.dev | Proxied (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.
3.1 Add Google identity provider
Section titled “3.1 Add Google identity provider”- Cloudflare Zero Trust → Settings → Authentication
- Add → Google
- Complete Google OAuth setup (Cloudflare guided flow or your own Google Cloud OAuth client)
- Save
3.2 Create Access application
Section titled “3.2 Create Access application”- Access → Applications → Add an application
- Type: Self-hosted
- Application name:
LynCareOS Docs Portal - Session duration: 24 hours (or 168h to match app Access app)
- Application domain:
- Subdomain:
docs - Domain:
lyncareos.com - Path: leave empty (protect entire host)
- Subdomain:
3.3 Allow policy (you only, for now)
Section titled “3.3 Allow policy (you only, for now)”- Add a policy → name:
Owner Gmail - Action: Allow
- Include: Emails → your Gmail address (e.g.
you@gmail.com) - Save
Default deny applies to everyone else — they see the Cloudflare Access login, not the portal.
3.3a Verified posture (2026-08-06)
Section titled “3.3a Verified posture (2026-08-06)”| Check | Status |
|---|---|
Access app LynCareOS Docs Portal on docs.lyncareos.com | Active |
| Allow policy Owner Gmail | Allow — newellie@gmail.com only (precedence 1) |
*.lyncareos-docs-portal.pages.dev deploy previews | Access-gated (302 to login without session) |
| Portal content | Static 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.
3.4 Verify
Section titled “3.4 Verify”- Open
https://docs.lyncareos.comin a private window - Redirect to Google sign-in
- After login with allowed email → portal home (
hub.html) - Open Library →
00-INDEX.mdrenders with tables and Mermaid
4. Architecture
Section titled “4. Architecture”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.
5. Updating content
Section titled “5. Updating content”Manual / agent (canonical in this workspace):
- Edit markdown or portal HTML under
docs/(especiallydocs/10-MAPPINGS/) .\scripts\deploy-docs-portal.ps1(builds with-Fullthen Wrangler upload)- 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.
6. Post-deploy verification (agent)
Section titled “6. Post-deploy verification (agent)”After deploy-docs-portal.ps1 succeeds, spot-check locally in docs-portal-dist/ or after Access login on docs.lyncareos.com:
| Check | Expect |
|---|---|
| Hub | hub.html — PNG lockup, six hub-flow tiles, concept maps grid, architecture strip |
| Workflows | All three blocks have swimlane SVG + chip detail panels (Care Start, capture, commerce) |
| Domains | Constellation + layer specs open in spec-viewer.html |
| Library | Sidebar search + Mermaid render on a diagram-heavy doc |
| Knowledge | /knowledge/ shows hub banner; knowledge-overview.html explains PMB % vs delivery |
| Maps | mapa_investor_journey.html overlay nav; map hubs use portal chrome |
| Cache | docs/10-MAPPINGS/_headers — HTML/CSS/JS no-store on Pages |
7. Troubleshooting
Section titled “7. Troubleshooting”| Symptom | Fix |
|---|---|
| Raw markdown in browser | You opened .md directly — use spec-viewer.html?doc=... |
| Viewer says manifest missing | Run build-docs-portal.ps1 before serve/deploy |
| Mermaid blank | Check browser console; large diagrams may need scroll/zoom |
| 403 on library fetch | Access session expired — re-login with Google |
file:// does not work | Use npx serve docs-portal-dist locally |
8. Related documents
Section titled “8. Related documents”- DOCS-PORTAL-QUICKSTART.md — local document server, view URLs, production sign-in
- 20-PRODUCTION-DEPLOYMENT-GUIDE.md — app + marketing deploy
- 07-PLATFORM-RUNBOOK.md §9 — existing Zero Trust Access app (marketing bypass pattern)
- 10-MAPPINGS/README.md — portal structure
- 34-MARKDOWN-DOCUMENT-VIEWER.md — future standalone product requirements