diff --git a/.claude/skills/README.md b/.claude/skills/README.md index 55209a3..c4235fb 100644 --- a/.claude/skills/README.md +++ b/.claude/skills/README.md @@ -5,9 +5,9 @@ Sélection de 16 skills défensifs / de test tirés de (commit `54a7988`, licence Apache-2.0 — fichier `LICENSE` dans chaque dossier). Projet communautaire, non affilié à Anthropic. -Retenus pour AzuuCine : contrôle d'accès / IDOR (≈ RLS Supabase), en-têtes et CSP, CORS, +Retenus pour Bobinoo : contrôle d'accès / IDOR (≈ RLS Supabase), en-têtes et CSP, CORS, OAuth/PKCE, JWT, XSS, Edge Functions (serverless), limitation de débit, dépendances npm, secrets (gitleaks), RGPD, OWASP API Top 10. Les scripts `scripts/*.py` envoient des requêtes de test : ne les lancer que contre -AzuuCine (ou une copie locale), jamais contre un site tiers. +Bobinoo (ou une copie locale), jamais contre un site tiers. diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 96dc073..9397587 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -1,4 +1,4 @@ -# Déploiement : à chaque push sur main -> build -> publication atomique sur le VPS (runner "azuucine"). +# Déploiement : à chaque push sur main -> build -> publication atomique sur le VPS (runner "bobinoo"). # Variables à créer dans Gitea (Dépôt -> Paramètres -> Actions) : # Variables : VITE_SUPABASE_URL Secrets : VITE_SUPABASE_ANON_KEY (clé publique "sb_publishable_…") # La clé TMDB et la service_role restent dans les secrets Supabase : jamais ici. @@ -15,7 +15,7 @@ permissions: jobs: deploy: if: github.ref == 'refs/heads/main' - runs-on: azuucine + runs-on: bobinoo env: REQUIRE_SUPABASE: '1' # le build échoue si VITE_SUPABASE_* manquent (garde dans vite.config.ts) steps: diff --git a/CLAUDE.md b/CLAUDE.md index 210da18..c7518b7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -18,7 +18,7 @@ npm run build # build de prod ``` ## Déploiement -- Remote git : **Gitea** `https://gitea.rdacet.fr/romain/kino.git` (branche `main`). +- Remote git : **Gitea** `https://gitea.rdacet.fr/romain/bobinoo.git` (branche `main`). - Claude Code (cloud) accède directement à Gitea : jeton `GITEA_TOKEN` en « network secret » de l'environnement (portée `write:repository`). Depuis le 27 nov. 2026, Romain demande que Claude **fusionne et pousse directement dans `main`** sans redemander (ce qui déploie), puis vérifie le déploiement (Gitea Actions + site en ligne). Plus de dépôt GitHub. - Push via **PowerShell** : `git push`. - **Gitea Actions** (`.gitea/workflows/deploy.yml`) build et publie sur le **VPS** (nginx en LXC) à chaque push sur `main`. Site : **https://bobinoo.org** (www → 301 ; kino.rdacet.fr abandonné le 28 nov. 2026). Proxy HTTPS = conteneur `proxy` (nginx + certbot), app = conteneur `kino` @@ -52,7 +52,7 @@ npm run build # build de prod - Clés plurielles `xxx_one`/`xxx_other` (+ `_few`/`_many` pour ar/ru/pl). Variables `{x}`. - Thèmes d'apparence : `auto` (suit le navigateur), `light`, `dark` (les anciens `night`/`starfield` sont relus comme `dark`). Accent fixe, défini dans `src/index.css`. Toujours utiliser les **tokens de thème** (`bg-bg`, `text-ink`, `bg-accent-fill`…), **jamais de couleur hex en dur**. -- **Nom affiché : « Bobinoo »** (renommé le 27 nov. 2026 ; avant : « Kino » depuis le 14 oct. 2026). Le dépôt Gitea, le dossier local et le runner gardent le nom `kino`. Les identifiants techniques gardent `azuu`/`azuucine` (clés localStorage, bases IndexedDB, fonctions SQL `azuu_*`, secret Vault, dossiers `/srv/azuucine`, runner Gitea) : ne pas les renommer, ça casserait les données existantes. +- **Nom affiché : « Bobinoo »** (renommé le 27 nov. 2026 ; avant : « Kino » depuis le 14 oct. 2026). Depuis le 1er déc. 2026, le dépôt Gitea (`romain/bobinoo`), le conteneur LXC, le runner et le dossier `/srv/bobinoo` s'appellent `bobinoo` (`/srv/azuucine` reste un lien vers `/srv/bobinoo` sur le VPS). Les identifiants techniques dans les données gardent `azuu`/`azuucine` (clés localStorage, bases IndexedDB, fonctions SQL `azuu_*`, secret Vault, format d'export) : ne pas les renommer, ça casserait les données existantes. ## Conventions - `npm run typecheck` doit passer après chaque modif. @@ -86,6 +86,6 @@ npm run build # build de prod - **Dépendances figées** : versions exactes dans `package.json` + `.npmrc` (`save-exact=true`), CI en `npm ci`. - **Chargement** : les écrans rares (stats, réglages, roulette, calendrier, écrans sociaux…) sont chargés à la demande puis préchargés au repos (`App.tsx` → `loaders`, `SocialProvider.tsx` → `socialLoaders`). - **Audit (22-24 nov. 2026)** : `20261122140000_audit_hardening.sql` versionne aussi les fonctions admin / « comptes suspendus » qui n'existaient qu'en ligne. Blocage = le compte bloquant devient invisible pour le bloqué ; fiches supprimées = `data` vidée (trigger `azuu_tombstone`) ; profils lisibles directement seulement par soi-même. -- **Runner Gitea** : `kino` (étiquette `azuucine`), service `gitea-runner` dans le conteneur LXC `kino` du VPS. S'il est hors ligne, plus rien ne se déploie (voir `deploy/RUNNER.md`). +- **Runner Gitea** : `bobinoo` (étiquette `bobinoo`), service `gitea-runner` dans le conteneur LXC `bobinoo` du VPS. S'il est hors ligne, plus rien ne se déploie (voir `deploy/RUNNER.md`). - **Sauvegardes de la base** : faites par Romain sur son VPS chaque soir (la sauvegarde via Gitea Actions a été retirée le 28 nov. 2026). - Leaked Password Protection (Supabase) demande l'offre payante : remplacée par la vérification HIBP côté client (`src/lib/pwned.ts`). diff --git a/deploy/RUNNER.md b/deploy/RUNNER.md index 9f72e8b..3349e81 100644 --- a/deploy/RUNNER.md +++ b/deploy/RUNNER.md @@ -1,18 +1,18 @@ # Runner Gitea (déploiement) -Le runner `kino` (étiquette `azuucine`) tourne dans le conteneur LXC `kino` du VPS. S'il est arrêté, plus rien ne se déploie. +Le runner `bobinoo` (étiquette `bobinoo`) tourne dans le conteneur LXC `bobinoo` du VPS. S'il est arrêté, plus rien ne se déploie. ## Runner arrêté ? Si plus aucun déploiement ne part (jobs « en attente » dans Gitea → Actions) : ```bash -lxc-attach -n kino +lxc-attach -n bobinoo systemctl status gitea-runner systemctl restart gitea-runner ``` -Depuis le 25 nov. 2026, `/etc/systemd/system/gitea-runner.service.d/relance.conf` (dans le conteneur `kino`) +Depuis le 25 nov. 2026, `/etc/systemd/system/gitea-runner.service.d/relance.conf` (dans le conteneur `bobinoo`) le fait réessayer toutes les 15 s sans limite après un redémarrage du VPS (avant, il abandonnait si le proxy n'était pas encore prêt : 3 semaines sans déploiement en novembre 2026). diff --git a/deploy/headers-to-nginx.mjs b/deploy/headers-to-nginx.mjs index 63a5f67..01f51f8 100755 --- a/deploy/headers-to-nginx.mjs +++ b/deploy/headers-to-nginx.mjs @@ -51,7 +51,7 @@ for (const [path, h] of blocks) { if (path.includes('*')) fail(`motif non géré : ${path}`) locations.push( `location = ${path} {`, - ' include /srv/azuucine/current/nginx/security-headers.conf;', + ' include /srv/bobinoo/current/nginx/security-headers.conf;', ...add(h).map((l) => ` ${l}`), '}', ) diff --git a/deploy/nginx/admin.conf b/deploy/nginx/admin.conf index a9f46be..a5e16e8 100644 --- a/deploy/nginx/admin.conf +++ b/deploy/nginx/admin.conf @@ -11,7 +11,7 @@ server { server_name admin.bobinoo.org; server_tokens off; - root /srv/azuucine/current/admin; + root /srv/bobinoo/current/admin; index index.html; include /etc/nginx/mime.types; diff --git a/deploy/nginx/mail.conf b/deploy/nginx/mail.conf index ceb3dc3..b70ff88 100644 --- a/deploy/nginx/mail.conf +++ b/deploy/nginx/mail.conf @@ -10,7 +10,7 @@ server { server_name mail.bobinoo.org; server_tokens off; - root /srv/azuucine/current/mail; + root /srv/bobinoo/current/mail; index index.html; include /etc/nginx/mime.types; diff --git a/deploy/nginx/site.conf b/deploy/nginx/site.conf index b9fc3b4..baf7ef7 100644 --- a/deploy/nginx/site.conf +++ b/deploy/nginx/site.conf @@ -1,5 +1,5 @@ -# Configuration nginx du site AzuuCine (conteneur azuucine-web). -# Livrée avec chaque release (copiée par deploy/release.sh) et lue via /srv/azuucine/current/nginx/site.conf : +# Configuration nginx du site Bobinoo (conteneur bobinoo). +# Livrée avec chaque release (copiée par deploy/release.sh) et lue via /srv/bobinoo/current/nginx/site.conf : # la configuration vit donc dans le dépôt, et un conteneur recréé la récupère au premier déploiement. # Les en-têtes de sécurité (security-headers.conf, locations.conf) sont, eux, générés depuis dist/_headers. server { @@ -7,7 +7,7 @@ server { server_name bobinoo.org www.bobinoo.org _; server_tokens off; - root /srv/azuucine/current/dist; + root /srv/bobinoo/current/dist; index index.html; # Adresse inconnue : vraie réponse 404 avec une page dédiée @@ -29,24 +29,24 @@ server { types { application/manifest+json webmanifest; } # Règles par chemin issues de _headers (ex. /sw.js -> no-cache) - include /srv/azuucine/current/nginx/locations.conf; + include /srv/bobinoo/current/nginx/locations.conf; # Fichiers hashés : cache immuable location /assets/ { - include /srv/azuucine/current/nginx/security-headers.conf; + include /srv/bobinoo/current/nginx/security-headers.conf; add_header Cache-Control "public, max-age=31536000, immutable" always; try_files $uri =404; } location / { - include /srv/azuucine/current/nginx/security-headers.conf; + include /srv/bobinoo/current/nginx/security-headers.conf; add_header Cache-Control "public, max-age=0, must-revalidate" always; try_files $uri $uri/ =404; } } # Console d'administration : https://admin.bobinoo.org (voir admin.conf et docs/admin.md) -include /srv/azuucine/current/nginx/admin.conf; +include /srv/bobinoo/current/nginx/admin.conf; # Messagerie de contact@bobinoo.org : https://mail.bobinoo.org (voir mail.conf et docs/mail.md) -include /srv/azuucine/current/nginx/mail.conf; +include /srv/bobinoo/current/nginx/mail.conf; diff --git a/deploy/release.sh b/deploy/release.sh index 0ced2c8..00b106a 100755 --- a/deploy/release.sh +++ b/deploy/release.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# Publie dist/ de façon atomique dans /srv/azuucine/releases/- puis bascule le lien "current". +# Publie dist/ de façon atomique dans /srv/bobinoo/releases/- puis bascule le lien "current". # Garde les 3 dernières versions. Lancé par le workflow (utilisateur "deploy", sans sudo). set -euo pipefail -ROOT=${AZUUCINE_ROOT:-/srv/azuucine} +ROOT=${BOBINOO_ROOT:-${AZUUCINE_ROOT:-/srv/bobinoo}} KEEP=3 SRC=${1:?usage: release.sh } SHA=${2:?usage: release.sh } diff --git a/deploy/rollback.sh b/deploy/rollback.sh index f9c713b..d14e2b0 100755 --- a/deploy/rollback.sh +++ b/deploy/rollback.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # Revient à la version précédente (ou à celle donnée en argument). À lancer en root sur le VPS : -# /srv/azuucine/rollback.sh -> version juste avant la courante -# /srv/azuucine/rollback.sh -> une version précise (voir ls /srv/azuucine/releases) +# /srv/bobinoo/rollback.sh -> version juste avant la courante +# /srv/bobinoo/rollback.sh -> une version précise (voir ls /srv/bobinoo/releases) set -euo pipefail -ROOT=${AZUUCINE_ROOT:-/srv/azuucine} +ROOT=${BOBINOO_ROOT:-${AZUUCINE_ROOT:-/srv/bobinoo}} CUR=$(basename "$(readlink "$ROOT/current")") if [ -n "${1:-}" ]; then TARGET=$1 else TARGET=$(ls -1 "$ROOT/releases" | sort -r | grep -A1 -x "$CUR" | tail -n1) diff --git a/deploy/web/bootstrap.sh b/deploy/web/bootstrap.sh index f1c1ba0..e02dc7c 100755 --- a/deploy/web/bootstrap.sh +++ b/deploy/web/bootstrap.sh @@ -1,28 +1,28 @@ #!/usr/bin/env bash -# À lancer UNE FOIS, en root, dans un conteneur azuucine-web neuf (Debian 12) : -# lxc-attach -n azuucine-web -- bash < deploy/web/bootstrap.sh -# Prérequis : /srv/azuucine monté dans le conteneur (lxc.mount.entry ... srv/azuucine none bind,ro). +# À lancer UNE FOIS, en root, dans un conteneur bobinoo neuf (Debian 12) : +# lxc-attach -n bobinoo -- bash < deploy/web/bootstrap.sh +# Prérequis : /srv/bobinoo monté dans le conteneur (lxc.mount.entry ... srv/bobinoo none bind,ro). # Ensuite, toute la configuration du site arrive avec les déploiements (deploy/nginx/site.conf). set -euo pipefail export DEBIAN_FRONTEND=noninteractive apt-get update -qq && apt-get install -y -qq nginx >/dev/null rm -f /etc/nginx/sites-enabled/default -echo 'include /srv/azuucine/current/nginx/site.conf;' > /etc/nginx/conf.d/azuucine.conf -cat > /etc/systemd/system/azuucine-reload.path < /etc/nginx/conf.d/bobinoo.conf +cat > /etc/systemd/system/bobinoo-reload.path < /etc/systemd/system/azuucine-reload.service < /etc/systemd/system/bobinoo-reload.service </dev/null 2>&1 +systemctl enable --now bobinoo-reload.path >/dev/null 2>&1 echo "ok : le premier déploiement (push sur main) activera le site" diff --git a/docs/admin.md b/docs/admin.md index 643cd6d..ef29b1b 100644 --- a/docs/admin.md +++ b/docs/admin.md @@ -39,7 +39,7 @@ console se déconnecte après 15 minutes sans activité. La page n'est ni mise e - `supabase/migrations/20261130150000_admin_console.sql` : le schéma `admin` (tables, fonctions, journal verrouillé). - `deploy/nginx/admin.conf` : le serveur de la console (admin.bobinoo.org, CSP stricte, limite d'appels, relais avec secret). Il est inclus par `site.conf`. -- `deploy/release.sh` : copie `dist-admin/` dans chaque release (`/srv/azuucine/current/admin`). +- `deploy/release.sh` : copie `dist-admin/` dans chaque release (`/srv/bobinoo/current/admin`). ## Installation (une fois) @@ -47,7 +47,7 @@ console se déconnecte après 15 minutes sans activité. La page n'est ni mise e 2. **DNS** (OVH, zone bobinoo.org) : enregistrement A `admin` → même adresse IP que `bobinoo.org` (193.168.145.214). 3. **Proxy en façade du VPS** : ajouter `admin.bobinoo.org` comme pour `bobinoo.org` (même destination, en-tête Host transmis) et lui obtenir un certificat HTTPS. -4. **Secret**, dans le conteneur web (`azuucine-web`) : +4. **Secret**, dans le conteneur web (`bobinoo`) : ```bash S=$(openssl rand -hex 32) printf 'proxy_set_header X-Admin-Gate "%s";\n' "$S" > /etc/nginx/bobinoo-admin-gate.conf diff --git a/package-lock.json b/package-lock.json index d24e59f..07a4bef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "azuucine", + "name": "bobinoo", "version": "2.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "azuucine", + "name": "bobinoo", "version": "2.2.0", "dependencies": { "@fontsource-variable/epilogue": "5.3.0", diff --git a/package.json b/package.json index 0f962cf..a2edd84 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "azuucine", + "name": "bobinoo", "private": true, "version": "2.2.0", "type": "module", diff --git a/vite.config.ts b/vite.config.ts index fc2e17b..9e2ff67 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -32,7 +32,7 @@ export const buildCsp = (supabaseUrl = '') => [ function contentSecurityPolicy(supabaseUrl: string): Plugin { const csp = buildCsp(supabaseUrl) return { - name: 'azuucine-csp', + name: 'bobinoo-csp', apply: 'build', transformIndexHtml: (html) => html.replace('', `\n `),