LynCareOS — Documentation Index
Pick up here: 04 — Roadmap (posture, resolution queue, launch gate). Doc 19 is archived (redirect only).
AI agents / automation: 20 — Production deployment guide §2b — production push and automatic backups (product owner does not run scripts).
What is LynCareOS?
Section titled “What is LynCareOS?”LynCareOS is a multi-tenant family support care platform for medication tracking, care scheduling, and team coordination around people receiving home care — not a medical app. One deployment serves many subscriber accounts (tenants); data is isolated by tenant and, for care flows, by patient access grants. Regulatory posture, processing candidates, and retention vs backups: 26-REGULATORY-APPLICABILITY-AND-CONTROL-MAP.md.
Knowledge alignment (automated)
Section titled “Knowledge alignment (automated)”Run knowledge alignment via Project Motherboard (shim: .\scripts\run-knowledge-assessment.ps1). Reports: knowledge/reports/. Project config: knowledge/README.md. Doc ↔ code alignment register: plans/2026-08-06-docs-code-alignment-review.md.
Staff docs hub (live): https://docs.lyncareos.com/hub — pathways + markdown library (LynCareOS-native build; auto-deploy on main via docs-portal workflow). Build/deploy: DOCS-PORTAL-QUICKSTART · CD + Starlight plan.
Documentation layout
Section titled “Documentation layout”Documents are grouped into five areas under docs/:
| Folder | Contents |
|---|---|
01 - BUSINESS REQUIRMENTS/ | Master requirements (02), international language (03), roadmap (04), delivery register (31), debts (32), Care Profile catalogue (35), care-profile-specs/ (index), module specs (06, 08, 09, 26, 27–29, 33, 34), Care Start sign-off. |
02 - ARCHITECTURE_DESIGN/ | Architecture (01-ARCHITECTURE.md), solution design (SDD), developer guide, hardening runbook. |
03 - DEPLOYMENT AND PRODUCTION/ | Production deploy home — 00-INDEX + canonical deploy guide (app + Cloudflare Pages marketing) |
04 - OPERATIONS/ | Running the platform — 00-INDEX + platform runbook (local dev + VPS day-2; not deploy) |
05 - BILLING AND COMMERCE/ | Stripe pricing, live switchover, tier matrix, billing engineering — 00-INDEX |
docs/ root | Redirect stubs and cross-cutting guides; archived decision records in 99 - ARCHIVE/. |
Design system: 03-DESIGN-SYSTEM.md is now present — the canonical “Calm Care” web UI design system (tokens, typography, components, mockups, migration plan). Presentation stack (Motion, hybrid vitals graphics, mobile capture): 14-FRONTEND-PRESENTATION-STACK.md. Token source of truth:
frontend/tailwind.config.js+frontend/src/index.css. Rollout plan: docs/plans/2026-05-30-calm-care-design-system.md.ADRs: 02 - ARCHITECTURE_DESIGN/adr/00-INDEX.md (AuditContext / HTTP boundary = ADR 0001). Quality gates (local):
.\scripts\run-quality-gates.ps1
Terminology: environments
Section titled “Terminology: environments”| Term | Meaning |
|---|---|
| Production | Live service: https://app.lyncareos.com (VPS + Tunnel) and https://lyncareos.com (Cloudflare Pages). Deploy: 03 - DEPLOYMENT AND PRODUCTION/20-PRODUCTION-DEPLOYMENT-GUIDE.md. Day-2 / dev: 04 - OPERATIONS/07-PLATFORM-RUNBOOK.md. |
| Dev (also: proxy UAT) | lyncareos_dev — dev-start.ps1, backend 8021, VITE_API_URL → 8021. See 04 - OPERATIONS/07-PLATFORM-RUNBOOK.md §3. |
| Optional: full-stack Docker (non-prod) | Same Compose production profile on a non-production machine when you need a prod-shaped container run (built SPA, 8020, Docker lyncareos DB) — not authoritative data. migrate.ps1 / db-backup.ps1 with -Target Production mean “the local Docker lyncareos database” when you are not on the production host — see [02 - ARCHITECTURE_DESIGN/12-CI-REFERENCE.md §0](02 - ARCHITECTURE_DESIGN/12-CI-REFERENCE.md). |
ENVIRONMENT=production | App runtime flag (stricter cookies, etc.). Set in app and scan_worker containers when using the production profile. |
Also read: [02 - ARCHITECTURE_DESIGN/12-CI-REFERENCE.md §0](02 - ARCHITECTURE_DESIGN/12-CI-REFERENCE.md) (CI/CD and DB rules), 04 - OPERATIONS/07-PLATFORM-RUNBOOK.md §1 (operator view), [04 - OPERATIONS/11-DATABASE-SAFETY-AND-MIGRATIONS.md](04 - OPERATIONS/11-DATABASE-SAFETY-AND-MIGRATIONS.md) (which database you touch).
Which doc when
Section titled “Which doc when”| I need to… | Read |
|---|---|
| What’s live / what blocks launch | 04-ROADMAP |
| REQ Done / Future / Partial | 02-REQUIREMENTS |
| Website vs code / tiers | 31 |
| International language / switcher / waves | 03 · 04 §15 |
| Open debt IDs | 32 |
| Which database am I on? | 11 |
| Deploy app or marketing | 20 |
| Day-2 ops | 07 |
| Backup / restore (A5 + A5b done) | 23 · vps-production-backup.ps1 |
| Stripe live / pricing | 05 - BILLING |
| Regulatory applicability (not a medical app) | 26 (ops — not business module 26) |
| Care Profile slugs + seed content | 35-CARE-PROFILE-CATALOGUE · per-profile FPs care-profile-specs/ |
| Care Start clinical sign-off (C1d) | CARE-START-CLINICAL-SIGNOFF |
| Future: in-app Markdown docs library | 34-MARKDOWN-DOCUMENT-VIEWER (not built) |
| Native store clients (Play / App Store commerce posture) | native-store-clients design · 02 §7.36 · 04 §13 · 01-ARCHITECTURE native |
Document numbers (folder-scoped)
Section titled “Document numbers (folder-scoped)”The same numeric prefix appears in more than one folder — always use the folder path, not the number alone:
| # | Collisions | Disambiguation |
|---|---|---|
| 03 | Business i18n · architecture design system · SDD | 01/03 vs 02/03-DESIGN-SYSTEM vs 02/03-SOLUTION-DESIGN |
| 04 | Roadmap · overlay register | 01/04-ROADMAP vs 02/04-OVERLAY-REGISTER |
| 26 | Pain module · ops regulatory · billing Care Profile value | 01/26-PAIN-STATS vs 04/26-REGULATORY vs 05/26-CARE-PROFILE-VALUE |
| 28 | Custom observations · billing cancer learning stub | 01/28-CUSTOM-OBSERVATIONS vs 05/28-CANCER-AT-HOME-LEARNING-SPEC (redirect) |
| 29 | Family help module · Care Module UI architecture | 01/29-FAMILY-HELP vs care-profile-specs/29-CARE-MODULE-UI |
| 31 | Delivery register · cancer support-flow UX | 01/31-RECONCILIATION vs care-profile-specs/31-CANCER-SUPPORT-FLOW |
Stale snapshot: FEATURE-INVENTORY-AND-CODE-REVIEW.md is a point-in-time code review — not a third status board; use 04, 02, and 31.
Quick reference (replaces retired hub-only docs)
Section titled “Quick reference (replaces retired hub-only docs)”- Prescriptions + medication schedule: 08, 09, 02 §3.3–3.4 / §7.4–7.5, 01
- Stream 2–3 modules (templates, observations, help, planning): 27, 28, 29, 33 — Care Pathways (spec complete; implementation D31 — 04 §10.5)
- Security & code quality: 01-ARCHITECTURE.md (tenancy, audit, RLS), 32 (open debts), 17 Part II (hardening ops), .cursor/rules/rules.mdc (enforced patterns)
- Scaling & capacity (100k model): 17 Part I (merged from former doc 16)
- Marketing visuals: 13 (section Visual strategy; merged from former doc 14)
- Production deploy (app + website): 03 - DEPLOYMENT AND PRODUCTION/00-INDEX.md → 20-PRODUCTION-DEPLOYMENT-GUIDE.md
Platform operations (docs/04 - OPERATIONS/)
Section titled “Platform operations (docs/04 - OPERATIONS/)”| Document | Role |
|---|---|
| 04 - OPERATIONS/00-INDEX.md | Entry point — running vs deploying |
| 07-PLATFORM-RUNBOOK.md | Local dev, Docker rehearsal, VPS day-2 (logs, restart, backups, incidents) |
| 23-BACKUP-RESTORE-DRILL.md | Backup tiers, restore drills (A5 complete 2026-06-02), workstation pull |
| 11-DATABASE-SAFETY-AND-MIGRATIONS.md | Which DB you touch; PHI migration safety — read before schema changes |
Production deployment (docs/03 - DEPLOYMENT AND PRODUCTION/)
Section titled “Production deployment (docs/03 - DEPLOYMENT AND PRODUCTION/)”| Document | Role |
|---|---|
| 00-INDEX.md | Entry point — core vs supporting production docs |
| 20-PRODUCTION-DEPLOYMENT-GUIDE.md | Canonical — deploy app (deploy.ps1), deploy marketing (deploy-marketing-pages.ps1), verify, rollback |
Specialist docs: [11](04 - OPERATIONS/11-DATABASE-SAFETY-AND-MIGRATIONS.md) (DB), 04 - OPERATIONS/07 (day-2), 05 - BILLING AND COMMERCE/21 (Stripe live).
Billing & commerce (docs/05 - BILLING AND COMMERCE/)
Section titled “Billing & commerce (docs/05 - BILLING AND COMMERCE/)”| Document | Role |
|---|---|
| 00-INDEX.md | Entry point — pricing, tiers, Stripe live flip |
| 18-STRIPE-GLOBAL-PRICING.md | Pricing model, Adaptive Pricing, tier seeding |
| 21-STRIPE-LIVE-SWITCHOVER.md | Stripe test → live flip playbook |
| 22-BILLING-PRICING-REFERENCE.md | Authoritative price tables |
| 23-SUBSCRIPTION-TIER-ENTITLEMENTS-MATRIX.md | Per-tier feature gates |
| 24-SUBSCRIPTION-BILLING-AND-TIER-LIMITS.md | Limits, upgrade flows, APIs |
Document map
Section titled “Document map”| # | Document | Audience | Purpose |
|---|---|---|---|
| 00 | This index | Everyone | Navigation; Terminology: environments |
| 01 | Architecture | Engineers | Stack, Docker, database, API shape, auth |
| 02 | Solution & requirements | PM / Engineers / Investors | Master business requirements — §2.2 code snapshot, FR/NFR status |
| 03 | Requirements: International language | PM / Engineers / l10n | Canonical i18n spec — EN framework → FR → plug-in Wave 1b; I18N-P0…P4 + M1; REQ-I18N-01…38 |
| 03 | Solution design (SDD) | PM / Engineers / Investors / Security | Industry-standard SDD: current-state architecture, code review, marketing & billing design, target-state path |
| 03 | Design system | Frontend | “Calm Care” web UI design system — tokens, typography, components, mockups, migration plan |
| 04 | Overlay register | Frontend | Dialog / sheet / task overlay inventory — tier taxonomy, migration verdicts, stacking hotspots |
| 14 | Frontend presentation stack | Frontend | UI tools, hybrid vitals graphics, Motion, mobile capture patterns, component map |
| 15 | Care calendar composition | Frontend | File map for the calendar page and day panel — hook/presentation boundaries, gesture rules, DOM-ref convention |
| 04 | Roadmap | Everyone | Pick up here — posture, resolution queue, launch gate, planned work |
| 05 | Developer guide | Engineers | Local dev, Docker, conventions, testing. §14 — Body Map Zone Calibration Tool (Pain Tracking, dev-only) |
| 06 | Shopping & Coordination Module | Engineers / PM | Implemented — catalog, lists, SSE sync; defers to doc 02 |
| 07 | Platform runbook | Operators / Engineers | Local dev + VPS day-2 — not deploy; see folder index |
| 08 | Prescription management | Engineers / PM | Script scanning, fill tracking, stock — implemented |
| 09 | Auto-dispense & medication schedule | Engineers / PM | Groups, dispense view, batch dispense — implemented (/medication-schedule) |
| 11 | [Database safety & migrations](04 - OPERATIONS/11-DATABASE-SAFETY-AND-MIGRATIONS.md) | Everyone | Which DB you are connected to; production vs dev (proxy UAT) vs optional Docker — read before migrations |
| 12 | CI reference (GitHub Actions) | Engineers | What runs in .github/workflows/ci.yml today; local pre-merge commands; archived target design in archive/ |
| 13 | Marketing visuals & first-time setup | Operators / Marketing | DNS/OAuth archive + visual strategy; routine deploy → 03 - DEPLOYMENT AND PRODUCTION/20 §5 |
| 17 | Scale design, capacity & hardening runbook | Engineers / Operators | Part I — usage patterns, 100k model (ex–doc 16). Part II — day-2 Redis, PgBouncer, replica, scan_worker, Stripe |
| 18 | Stripe global pricing | Operators | Change prices, rotate keys, Adaptive Pricing — tier modules match tiers.json / doc 02 |
| 19 | Current state & launch plan | Everyone | Archived — redirects to 04 Roadmap; full v4.7 copy in 99 - ARCHIVE/ |
| 20 | Production deployment guide | Operators / Engineers | Canonical — VPS app deploy + Cloudflare Pages marketing; see folder index |
| 21 | Stripe live-mode switchover playbook | Operators | Pre-flight, sequential flip from Stripe test→live on the production host, verification, rollback |
| 22 | Billing pricing reference | Operators | Authoritative tier/pack price tables for live switchover |
| 23 | Subscription tier entitlements matrix | PM / Engineers | Per-tier feature gates — aligned with doc 02 §2.2 |
| 24 | Subscription billing, limits & upgrade flows | Engineers / PM / Ops | Tiers, limits, coupons, UpgradeGate, seeder, §10 signup/upgrade user journeys and APIs (ex–doc 25) |
| 26 | Pain & Stats | Engineers / PM | vitals_tracking (/vitals) + pain_tracking (/pain) — two module gates |
| 27 | Condition template packs | Engineers / PM | condition_templates — implementation module spec |
| 35 | Care Profile catalogue | PM / Clinical / Engineers | Canonical — 7 archetypes, 12 Care Profiles, seed content, commerce, DB contract (ex–archive Palliative) |
| — | Care Profile function points | PM / Engineers | Twelve FP-*.md specs + Care Module platform docs 29–31 under care-profile-specs/ |
| 28 | Custom observations | Engineers / PM | custom_observations — flexible daily observations + Bollinger trends |
| 29 | Family help board | Engineers / PM | family_help — help requests, volunteer flow, care alerts |
| 33 | Care Pathways (Planning Ahead) | PM / Clinical / Engineers | care_pathways — staged planning journey — spec complete; not implemented (D31) |
| 34 | Markdown document viewer (future) | PM / Engineers | In-app docs library product spec — not built |
| — | Care Start clinical sign-off | Clinical / PM | C1d checklist before families see seed labels |
| 31 | Product delivery register | PM / Engineering / Marketing | Website gaps · full REQ register · code review · Coming soon list — regenerate via scripts/generate_delivery_register.py |
| 32 | Known debts register | Engineers / PM | Open technical and product debts; resolved history in 99 - ARCHIVE/19-resolved-changelog-2026-05.md |
| — | Production server & provider analysis (archived) | Operators | Historical provider/sizing analysis — live hosting summary in doc 20 §1 |
| — | Documentation loopback (Project Motherboard / knowledge alignment) | Engineers | Cursor hooks tracking agent edits and generating doc-staleness notifications |
| — | Project Motherboard (config) · knowledge README | Engineering leads / PM | AI governance methodology |
| — | Child Care Branding | Marketing | Brand notes |
Technology summary (this repo)
Section titled “Technology summary (this repo)”| Component | Technology |
|---|---|
| Web client | React 19, TypeScript, Vite 8, Tailwind CSS 3 |
| API | Python 3.12 (Docker) / 3.11+ (local), FastAPI, Uvicorn |
| Database | PostgreSQL 16 |
| DB driver | psycopg v3 async pool |
| Auth | JWT (HS256), bcrypt, optional Google OAuth |
| Local DB | Dev / proxy UAT: native lyncareos_dev (default). Optional: Docker postgres:16-alpine for full-stack rehearsal (see doc 07 §7). |
| Production app | Multi-stage backend/Dockerfile + docker compose --env-file .env.production --profile production on the VPS operations host (see doc 20) |
| DB migrations | Active V001__lyncareos_v1_baseline marker + migrations/runner.py; pre-v1 V001–V114 in archive/pre-v1/; greenfield DDL in schema/lyncareos_v1_baseline.sql |
| Frontend tests | Vitest, Testing Library, Playwright (npm run test, npm run test:e2e) |
| Vision AI (scripts) | LM Studio + Qwen2.5-VL via backend/services/lmstudio.py (server-side only) |
| Pain & Stats | vitals_tracking + pain_tracking: 26, routers/vitals.py, pain.py, mind.py |
| Stream 2–3 | condition_templates, custom_observations, family_help, care_pathways (planned): 27–29, 33 |
Documentation vs code: 02-REQUIREMENTS.md is the master product doc (§2.2 implementation snapshot). Module specs (06, 08, 09, 26–29, 33) and 04-ROADMAP.md must stay aligned with it. Source of truth for behaviour: API + PostgreSQL schema, then doc 02.
Quick start (developers)
Section titled “Quick start (developers)”See 05-DEVELOPER-GUIDE.md for the full procedure. Abbreviated:
# From repo root — PostgreSQLdocker compose up -d postgres
# Backend (new terminal) — port 8021 for devcd backendpython -m venv venv.\venv\Scripts\Activate.ps1pip install -r requirements.txtcopy .env.example .env# Configure .env, then:python -c "import asyncio; from database import init_db; asyncio.run(init_db())"python seed_admin.pypython run_server.py
# Frontend (new terminal)cd ..\frontendnpm installnpm run devOpen http://localhost:5173 — the dev server proxies /api to http://localhost:8021 by default.
Architectural anchors
Section titled “Architectural anchors”- Single PostgreSQL per deployment; isolation by
tenant_idandpatient_accessin application code (see 01-ARCHITECTURE.md Multi-tenancy). RLS (migrationV034) is an additional backstop, not a substitute for app checks. - No ORM — SQL via psycopg (parameterised). Much SQL still lives in
routers/(~22 files perrouter_sql_baseline.json); the target pattern is router → service → repository (see.cursor/rules/rules.mdcand D6 in 32-KNOWN-DEBTS-REGISTER.md).schema.sqlis the baseline DDL. - Module gating —
require_module(slug)andsubscriptionsrows; 11 product module routers active today (8 original + 3 Stream 2–3). - JWT carries
sub(user) and optionaltid(tenant); super-admin may useX-Tenant-ID.
Version: 2.11
Last Updated: 2026-08-06 13:33:14
Last updated: 2026-08-05 17:38:42 — Agent automation contract lives in doc 20 §2b (AGENTS.md removed).