Update fleetbase-source/AGENTS.md with email rebrand session notes
This commit is contained in:
@ -383,3 +383,61 @@ Located at `/opt/fleetbase/scripts/deploy-biibaye.sh` on VPS. Current steps:
|
||||
| `AGENTS.md` | All session documentation |
|
||||
|
||||
These changes are mirrored in the `custom-pr` branch of the biibaye extension repo under `fleetbase-source/` for safekeeping.
|
||||
|
||||
---
|
||||
|
||||
## Session: 2026-05-25 — Email Template Rebrand
|
||||
|
||||
### Problem
|
||||
|
||||
OTP email showed "14411 is your fleetbase verification code" (lowercase fleetbase), Fleetbase logo in email header, and "2026 Fleetbase..." in footer. Other notification emails (password reset, user invite, etc.) had hardcoded "Fleetbase" in subject lines and body text.
|
||||
|
||||
### Root Cause
|
||||
|
||||
The application container had `APP_NAME=Fleetbase` despite `docker-compose.override.yml` setting `APP_NAME: "Biibaye"`. The container was created before the override was applied and `restart` doesn't pick up new env vars — only `--force-recreate` does.
|
||||
|
||||
### Fix Applied
|
||||
|
||||
1. **Environment fix:** Recreated application container with `--force-recreate` to pick up `APP_NAME=Biibaye` from override. This fixed all `config('app.name')` references:
|
||||
- OTP email subject: `"XXXX is your Biibaye verification code"` ✓
|
||||
- SMS code: `"Your Biibaye verification code is XXXX"` ✓
|
||||
- Email footer: `"© 2026 Biibaye"` ✓
|
||||
- Logo alt text: `"Biibaye Logo"` ✓
|
||||
- Password reset (forgot): `"Your password reset link for Biibaye"` ✓
|
||||
- User credentials: `"Your login credentials for ... on Biibaye"` ✓
|
||||
|
||||
2. **Hardcoded Fleetbase → `config('app.name')`:** Modified PHP source files to replace hardcoded "Fleetbase" strings. Applied via Docker volume mounts (overlay patched files over vendor directory):
|
||||
|
||||
| File | Change |
|
||||
|------|--------|
|
||||
| `PasswordReset.php` | `"Your password reset link for Fleetbase"` → `config('app.name')` |
|
||||
| `UserInvited.php` | `"...on Fleetbase!"` → `"...on " . config('app.name') . "!"` |
|
||||
| `UserAcceptedCompanyInvite.php` | `"...on Fleetbase!"` + `"Thank you for using Fleetbase!"` → `config('app.name')` |
|
||||
| `TestMail.php` | Subject set via `config('app.name')` in constructor |
|
||||
| `test.blade.php` | `"test email from Fleetbase"` → `{{ config('app.name') }}` |
|
||||
| `fleetbase.php` | Logo URL → `https://console.biibaye.com/images/icon.png` |
|
||||
| `mail.php` | From address default → `no-reply@biibaye.com`, name fallback → `Biibaye` |
|
||||
| `Utils.php` | `getDefaultMailFromAddress` default → `null` (uses CONSOLE_HOST) |
|
||||
| `StorefrontNetworkInvite.php` | `->from('hello@fleetbase.io',...)` → `config('mail.from.address')` |
|
||||
|
||||
3. **Volume mounts in docker-compose.override.yml:**
|
||||
```yaml
|
||||
application:
|
||||
volumes:
|
||||
- ./api/patches/core-api/src/Notifications/PasswordReset.php:/fleetbase/api/vendor/fleetbase/core-api/src/Notifications/PasswordReset.php
|
||||
# ... (8 mount points total)
|
||||
```
|
||||
|
||||
This overlays the patched files over the pre-built Docker image without requiring a custom image build.
|
||||
|
||||
### Email branding summary
|
||||
|
||||
| Element | Before | After |
|
||||
|---------|--------|-------|
|
||||
| OTP subject | "XXXX is your fleetbase verification code" | "XXXX is your Biibaye verification code" |
|
||||
| Email header logo | Fleetbase S3 logo | Biibaye icon (from admin setting, fallback: console.biibaye.com) |
|
||||
| Email footer | "© 2026 Fleetbase" | "© 2026 Biibaye" |
|
||||
| From address | hello@fleetbase.io (default) | no-reply@biibaye.com (default) |
|
||||
| From name | Fleetbase (default) | Biibaye (default) |
|
||||
| Password reset subject | "Your password reset link for Fleetbase" | "Your password reset link for Biibaye" |
|
||||
| User invite subject | "...invited to join Company on Fleetbase!" | "...invited to join Company on Biibaye!" |
|
||||
|
||||
Reference in New Issue
Block a user