feat: production email (Resend) + offsite backup (B2)

Resend mail transport:
- composer require resend/resend-laravel (v1.4)
- Laravel 11 ships the 'resend' mailer config in config/mail.php + services
- To switch to production email: set MAIL_MAILER=resend + RESEND_API_KEY,
  register the domain at resend.com/domains, and add the TXT + DKIM CNAME
  records in Cloudflare. .env.example documents the required steps.

Backblaze B2 offsite backup:
- New filesystems 'b2' disk (S3-compatible, env: B2_KEY/SECRET/BUCKET/REGION/ENDPOINT)
- BackupAllTenantsCommand: after writing each tenant's zip to local disk, it
  uploads the same file to the b2 disk under {YYYY-MM-DD}/{slug}.zip — only
  when both B2_KEY and B2_BUCKET are set, so unconfigured installs are no-op
- Without offsite, backups live on the same VPS as production: a single
  hardware failure loses everything. B2 + Resend together make the install
  genuinely production-ready (people get email + offsite backup).

Tests (2 new):
- backup uploads to b2 (fake disk) when configured
- backup skips offsite when env vars not present

Full suite: 140 passed. Force-rebuild deploy required so composer install
picks up resend/resend-php.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-03 06:43:39 +00:00
parent 51917bcbaf
commit 439ef605a1
6 changed files with 230 additions and 2 deletions
Generated
+127 -1
View File
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "72e35bc95dd2b8489e5a7b77b421d237",
"content-hash": "82d0b6d061454a485d2a93b700e4a5a8",
"packages": [
{
"name": "barryvdh/laravel-dompdf",
@@ -6723,6 +6723,132 @@
],
"time": "2024-06-11T12:45:25+00:00"
},
{
"name": "resend/resend-laravel",
"version": "v1.4.0",
"source": {
"type": "git",
"url": "https://github.com/resend/resend-laravel.git",
"reference": "6dd5f5ec607404068c5af067fd7f6ba4b659262b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/resend/resend-laravel/zipball/6dd5f5ec607404068c5af067fd7f6ba4b659262b",
"reference": "6dd5f5ec607404068c5af067fd7f6ba4b659262b",
"shasum": ""
},
"require": {
"illuminate/http": "^10.0|^11.0|^12.0|^13.0",
"illuminate/support": "^10.0|^11.0|^12.0|^13.0",
"php": "^8.1",
"resend/resend-php": "^1.0.0",
"symfony/mailer": "^6.2|^7.0|^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.14",
"mockery/mockery": "^1.5",
"orchestra/testbench": "^8.17|^9.0|^10.8|^11.0",
"pestphp/pest": "^1.0|^2.0|^3.7|^4.0"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Resend\\Laravel\\ResendServiceProvider"
]
},
"branch-alias": {
"dev-main": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Resend\\Laravel\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Resend and contributors",
"homepage": "https://github.com/resend/resend-laravel/contributors"
}
],
"description": "Resend for Laravel",
"homepage": "https://resend.com/",
"keywords": [
"api",
"client",
"laravel",
"php",
"resend",
"sdk"
],
"support": {
"issues": "https://github.com/resend/resend-laravel/issues",
"source": "https://github.com/resend/resend-laravel/tree/v1.4.0"
},
"time": "2026-05-06T17:08:44+00:00"
},
{
"name": "resend/resend-php",
"version": "v1.3.0",
"source": {
"type": "git",
"url": "https://github.com/resend/resend-php.git",
"reference": "87d29d98271a0ab1c09cdbee102daa2f9b3419db"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/resend/resend-php/zipball/87d29d98271a0ab1c09cdbee102daa2f9b3419db",
"reference": "87d29d98271a0ab1c09cdbee102daa2f9b3419db",
"shasum": ""
},
"require": {
"guzzlehttp/guzzle": "^7.5",
"php": "^8.1.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.13",
"mockery/mockery": "^1.6",
"pestphp/pest": "^1.0|^2.0|^3.0|^4.0"
},
"type": "library",
"autoload": {
"files": [
"src/Resend.php"
],
"psr-4": {
"Resend\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Resend and contributors",
"homepage": "https://github.com/resend/resend-php/contributors"
}
],
"description": "Resend PHP library.",
"homepage": "https://resend.com/",
"keywords": [
"api",
"client",
"php",
"resend",
"sdk"
],
"support": {
"issues": "https://github.com/resend/resend-php/issues",
"source": "https://github.com/resend/resend-php/tree/v1.3.0"
},
"time": "2026-04-11T10:48:32+00:00"
},
{
"name": "ryangjchandler/blade-capture-directive",
"version": "v1.1.1",