diff --git a/.claude/memory/learnings.md b/.claude/memory/learnings.md index 39ad26f2..f55de78c 100644 --- a/.claude/memory/learnings.md +++ b/.claude/memory/learnings.md @@ -208,3 +208,11 @@ Fix paths: When standalone .html tools (no build step) need logic from TS modules (zoneMatch, ID generation), port algorithm inline as vanilla JS. Cannot import .ts files. Keep algorithms identical to source for consistency. Document which .ts file was ported so future changes can sync. **Why:** pathology-editor.html ports normalizeLabel/levenshtein/scorePair/matchZone from src/lib/zoneMatch.ts. **How to apply:** if zoneMatch.ts changes, pathology-editor.html matching must be updated manually. Consider a test that compares outputs of both implementations on a shared fixture set. + +--- + +## LRN-027 | 2026-05-22 | CSS h-full fails in nested flex — use flex-1 + +`height: 100%` (Tailwind `h-full`) resolves to `auto` when parent has `flex-1` but no explicit `height`. Caused 3 failed centering attempts on route containers inside App.tsx flex layout. Fix: use `flex-1` (flex-grow) on child instead — works because parent IS a flex container, no explicit height needed. +**Why:** nested flex layout: App wrapper (min-h-screen flex-col) → main (flex-1) → route (h-full broke here) → section (flex-1 grid place-items-center). The section's `place-items-center` needs actual height to center within. +**How to apply:** any flex-nested layout where child needs to fill parent — use `flex-1`, not `h-full`, unless parent has explicit `height` or is viewport-sized (`h-screen`). diff --git a/.gitignore b/.gitignore index b725d953..9fe296c0 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ graphify-out/ # TypeScript *.tsbuildinfo +.gstack/ diff --git a/DEPLOY.md b/DEPLOY.md index f2602061..ba623a08 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -33,7 +33,7 @@ each one explicitly. | `APP_SITE_NAME` | yes | `Faunosteo` | Browser ``, OG `site_name`. | | `APP_BRAND_NAME` | yes | `Faunosteo` | Header brand block, PDF header. Praticien-visible identity. | | `APP_FOOTER_NAME` | yes | `Faunosteo` | Footer copyright line. | -| `APP_TAGLINE` | yes | `Bilans d'ostéopathie animalière` | Hero tagline on Home. | +| `APP_TAGLINE` | yes | `Outils pour ostéopathes animaliers` | Hero tagline on Home. | | `PORT` | no | `8080` | Container listen port. Override to relocate the loopback bind. | No secrets are required — there is no API, no DB, no provider credential. @@ -59,8 +59,8 @@ DNS: ```text # A record on your domain registrar / DNS provider -zoosteo.fr → <vps-ipv4> -zoosteo.fr (AAAA) → <vps-ipv6> # optional +faunosteo.com → <vps-ipv4> +faunosteo.com (AAAA) → <vps-ipv6> # optional ``` SSH key copied to the VPS before disabling password auth (see Hardening @@ -185,7 +185,7 @@ Verify post-deploy: ```bash docker compose ps -curl -sI https://zoosteo.fr/ | head -3 +curl -sI https://faunosteo.com/ | head -3 ``` For zero-downtime updates, `docker compose up --build -d` rebuilds the @@ -259,7 +259,7 @@ aws s3 sync /var/backups/osteo s3://<bucket>/osteo/ --storage-class STANDARD_IA docker compose down cp /var/backups/osteo/env-<date> /home/<deploy-user>/faunosteo/.env docker compose up --build -d -curl -sI https://zoosteo.fr/ +curl -sI https://faunosteo.com/ ``` The praticien's exported PDFs are the real long-term store. If the VPS @@ -280,7 +280,7 @@ VPS: server { listen 80; listen [::]:80; - server_name zoosteo.fr; + server_name faunosteo.com; # Certbot will rewrite this block to add the 301 redirect. location /.well-known/acme-challenge/ { root /var/www/letsencrypt; @@ -298,7 +298,7 @@ server { server { listen 443 ssl http2; listen [::]:443 ssl http2; - server_name zoosteo.fr; + server_name faunosteo.com; # ssl_certificate + ssl_certificate_key written by certbot @@ -318,7 +318,7 @@ Enable + obtain certificate: ```bash ln -s /etc/nginx/sites-available/osteo /etc/nginx/sites-enabled/osteo nginx -t && systemctl reload nginx -certbot --nginx -d zoosteo.fr +certbot --nginx -d faunosteo.com systemctl status certbot.timer # auto-renew preinstalled on Ubuntu ``` @@ -340,10 +340,10 @@ Reload + verify: ```bash nginx -t && systemctl reload nginx -curl -sI https://zoosteo.fr/ | grep -iE 'strict-transport|x-frame|content-security' +curl -sI https://faunosteo.com/ | grep -iE 'strict-transport|x-frame|content-security' # Cross-check externally: -# https://securityheaders.com/?q=zoosteo.fr -# https://www.ssllabs.com/ssltest/analyze.html?d=zoosteo.fr +# https://securityheaders.com/?q=faunosteo.com +# https://www.ssllabs.com/ssltest/analyze.html?d=faunosteo.com ``` The `'unsafe-inline'` on `style-src` is needed because Tailwind injects @@ -362,7 +362,7 @@ echo "deb [signed-by=/usr/share/keyrings/caddy-stable-archive-keyring.gpg] https apt-get update && apt-get install -y caddy cat > /etc/caddy/Caddyfile <<'EOF' -zoosteo.fr { +faunosteo.com { encode gzip zstd reverse_proxy 127.0.0.1:8080 header { @@ -394,13 +394,13 @@ N/A. There is no build-time API URL var; the app is static. ```bash # HTTPS redirect on port 80 -curl -sI http://zoosteo.fr/ | grep -i location # expect Location: https://... +curl -sI http://faunosteo.com/ | grep -i location # expect Location: https://... # TLS itself -curl -sI https://zoosteo.fr/ | head -3 # expect HTTP/2 200 +curl -sI https://faunosteo.com/ | head -3 # expect HTTP/2 200 # env.js shipped fresh (no caching) -curl -sI https://zoosteo.fr/env.js | grep -i cache-control +curl -sI https://faunosteo.com/env.js | grep -i cache-control # expect: Cache-Control: no-store, no-cache, must-revalidate # Internal port is NOT publicly bound @@ -439,7 +439,7 @@ Reload + verify on a second terminal *before* closing the first one: ```bash systemctl reload ssh -ssh deploy@zoosteo.fr 'echo ok' +ssh deploy@faunosteo.com 'echo ok' ``` ### 3. (Optional) Move SSH off port 22 @@ -451,7 +451,7 @@ ufw allow 2222/tcp # 1. UFW # 2. Add 2222 to cloud security group # 3. /etc/ssh/sshd_config: Port 2222 (keep Port 22 temporarily) systemctl reload ssh -ssh -p 2222 deploy@zoosteo.fr 'echo ok' # confirm +ssh -p 2222 deploy@faunosteo.com 'echo ok' # confirm # 4. Remove Port 22 from sshd_config + UFW + cloud SG ``` @@ -484,7 +484,7 @@ nmap -Pn -p 22,80,443,8080,2222 <vps-public-ip> # 2222: open ← if SSH was moved # Password-SSH attempt — should fail -ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no deploy@zoosteo.fr +ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no deploy@faunosteo.com # Expect: Permission denied (publickey). ``` @@ -497,7 +497,7 @@ cd ~/faunosteo git reflog | head -20 # find the known-good SHA git reset --hard <known-good-sha> docker compose up --build -d -curl -sI https://zoosteo.fr/ | head -1 +curl -sI https://faunosteo.com/ | head -1 ``` Because there is no server-side state to corrupt, rollback is purely a @@ -510,10 +510,10 @@ already exported are unaffected. | URL | Expected | | --------------------------------------- | ----------------------------------------- | -| `https://zoosteo.fr/` | HTTP/2 200, HTML containing `<div id="root">` | -| `https://zoosteo.fr/env.js` | HTTP/2 200, `Cache-Control: no-store, no-cache, must-revalidate`, body starts with `window.__APP_CONFIG__ = {` | -| `https://zoosteo.fr/assets/<hash>.js` | HTTP/2 200, `Cache-Control: public, max-age=31536000, immutable` | -| `https://zoosteo.fr/nonexistent` | HTTP/2 200 (SPA fallback serves `index.html`) | +| `https://faunosteo.com/` | HTTP/2 200, HTML containing `<div id="root">` | +| `https://faunosteo.com/env.js` | HTTP/2 200, `Cache-Control: no-store, no-cache, must-revalidate`, body starts with `window.__APP_CONFIG__ = {` | +| `https://faunosteo.com/assets/<hash>.js` | HTTP/2 200, `Cache-Control: public, max-age=31536000, immutable` | +| `https://faunosteo.com/nonexistent` | HTTP/2 200 (SPA fallback serves `index.html`) | | `http://127.0.0.1:8080/` (on VPS) | HTTP/1.1 200 | There is no `/health` endpoint — the container only serves static assets. diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 4bf2733a..3e493769 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -12,7 +12,7 @@ window.__APP_CONFIG__ = { siteName: "${APP_SITE_NAME:-Faunosteo}", brandName: "${APP_BRAND_NAME:-Faunosteo}", footerName: "${APP_FOOTER_NAME:-Faunosteo}", - tagline: "${APP_TAGLINE:-Bilans d'ostéopathie animalière}" + tagline: "${APP_TAGLINE:-Outils pour ostéopathes animaliers}" }; EOF diff --git a/index.html b/index.html index c9af9de5..3f4df7b1 100644 --- a/index.html +++ b/index.html @@ -3,8 +3,9 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta name="description" content="Bilans d'ostéopathie animalière" /> + <meta name="description" content="Outils pour ostéopathes animaliers" /> <link rel="icon" type="image/svg+xml" href="/favicon.svg" /> + <link rel="apple-touch-icon" href="/apple-touch-icon.png" /> <title>Faunosteo