diff --git a/.claude/deploy-memory.md b/.claude/deploy-memory.md index 51628e0..7e19075 100644 --- a/.claude/deploy-memory.md +++ b/.claude/deploy-memory.md @@ -3,20 +3,20 @@ Ce repo contient **deux déploiements distincts** sur la même infra K3s, namespace `rubis` : -1. **Landing** statique (`rubis.arthurbarre.fr`) — image nginx-alpine. -2. **App SaaS** (`app.rubis.arthurbarre.fr`) — image AdonisJS + React (V1). +1. **Landing** statique (`rubis.pro`) — image nginx-alpine. +2. **App SaaS** (`app.rubis.pro`) — image AdonisJS + React (V1). Chacun a sa propre image, son propre Dockerfile, son propre workflow CI. --- -## 1. Landing (`rubis.arthurbarre.fr`) +## 1. Landing (`rubis.pro`) ### Infra - Deployment : `rubis` · Container : `rubis` · NodePort : `30109` - Image : `git.arthurbarre.fr/ordinarthur/rubis` -- Domaine : https://rubis.arthurbarre.fr (sous-domaine **temporaire** — - domaine définitif `rubis-sur-l-ongle.fr` pas encore acheté) +- Domaine : https://rubis.pro (sous-domaine **temporaire** — + domaine définitif `rubis.pro` pas encore acheté) - Manifests : `k3s/{namespace,deployment,service}.yml` - Route Traefik : `~/dev/perso/proxmox/ansible/roles/traefik/templates/rubis.yml.j2` - Workflow CI : `.gitea/workflows/deploy.yml` @@ -28,12 +28,12 @@ Push git, le CI build + rollout auto (filter sur `landing/**`, `Dockerfile`, --- -## 2. App SaaS (`app.rubis.arthurbarre.fr`) +## 2. App SaaS (`app.rubis.pro`) **Architecture en 2 services** : nginx en frontal (web) + API Node interne. ``` -Traefik :443 → app.rubis.arthurbarre.fr:30110 → rubis-web (nginx) +Traefik :443 → app.rubis.pro:30110 → rubis-web (nginx) ├─ / → SPA static (try_files) └─ /api/* → rubis-api (ClusterIP :3333) ``` @@ -65,7 +65,7 @@ Traefik :443 → app.rubis.arthurbarre.fr:30110 → rubis-web (nginx) - Re-déployé par le workflow API (path filter inclut `redis.yml`) ### Infra commune -- Domaine : https://app.rubis.arthurbarre.fr (DNS A 5413305619) +- Domaine : https://app.rubis.pro (DNS A 5413305619) - Route Traefik : `~/dev/perso/proxmox/ansible/roles/traefik/templates/rubis-app.yml.j2` ### Dépendances externes (déjà déployées) @@ -97,10 +97,10 @@ Si la clé OAuth est perdue ou qu'on doit la régénérer : 1. https://console.cloud.google.com/apis/credentials → projet courant 2. **Create Credentials** → **OAuth client ID** → type **Web application** 3. **Authorized JavaScript origins** : - - `https://app.rubis.arthurbarre.fr` + - `https://app.rubis.pro` - `http://localhost:5173` (dev SPA) 4. **Authorized redirect URIs** : - - `https://app.rubis.arthurbarre.fr/api/v1/auth/google/callback` + - `https://app.rubis.pro/api/v1/auth/google/callback` - `http://localhost:3333/api/v1/auth/google/callback` (dev API) 5. Copier `Client ID` + `Client secret` → mettre dans `apps/api/.env` (dev) et `rubis-app-secrets` (prod, snippet ci-dessus). @@ -120,7 +120,7 @@ non-sensibles, validation auto). - ou "Accounts in any organizational directory" (tenant=organizations, M365 strict) 3. **Redirect URI** type **Web** : - - `https://app.rubis.arthurbarre.fr/api/v1/auth/microsoft/callback` + - `https://app.rubis.pro/api/v1/auth/microsoft/callback` 4. Après création : ajouter en plus le redirect dev via **Authentication → Add a platform → Web** : - `http://localhost:3333/api/v1/auth/microsoft/callback` @@ -168,7 +168,7 @@ modifiés. Build+rollout indépendants. ```bash TAG=$(git rev-parse --short HEAD) -# Landing (rubis.arthurbarre.fr) +# Landing (rubis.pro) docker build --platform linux/amd64 -t git.arthurbarre.fr/ordinarthur/rubis:$TAG . docker push git.arthurbarre.fr/ordinarthur/rubis:$TAG kubectl --kubeconfig ~/dev/perso/proxmox/k3s/kubeconfig.yaml \ @@ -202,14 +202,14 @@ challenge LE). --- -## Quand le domaine définitif sera acheté (`rubis-sur-l-ongle.fr`) +## Quand le domaine définitif sera acheté (`rubis.pro`) 1. Records DNS chez OVH : A `@`, A `app`, MX/SPF/DKIM pour Resend 2. Modifier les rules dans `rubis.yml.j2` et `rubis-app.yml.j2` (Host) 3. Replay `gateway.yml` -4. Maj `MAIL_FROM_ADDRESS=relances@rubis-sur-l-ongle.fr` dans le secret -5. (Optionnel) supprimer les A records `rubis.arthurbarre.fr` et - `app.rubis.arthurbarre.fr` chez OVH +4. Maj `MAIL_FROM_ADDRESS=relances@rubis.pro` dans le secret +5. (Optionnel) supprimer les A records `rubis.pro` et + `app.rubis.pro` chez OVH --- diff --git a/.gitea/workflows/deploy-web.yml b/.gitea/workflows/deploy-web.yml index d09665c..ec3a328 100644 --- a/.gitea/workflows/deploy-web.yml +++ b/.gitea/workflows/deploy-web.yml @@ -1,6 +1,6 @@ name: Build & Deploy Web -# Workflow Web (React/Vite + nginx) — sert app.rubis.arthurbarre.fr. +# Workflow Web (React/Vite + nginx) — sert app.rubis.pro. # Reverse-proxie /api/* vers le service ClusterIP rubis-api. on: push: @@ -52,8 +52,8 @@ jobs: # Vars Vite injectées dans le bundle au build time. Pour staging, # créer un workflow séparé avec d'autres VITE_API_URL. build-args: | - VITE_API_URL=https://app.rubis.arthurbarre.fr - VITE_PUBLIC_LANDING_URL=https://rubis.arthurbarre.fr + VITE_API_URL=https://app.rubis.pro + VITE_PUBLIC_LANDING_URL=https://rubis.pro VITE_USE_MOCKS=false - name: Install kubectl diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 801ae54..edd74e7 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -1,6 +1,6 @@ name: Build & Deploy Landing -# Workflow pour la landing static (rubis.arthurbarre.fr). +# Workflow pour la landing static (rubis.pro). # L'app SaaS (apps/api + apps/web) a son propre workflow : deploy-app.yml. on: push: diff --git a/AGENTS.md b/AGENTS.md index d79f38c..d8c6c79 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -151,7 +151,7 @@ Voir `/docs/decisions.md` pour le log complet avec rationale. ## Déploiement - **Image** : `git.arthurbarre.fr/ordinarthur/rubis:latest` -- **Domaine actuel** (temporaire) : https://rubis.arthurbarre.fr +- **Domaine actuel** (temporaire) : https://rubis.pro - **Build** : `COPY landing/` → nginx servi sur port 80 - Voir `.Codex/deploy-memory.md` pour la procédure complète. diff --git a/CLAUDE.md b/CLAUDE.md index 7106c92..274051f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -154,7 +154,7 @@ Voir `/docs/decisions.md` pour le log complet avec rationale. ## Déploiement - **Image** : `git.arthurbarre.fr/ordinarthur/rubis:latest` -- **Domaine actuel** (temporaire) : https://rubis.arthurbarre.fr +- **Domaine actuel** (temporaire) : https://rubis.pro - **Build** : `COPY landing/` → nginx servi sur port 80 - Voir `.claude/deploy-memory.md` pour la procédure complète. diff --git a/Dockerfile.web b/Dockerfile.web index 4cdf615..e4547f2 100644 --- a/Dockerfile.web +++ b/Dockerfile.web @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1.7 # ============================================================================= # Rubis — image web (SPA React/Vite servi par nginx) -# Sert app.rubis.arthurbarre.fr (front + reverse proxy /api/* → rubis-api). +# Sert app.rubis.pro (front + reverse proxy /api/* → rubis-api). # ============================================================================= ARG NODE_VERSION=22.13.1 @@ -14,8 +14,8 @@ ARG NGINX_VERSION=1.27-alpine # `vite build`. Valeurs par défaut = prod ; surcharger via --build-arg pour # preview/staging. # ============================================================================= -ARG VITE_API_URL=https://app.rubis.arthurbarre.fr -ARG VITE_PUBLIC_LANDING_URL=https://rubis.arthurbarre.fr +ARG VITE_API_URL=https://app.rubis.pro +ARG VITE_PUBLIC_LANDING_URL=https://rubis.pro ARG VITE_USE_MOCKS=false # ----------------------------------------------------------------------------- diff --git a/apps/api/.env.example b/apps/api/.env.example index 5d4cfc3..1fe0fcb 100644 --- a/apps/api/.env.example +++ b/apps/api/.env.example @@ -74,7 +74,7 @@ WEB_URL=http://localhost:5173 # Landing publique — lien dans le footer des emails ("Rubis sur l'ongle" # pointe vers ce domaine). #-------------------------------------------------------------------- -LANDING_URL=https://rubis.arthurbarre.fr +LANDING_URL=https://rubis.pro #-------------------------------------------------------------------- # Auth (refresh tokens) @@ -88,7 +88,7 @@ COOKIE_SECURE=false # Google SSO (Ally) — créer un OAuth Client ID web sur Google Cloud # Console, puis ajouter les redirect URIs : # - http://localhost:3333/api/v1/auth/google/callback (dev) -# - https://app.rubis.arthurbarre.fr/api/v1/auth/google/callback (prod) +# - https://app.rubis.pro/api/v1/auth/google/callback (prod) #-------------------------------------------------------------------- GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= @@ -99,7 +99,7 @@ GOOGLE_CALLBACK_URL=http://localhost:3333/api/v1/auth/google/callback # (Microsoft Entra ID → App registrations → New registration → Web), # redirect URIs à enregistrer : # - http://localhost:3333/api/v1/auth/microsoft/callback (dev) -# - https://app.rubis.arthurbarre.fr/api/v1/auth/microsoft/callback (prod) +# - https://app.rubis.pro/api/v1/auth/microsoft/callback (prod) # Tenant : 'common' (work + perso), 'organizations' (M365 only) ou un GUID. #-------------------------------------------------------------------- MICROSOFT_CLIENT_ID= diff --git a/apps/api/app/services/mail_dispatcher.ts b/apps/api/app/services/mail_dispatcher.ts index 14b6115..26a3fde 100644 --- a/apps/api/app/services/mail_dispatcher.ts +++ b/apps/api/app/services/mail_dispatcher.ts @@ -100,7 +100,7 @@ export async function sendRelanceEmail({ const subject = renderTemplate(step.subject, vars) const body = renderTemplate(step.body, vars) - const fromAddress = env.get('MAIL_FROM_ADDRESS', 'relances@rubis-sur-l-ongle.fr') + const fromAddress = env.get('MAIL_FROM_ADDRESS', 'relances@rubis.pro') // Le client final connaît l'org (ex: "Arthur Barré"), pas Rubis. On utilise // le nom de l'org comme display name visible côté client. Fallback : // user.fullName, puis MAIL_FROM_NAME (= "Rubis sur l'ongle") en dernier @@ -117,7 +117,7 @@ export async function sendRelanceEmail({ nowOrg.startOf('day').diff(invoice.dueDate.startOf('day'), 'days').days ) - const landingUrl = env.get('LANDING_URL', 'https://rubis.arthurbarre.fr') + const landingUrl = env.get('LANDING_URL', 'https://rubis.pro') // Rendu HTML via React Email — DA Rubis (header rubis-deep + card cream). const htmlBody = await render( @@ -241,14 +241,14 @@ Ces liens expirent dans 24h. Merci, L'équipe Rubis` - const fromAddress = env.get('MAIL_FROM_ADDRESS', 'relances@rubis-sur-l-ongle.fr') + const fromAddress = env.get('MAIL_FROM_ADDRESS', 'relances@rubis.pro') // Le check-in vient FROM Rubis (notification interne à l'user, pas au // client final). On garde donc le brand "Rubis sur l'ongle" comme display, // PAS le nom de l'org. const fromName = env.get('MAIL_FROM_NAME', "Rubis sur l'ongle") // Rendu HTML — DA Rubis avec 2 boutons CTA Oui/Non. - const landingUrl = env.get('LANDING_URL', 'https://rubis.arthurbarre.fr') + const landingUrl = env.get('LANDING_URL', 'https://rubis.pro') const htmlBody = await render( CheckinEmail({ invoice: { diff --git a/apps/api/commands/send_test_email.ts b/apps/api/commands/send_test_email.ts index f6124e9..ab88ad3 100644 --- a/apps/api/commands/send_test_email.ts +++ b/apps/api/commands/send_test_email.ts @@ -45,9 +45,9 @@ export default class SendTestEmail extends BaseCommand { async run() { const driver = env.get('MAIL_DRIVER', 'smtp') - const fromAddress = env.get('MAIL_FROM_ADDRESS', 'relances@rubis-sur-l-ongle.fr') + const fromAddress = env.get('MAIL_FROM_ADDRESS', 'relances@rubis.pro') const fromName = env.get('MAIL_FROM_NAME', "Rubis sur l'ongle") - const landingUrl = env.get('LANDING_URL', 'https://rubis.arthurbarre.fr') + const landingUrl = env.get('LANDING_URL', 'https://rubis.pro') this.logger.info(`Driver: ${driver}`) this.logger.info(`From: ${fromName} <${fromAddress}>`) diff --git a/apps/api/config/mail.ts b/apps/api/config/mail.ts index 98a8926..9d1ea9a 100644 --- a/apps/api/config/mail.ts +++ b/apps/api/config/mail.ts @@ -6,7 +6,7 @@ const mailConfig = defineConfig({ default: env.get('MAIL_DRIVER', 'smtp'), from: { - address: env.get('MAIL_FROM_ADDRESS', 'relances@rubis-sur-l-ongle.fr'), + address: env.get('MAIL_FROM_ADDRESS', 'relances@rubis.pro'), name: env.get('MAIL_FROM_NAME', "Rubis sur l'ongle"), }, diff --git a/apps/web/.env.example b/apps/web/.env.example index 301eabe..857362f 100644 --- a/apps/web/.env.example +++ b/apps/web/.env.example @@ -2,7 +2,7 @@ VITE_API_URL=http://localhost:3333 # URL de la landing publique (lien retour depuis l'app) -VITE_PUBLIC_LANDING_URL=https://rubis.arthurbarre.fr +VITE_PUBLIC_LANDING_URL=https://rubis.pro # Active MSW pour mocker l'API. Laisser à "false" pour taper le vrai backend. VITE_USE_MOCKS=false diff --git a/docs/brand-identity.html b/docs/brand-identity.html index bb3eb98..9055e87 100644 --- a/docs/brand-identity.html +++ b/docs/brand-identity.html @@ -932,7 +932,7 @@