From 98dd5b4437ed0fc24a5138668f774d7df43644d0 Mon Sep 17 00:00:00 2001 From: TheRealToxicDev Date: Mon, 19 Oct 2026 07:42:26 -0600 Subject: [PATCH] fix: cleanup wordplay --- .github/README.md | 4 +- CHANGELOG.md | 658 +++++++++--------- apps/docs/get-started/examples.mdx | 6 +- apps/docs/get-started/go.mdx | 6 +- apps/docs/get-started/local.mdx | 4 +- apps/docs/guides/admin-operations.mdx | 4 +- apps/docs/guides/api-authentication.mdx | 2 +- apps/docs/guides/campaigns.mdx | 22 +- apps/docs/guides/connected-accounts.mdx | 2 +- apps/docs/guides/contact-books.mdx | 2 +- apps/docs/guides/deliverability.mdx | 12 +- apps/docs/guides/plan-management.mdx | 2 +- apps/docs/guides/sending-regions.mdx | 4 +- apps/docs/guides/spam-protection.mdx | 4 +- apps/docs/guides/use-with-react-email.mdx | 2 +- apps/docs/self-hosting/admin-panel.mdx | 2 +- apps/docs/self-hosting/certificates.mdx | 14 +- apps/docs/self-hosting/docker.mdx | 2 +- apps/docs/self-hosting/firewall.mdx | 6 +- apps/docs/self-hosting/overview.mdx | 12 +- apps/docs/self-hosting/reverse-proxy.mdx | 18 +- apps/docs/self-hosting/security.mdx | 8 +- apps/docs/self-hosting/smtp-server.mdx | 10 +- .../(dashboard)/admin/teams/[teamId]/page.tsx | 2 +- .../teams/_components/assign-plan-card.tsx | 8 +- .../broadcasts/create-broadcast.tsx | 2 +- .../(dashboard)/domains/[domainId]/page.tsx | 6 +- .../domains/[domainId]/region-move-card.tsx | 4 +- .../app/(dashboard)/domains/add-domain.tsx | 2 +- .../settings/account/account-settings.tsx | 4 +- .../settings/account/connected-accounts.tsx | 2 +- .../settings/team/invite-team-member.tsx | 2 +- .../settings/team/team-general-settings.tsx | 2 +- .../src/app/(marketing)/changelog/page.tsx | 33 +- .../app/(marketing)/cookie-policy/page.tsx | 2 +- apps/web/src/app/(marketing)/dmca/page.tsx | 2 +- apps/web/src/app/(marketing)/dpa/page.tsx | 6 +- apps/web/src/app/(marketing)/legal/page.tsx | 2 +- apps/web/src/app/(marketing)/privacy/page.tsx | 2 +- apps/web/src/app/(marketing)/stats/page.tsx | 11 +- apps/web/src/app/api/auth/2fa/route.ts | 2 +- .../app/api/auth/backup-email-login/route.ts | 2 +- apps/web/src/app/api/version/route.ts | 4 +- apps/web/src/app/api/webhook/stripe/route.ts | 10 +- apps/web/src/app/login/login-page.tsx | 6 +- .../src/components/marketing/DevSection.tsx | 2 +- .../web/src/components/marketing/Features.tsx | 2 +- apps/web/src/components/marketing/Hero.tsx | 2 +- .../src/components/marketing/HowItWorks.tsx | 2 +- apps/web/src/components/marketing/TopNav.tsx | 6 +- apps/web/src/lib/constants/payments.ts | 2 +- apps/web/src/server/api/routers/domain.ts | 4 +- apps/web/src/server/billing/payments.ts | 2 +- .../src/server/jobs/blacklist-check-job.ts | 2 +- apps/web/src/server/service/domain-service.ts | 2 +- .../src/server/service/email-queue-service.ts | 4 +- apps/web/src/server/service/limit-service.ts | 10 +- .../service/spam-scan-service.unit.test.ts | 4 +- apps/web/src/server/service/team-service.ts | 12 +- packages/go-sdk/README.md | 34 +- 60 files changed, 519 insertions(+), 493 deletions(-) diff --git a/.github/README.md b/.github/README.md index 9564c62..2341afd 100644 --- a/.github/README.md +++ b/.github/README.md @@ -73,9 +73,9 @@ Prefer another language or no code at all? Use the [Python](../packages/python-s ## Cloud or self-hosted -**Cloud** — [bytesend.cloud](https://bytesend.cloud) is the fastest start: sign up, verify a domain and send. No infrastructure to run. +**Cloud**: [bytesend.cloud](https://bytesend.cloud) is the fastest start: sign up, verify a domain and send. No infrastructure to run. -**Self-hosted** — ByteSend is free to self-host under AGPL-3.0. You bring PostgreSQL, Redis and an AWS account with SES. +**Self-hosted**: ByteSend is free to self-host under AGPL-3.0. You bring PostgreSQL, Redis and an AWS account with SES. ```bash git clone https://github.com/NodeByteLTD/ByteSend.git diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e47534..af65f11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,8 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.4.2] - 2026-10-19 ### Added -- **[Open stats](https://bytesend.cloud/stats)** — a public page (Cloud only) with aggregate emails sent, delivery rate, 30-day daily volume, bounce and complaint rates against AWS limits, active sending regions and uptime from the status page. Numbers are cached for an hour and contain no per-team data -- **Status page component locations** — status components can carry an optional location (e.g. `us-east-1` or "N. Virginia"), shown as a badge on the public status page, component pages and the admin component list +- **[Open stats](https://bytesend.cloud/stats)**: a public page (Cloud only) with aggregate emails sent, delivery rate, 30-day daily volume, bounce and complaint rates against AWS limits, active sending regions and uptime from the status page. Numbers are cached for an hour and contain no per-team data +- **Status page component locations**: status components can carry an optional location (e.g. `us-east-1` or "N. Virginia"), shown as a badge on the public status page, component pages and the admin component list ### Fixed - Status page Open Graph cards for incidents and maintenance now show times in UTC (previously the server's local time, unlabelled) and use brand colours for the Monitoring, Resolved, Scheduled, In Progress and Completed states @@ -25,9 +25,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.4.1] - 2026-10-19 ### Added -- **SES health endpoints** for status-page monitoring: `GET /api/health/ses/` returns 200 while a region can send (with `status` of `operational` or `degraded` — sandboxed, on probation or above 90% of the 24-hour quota) and 503 when sending is disabled, the account is shut down or SES can't be reached; `GET /api/health/ses` summarises every active region. Results are cached for a minute, and enforcement and quota details are only returned to requests carrying the optional `HEALTH_CHECK_TOKEN` -- **Status links** — the dashboard sidebar, docs navigation, README and support page now link to [status.bytesend.cloud](https://status.bytesend.cloud) -- **[Examples](https://docs.bytesend.cloud/get-started/examples)** — complete, runnable examples for Node.js, TypeScript, React Email (TypeScript and JavaScript), Next.js, Express, idempotent and batch sends, Python and Go, replacing links to an examples repository that no longer exists +- **SES health endpoints** for status-page monitoring: `GET /api/health/ses/` returns 200 while a region can send (with `status` of `operational` or `degraded`: sandboxed, on probation or above 90% of the 24-hour quota) and 503 when sending is disabled, the account is shut down or SES can't be reached; `GET /api/health/ses` summarises every active region. Results are cached for a minute, and enforcement and quota details are only returned to requests carrying the optional `HEALTH_CHECK_TOKEN` +- **Status links**: the dashboard sidebar, docs navigation, README and support page now link to [status.bytesend.cloud](https://status.bytesend.cloud) +- **[Examples](https://docs.bytesend.cloud/get-started/examples)**: complete, runnable examples for Node.js, TypeScript, React Email (TypeScript and JavaScript), Next.js, Express, idempotent and batch sends, Python and Go, replacing links to an examples repository that no longer exists - The React Email guide now passes components straight to the SDK's `react` option instead of rendering them by hand ### Fixed @@ -46,14 +46,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added #### Brand -- **New identity: "Speed Ribbon"** — nested envelope-arrows trailing into motion lines, in the existing four blues (`#85FCFF`, `#00C3D6`, `#1FB5FF`, `#0057FF`) on ink `#05070D`, with a two-tone Sora wordmark; ships in full, compact (≤40px) and glyph (≤20px) detail levels so it stays legible down to a 16px favicon -- **Brand asset kit** (`public/brand/`) — SVG marks (colour, mono black/white, compact, glyph), light/dark wordmarks, 1024px app icon, social avatar, GitHub social preview (1280×640), Discord banner (960×540) and invite splash (1920×1080), X/Twitter header (1500×500) -- **`pnpm --filter web brand:generate`** — regenerates every logo, favicon, app icon and banner from the shared geometry in `src/lib/brand.tsx` -- **Open Graph & Twitter images** — generated `opengraph-image` / `twitter-image` routes for the site and the changelog using `next/og`, replacing the externally hosted share image -- **Discord emoji set** (`public/brand/discord-emojis/`) — static `bs_logo`, `bs_send`, `bs_api`, `bs_delivered`, `bs_bounced`, `bs_held`, `bs_verified` and animated `bs_sending`, `bs_loading`, `bs_mailfly`, all 128×128 and well under Discord's 256 KB limit; regenerate with `pnpm --filter web brand:emojis` +- **New identity: "Speed Ribbon"**: nested envelope-arrows trailing into motion lines, in the existing four blues (`#85FCFF`, `#00C3D6`, `#1FB5FF`, `#0057FF`) on ink `#05070D`, with a two-tone Sora wordmark; ships in full, compact (≤40px) and glyph (≤20px) detail levels so it stays legible down to a 16px favicon +- **Brand asset kit** (`public/brand/`): SVG marks (colour, mono black/white, compact, glyph), light/dark wordmarks, 1024px app icon, social avatar, GitHub social preview (1280×640), Discord banner (960×540) and invite splash (1920×1080), X/Twitter header (1500×500) +- **`pnpm --filter web brand:generate`**: regenerates every logo, favicon, app icon and banner from the shared geometry in `src/lib/brand.tsx` +- **Open Graph & Twitter images**: generated `opengraph-image` / `twitter-image` routes for the site and the changelog using `next/og`, replacing the externally hosted share image +- **Discord emoji set** (`public/brand/discord-emojis/`): static `bs_logo`, `bs_send`, `bs_api`, `bs_delivered`, `bs_bounced`, `bs_held`, `bs_verified` and animated `bs_sending`, `bs_loading`, `bs_mailfly`, all 128×128 and well under Discord's 256 KB limit; regenerate with `pnpm --filter web brand:emojis` #### Website -- **Refreshed homepage** — reordered to hero → proof points → developer quick-start → features → how it works → pricing → comparison → call to action, with smooth anchor scrolling and gentle scroll-in animations that respect reduced-motion settings +- **Refreshed homepage**: reordered to hero → proof points → developer quick-start → features → how it works → pricing → comparison → call to action, with smooth anchor scrolling and gentle scroll-in animations that respect reduced-motion settings - New hero copy with a "What's new" link to the changelog, and the brand palette across headings, feature icons and accents - Features rewritten as a bento grid that now covers deliverability guardrails, spam protection and sending regions - New "How it works" section: verify a domain, send, watch it land @@ -63,37 +63,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - All Discord links point to the new ByteSend community server #### Admin Panel -- **Overview dashboard** (`/admin`) — 7/30/90-day KPIs with prior-period deltas, sending and signup charts, SES quota and sandbox status per region, a "Needs attention" panel (teams over bounce/complaint warning thresholds, blocked teams, failing domains) and recent admin activity +- **Overview dashboard** (`/admin`): 7/30/90-day KPIs with prior-period deltas, sending and signup charts, SES quota and sandbox status per region, a "Needs attention" panel (teams over bounce/complaint warning thresholds, blocked teams, failing domains) and recent admin activity - **Grouped admin navigation** and **Ctrl/⌘+K global search** across users, teams, domains and emails -- **Audit log** (`/admin/audit`) — every admin mutation is recorded with actor, target and a before/after diff; filterable, and shown per team and per user -- **Team detail pages** (`/admin/teams/[id]`) — usage, 7-day deliverability gauges, members, domains (with blacklist and region-move status), API keys, webhooks, subscription, limits, plan assignment, audited block/unblock with a reason, and typed-confirmation delete -- **User detail pages** (`/admin/users/[id]`) — flags, 2FA, sign-in methods, active sessions, backup emails and teams -- **Deliverability** (`/admin/deliverability`) — every team's 7-day hard-bounce and complaint rates against the enforcement thresholds, with block/unblock -- **Email explorer** (`/admin/emails`) — cross-team sending history with status, recipient, sender and subject filters and an event timeline; viewing a message body is audited and rendered in a fully sandboxed frame -- **Domain blacklist monitoring** (`/admin/blacklists`) — verified sending domains checked daily against Spamhaus DBL, SURBL and URIBL with Discord alerts on new listings and manual re-checks; refused public-resolver queries report "Unknown" instead of a false "clean" -- **Spam review** (`/admin/spam`) — queue of held and flagged outbound messages with rule hits, release and reject +- **Audit log** (`/admin/audit`): every admin mutation is recorded with actor, target and a before/after diff; filterable, and shown per team and per user +- **Team detail pages** (`/admin/teams/[id]`): usage, 7-day deliverability gauges, members, domains (with blacklist and region-move status), API keys, webhooks, subscription, limits, plan assignment, audited block/unblock with a reason, and typed-confirmation delete +- **User detail pages** (`/admin/users/[id]`): flags, 2FA, sign-in methods, active sessions, backup emails and teams +- **Deliverability** (`/admin/deliverability`): every team's 7-day hard-bounce and complaint rates against the enforcement thresholds, with block/unblock +- **Email explorer** (`/admin/emails`): cross-team sending history with status, recipient, sender and subject filters and an event timeline; viewing a message body is audited and rendered in a fully sandboxed frame +- **Domain blacklist monitoring** (`/admin/blacklists`): verified sending domains checked daily against Spamhaus DBL, SURBL and URIBL with Discord alerts on new listings and manual re-checks; refused public-resolver queries report "Unknown" instead of a false "clean" +- **Spam review** (`/admin/spam`): queue of held and flagged outbound messages with rule hits, release and reject #### Sending -- **Outbound spam detection** — rule-based scoring for phishing phrases, brand impersonation, mismatched/IP/shortened/punycode links, `javascript:`/`data:` links, executable attachments, hidden text and more; score ≥ 5 is flagged and sent, ≥ 10 is held for review with the new `HELD` email status; campaigns are scanned once at launch; five holds in 24 hours blocks the team automatically -- **Change sending region** — team admins can move a verified domain to another SES region from the domain page with no downtime: the new identity is registered under a region-specific DKIM selector, sending stays on the old region until the new DKIM and MAIL FROM verify, then switches automatically; the old identity is retired 24 hours later +- **Outbound spam detection**: rule-based scoring for phishing phrases, brand impersonation, mismatched/IP/shortened/punycode links, `javascript:`/`data:` links, executable attachments, hidden text and more; score ≥ 5 is flagged and sent, ≥ 10 is held for review with the new `HELD` email status; campaigns are scanned once at launch; five holds in 24 hours blocks the team automatically +- **Change sending region**: team admins can move a verified domain to another SES region from the domain page with no downtime: the new identity is registered under a region-specific DKIM selector, sending stays on the old region until the new DKIM and MAIL FROM verify, then switches automatically; the old identity is retired 24 hours later #### Account -- **Connected accounts** — connect, reconnect and disconnect GitHub, Google and Discord from account settings; "Use this email" adopts a provider's email through the existing two-step email-change verification +- **Connected accounts**: connect, reconnect and disconnect GitHub, Google and Discord from account settings; "Use this email" adopts a provider's email through the existing two-step email-change verification - Email changes are now available to users who signed up with OAuth ### Changed -- **Campaign scheduler** — skips the database entirely while no campaign is due (Redis idle flag, cleared whenever a campaign is scheduled, resumed or sent), and registers its tick with `upsertJobScheduler` after removing stale repeatable jobs left by earlier tick intervals +- **Campaign scheduler**: skips the database entirely while no campaign is due (Redis idle flag, cleared whenever a campaign is scheduled, resumed or sent), and registers its tick with `upsertJobScheduler` after removing stale repeatable jobs left by earlier tick intervals - **Prisma query logging** is now opt-in in development via `PRISMA_LOG_QUERIES=true` - Teams and users admin pages are now searchable lists that open the new detail pages; domains, webhooks, billing and email analytics share the refreshed admin layout - Bounce/complaint thresholds moved to `src/lib/constants/deliverability.ts`, shared by `LimitService` and the admin views - **`/api/version`** caches the release lookup for 10 minutes and falls back to the last known version, instead of calling GitHub up to three times on every dashboard load; the sidebar no longer shows a stale hard-coded version when the lookup fails - **Syntax highlighting** loads only the eight languages and two themes the site uses instead of every Shiki grammar, shrinking the homepage bundle and dev compile -- **SDKs** — `bytesend-js` 0.1.3 and the `bytesend` Python package 0.1.2 add the `HELD` email status +- **SDKs**: `bytesend-js` 0.1.3 and the `bytesend` Python package 0.1.2 add the `HELD` email status - Release workflows skip versions that are already published instead of failing, and the npm release runs on Node 24 (npm 12 no longer supports Node 20) ### Fixed -- **Security: dashboard route gate** — the middleware treated every path as public because `/` matched every route as a prefix, so the dashboard was never gated at the edge. It now requires a session for all dashboard routes and sends signed-out visitors to the login page, which returns them to the page they asked for. (Sessions are stored in the database, so bans and 2FA continue to be enforced on the server for every request.) -- **Security: OAuth account takeover** — sign-in with GitHub, Google or Discord now requires the provider to have verified the email address; previously an unverified provider email could be linked to an existing ByteSend account +- **Security: dashboard route gate**: the middleware treated every path as public because `/` matched every route as a prefix, so the dashboard was never gated at the edge. It now requires a session for all dashboard routes and sends signed-out visitors to the login page, which returns them to the page they asked for. (Sessions are stored in the database, so bans and 2FA continue to be enforced on the server for every request.) +- **Security: OAuth account takeover**: sign-in with GitHub, Google or Discord now requires the provider to have verified the email address; previously an unverified provider email could be linked to an existing ByteSend account - Webhook-call cleanup job was never started, so call history was never pruned - "Paid users only" in admin email analytics only counted the BASIC plan - Admin team settings reset dropped extra domain/member slots after saving; literal `…`/`–` text in the teams page @@ -113,7 +113,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `20261018200000_add_admin_audit_log`, `20261018210000_add_domain_blacklist_checks`, `20261018220000_add_account_email`, `20261018230000_add_domain_region_move`, `20261019000000_add_spam_scans` ### Environment -- `SPAMHAUS_DQS_KEY` (optional) — Spamhaus Data Query Service key for reliable DBL lookups +- `SPAMHAUS_DQS_KEY` (optional): Spamhaus Data Query Service key for reliable DBL lookups - `PRISMA_LOG_QUERIES` (optional, development) --- @@ -123,35 +123,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added #### Security & Account Management -- **Ban enforcement across all layers** — the existing `isBanned` flag on `User` is now fully enforced: login is blocked at the `signIn` callback with a redirect to `/login?error=banned`; the JWT token embeds `isBanned` so middleware can gate all protected routes; every `authedProcedure` tRPC call re-validates against the database; and the public REST API blocks requests where the team's admin is banned -- **Banned user page** (`/banned`) — dedicated page shown to banned users with account suspension message and a "Join our Discord" link for false-ban appeals -- **AGENTS.md** — documentation file at the repo root describing project architecture, dev commands, auth layers, conventions, and testing notes for AI coding agents +- **Ban enforcement across all layers**: the existing `isBanned` flag on `User` is now fully enforced: login is blocked at the `signIn` callback with a redirect to `/login?error=banned`; the JWT token embeds `isBanned` so middleware can gate all protected routes; every `authedProcedure` tRPC call re-validates against the database; and the public REST API blocks requests where the team's admin is banned +- **Banned user page** (`/banned`): dedicated page shown to banned users with account suspension message and a "Join our Discord" link for false-ban appeals +- **AGENTS.md**: documentation file at the repo root describing project architecture, dev commands, auth layers, conventions, and testing notes for AI coding agents #### Email Reputation & Deliverability -- **Bounce/complaint rate enforcement** — 7-day rolling hard-bounce rate > 2% or complaint rate > 0.1% (Google/Yahoo thresholds) auto-blocks a team's sending with a Discord alert; warns at 1.5% / 0.08%; minimum volume of 100 emails required before enforcement kicks in; uses `LimitReason.BOUNCE_RATE_EXCEEDED` / `LimitReason.COMPLAINT_RATE_EXCEEDED` -- **RFC 8058 one-click unsubscribe compliance** — `List-Unsubscribe` header now lists the POST-capable one-click endpoint first (required by Gmail/Yahoo), with the click-based `/unsubscribe` URL as a fallback for Outlook; `List-Unsubscribe-Post: List-Unsubscribe=One-Click` header added automatically for marketing emails; the one-click route now also accepts GET requests with a 302 redirect to the user-facing unsubscribe page for click-based mail clients -- **`unsubOneClickUrl` threading** — one-click URL generated per email in `executeEmail()` and passed through `sendRawEmail()` → `buildHeaders()` +- **Bounce/complaint rate enforcement**: 7-day rolling hard-bounce rate > 2% or complaint rate > 0.1% (Google/Yahoo thresholds) auto-blocks a team's sending with a Discord alert; warns at 1.5% / 0.08%; minimum volume of 100 emails required before enforcement kicks in; uses `LimitReason.BOUNCE_RATE_EXCEEDED` / `LimitReason.COMPLAINT_RATE_EXCEEDED` +- **RFC 8058 one-click unsubscribe compliance**: `List-Unsubscribe` header now lists the POST-capable one-click endpoint first (required by Gmail/Yahoo), with the click-based `/unsubscribe` URL as a fallback for Outlook; `List-Unsubscribe-Post: List-Unsubscribe=One-Click` header added automatically for marketing emails; the one-click route now also accepts GET requests with a 302 redirect to the user-facing unsubscribe page for click-based mail clients +- **`unsubOneClickUrl` threading**: one-click URL generated per email in `executeEmail()` and passed through `sendRawEmail()` → `buildHeaders()` #### Notifications -- **Team-scoped bounce/complaint notifications** — SES hook parser now routes bounce and complaint events through `NotificationProviderService.broadcastNotification()` to the team's own configured providers instead of the platform-level admin Discord; notification content omits raw recipient addresses (count only) -- **`ADMIN_DISCORD_WEBHOOK_URL` env var** — optional platform-level observer webhook; when set, `broadcastNotification()` fans out a copy of every team event to this URL after dispatching to team providers; teams cannot register this URL as their own provider -- **Admin webhook collision guard** — `validateConfig()` in `NotificationProviderService` rejects any Discord or Slack webhook URL that matches `ADMIN_DISCORD_WEBHOOK_URL` +- **Team-scoped bounce/complaint notifications**: SES hook parser now routes bounce and complaint events through `NotificationProviderService.broadcastNotification()` to the team's own configured providers instead of the platform-level admin Discord; notification content omits raw recipient addresses (count only) +- **`ADMIN_DISCORD_WEBHOOK_URL` env var**: optional platform-level observer webhook; when set, `broadcastNotification()` fans out a copy of every team event to this URL after dispatching to team providers; teams cannot register this URL as their own provider +- **Admin webhook collision guard**: `validateConfig()` in `NotificationProviderService` rejects any Discord or Slack webhook URL that matches `ADMIN_DISCORD_WEBHOOK_URL` #### Admin Panel -- **Domain force-verify** — admins can set a domain's status to `SUCCESS` directly from the Domains admin page (useful for stuck verifications); shield icon button appears on non-verified domains -- **Domain delete** — admins can permanently delete any domain from the Domains admin page -- **Team delete** — permanent team deletion with browser confirmation dialog from the team detail view's new Danger Zone section -- **Extra domain/member slots** — team settings form now exposes `extraDomainSlots` and `extraMemberSlots` fields so admins can grant bonus capacity without changing a team's plan -- **Complimentary plan assignment for all admins** — `adminAssignPlan` no longer requires `isEnvAdmin`; any admin can now assign plans complimentarily (no charge) or generate Stripe checkout links; plan assignment UI visible to all `isAdmin` users (previously only `isEnvAdmin`) -- **Dual plan assignment buttons** — teams page now shows both "Assign complimentary" (immediate, no charge) and "Checkout link" (Stripe) buttons; checkout link button disabled for FREE plan +- **Domain force-verify**: admins can set a domain's status to `SUCCESS` directly from the Domains admin page (useful for stuck verifications); shield icon button appears on non-verified domains +- **Domain delete**: admins can permanently delete any domain from the Domains admin page +- **Team delete**: permanent team deletion with browser confirmation dialog from the team detail view's new Danger Zone section +- **Extra domain/member slots**: team settings form now exposes `extraDomainSlots` and `extraMemberSlots` fields so admins can grant bonus capacity without changing a team's plan +- **Complimentary plan assignment for all admins**: `adminAssignPlan` no longer requires `isEnvAdmin`; any admin can now assign plans complimentarily (no charge) or generate Stripe checkout links; plan assignment UI visible to all `isAdmin` users (previously only `isEnvAdmin`) +- **Dual plan assignment buttons**: teams page now shows both "Assign complimentary" (immediate, no charge) and "Checkout link" (Stripe) buttons; checkout link button disabled for FREE plan ### Changed -- **`updateTeamSettings`** — removed `isEnvAdmin` guard for plan changes; all admins can update team settings including plan; added `extraDomainSlots` and `extraMemberSlots` to the mutation input and DB update -- **`teamAdminSelection`** — now includes `isActive`, `extraDomainSlots`, and `extraMemberSlots` so the admin UI reflects the full team state -- **`authedProcedure`** — now performs a fresh database ban check on every call rather than relying solely on the JWT token +- **`updateTeamSettings`**: removed `isEnvAdmin` guard for plan changes; all admins can update team settings including plan; added `extraDomainSlots` and `extraMemberSlots` to the mutation input and DB update +- **`teamAdminSelection`**: now includes `isActive`, `extraDomainSlots`, and `extraMemberSlots` so the admin UI reflects the full team state +- **`authedProcedure`**: now performs a fresh database ban check on every call rather than relying solely on the JWT token ### Fixed -- **`UpgradeModal` type error** — added missing `CONTACTS`, `BOUNCE_RATE_EXCEEDED`, and `COMPLAINT_RATE_EXCEEDED` entries to the `Record` messages map +- **`UpgradeModal` type error**: added missing `CONTACTS`, `BOUNCE_RATE_EXCEEDED`, and `COMPLAINT_RATE_EXCEEDED` entries to the `Record` messages map --- @@ -160,25 +160,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added #### Authentication & Account Management -- **Backup email password-protected alternative login** — users can add password-protected backup emails to their account for login without email OTP; backup emails must be verified independently via 6-character code -- **Two-sided email verification** — changing primary email now requires verifying both old email access (confirm you can access current email) AND new email ownership (confirm you own the new email); sequential step-by-step verification with clear UI indicators -- **Recovery code bypass for email verification** — if user loses access to their primary email, they can use a recovery code to skip old email verification and proceed directly to new email verification -- **Backup email schema** — added `BackupEmail` model with email, passwordHash, emailVerified timestamp, and indexes for efficient login lookups -- **Credentials provider for NextAuth** — added Credentials provider configuration allowing backup email + password authentication through standard NextAuth flow +- **Backup email password-protected alternative login**: users can add password-protected backup emails to their account for login without email OTP; backup emails must be verified independently via 6-character code +- **Two-sided email verification**: changing primary email now requires verifying both old email access (confirm you can access current email) AND new email ownership (confirm you own the new email); sequential step-by-step verification with clear UI indicators +- **Recovery code bypass for email verification**: if user loses access to their primary email, they can use a recovery code to skip old email verification and proceed directly to new email verification +- **Backup email schema**: added `BackupEmail` model with email, passwordHash, emailVerified timestamp, and indexes for efficient login lookups +- **Credentials provider for NextAuth**: added Credentials provider configuration allowing backup email + password authentication through standard NextAuth flow #### UI/UX Improvements -- **Account settings page** — new `/settings/account` consolidating: +- **Account settings page**: new `/settings/account` consolidating: - Email address change with two-sided verification flow - Two-factor authentication setup/management - Recovery codes display and regeneration - Backup email management (add, verify, delete with guards) -- **Broadcasts compose page refactor** — completely redesigned broadcasts compose UI to match campaigns aesthetic: +- **Broadcasts compose page refactor**: completely redesigned broadcasts compose UI to match campaigns aesthetic: - Accordion-style settings strip (Subject visible, From/Reply-To/Recipients collapsible) - Full-width email canvas for better content editing - Variables strip showing available variables and recipient count - Cleaner, more professional layout with proper spacing -- **Login page backup email option** — toggleable backup email login form separate from primary auth methods; only appears when user opts in via "Have a backup email password?" link -- **2FA verification page styling** — professional card layout with gradient backgrounds, improved form labels (context-aware "Authenticator Code" vs "Recovery Code"), better help text and mobile responsiveness +- **Login page backup email option**: toggleable backup email login form separate from primary auth methods; only appears when user opts in via "Have a backup email password?" link +- **2FA verification page styling**: professional card layout with gradient backgrounds, improved form labels (context-aware "Authenticator Code" vs "Recovery Code"), better help text and mobile responsiveness #### Database Migrations - **Backup email schema** (`20260603195140_add_backup_emails_and_two_sided_verification`): @@ -187,23 +187,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Enhanced `PendingEmailChange` with codeOld (nullable), verifiedOld, verifiedNew flags for two-sided verification #### Security & Infrastructure -- **bcryptjs password hashing** — backup email passwords hashed with bcryptjs (salt rounds 10) on client-side before transmission -- **Edge Runtime 2FA utilities** — new `edge-2fa-utils.ts` using Web Crypto API for middleware HMAC validation (no Node.js crypto dependency) -- **2FA cookie validation** — 12-hour HMAC-signed httpOnly cookie for 2FA sessions with middleware validation for protected routes +- **bcryptjs password hashing**: backup email passwords hashed with bcryptjs (salt rounds 10) on client-side before transmission +- **Edge Runtime 2FA utilities**: new `edge-2fa-utils.ts` using Web Crypto API for middleware HMAC validation (no Node.js crypto dependency) +- **2FA cookie validation**: 12-hour HMAC-signed httpOnly cookie for 2FA sessions with middleware validation for protected routes ### Changed -- **Upgraded Next.js to latest** — updated to the latest stable version for improved performance, security, and feature support -- **NextAuth configuration** — added Credentials provider for backup email authentication alongside existing OAuth providers (GitHub, Google, Discord) and Email OTP -- **Login page provider filtering** — Credentials provider now explicitly excluded from OAuth buttons loop to prevent rendering as a regular provider button -- **Broadcasts vs Campaigns routing** — campaign cards now differentiate routing based on intent; broadcasts route to `/broadcasts/[id]` while campaigns route to `/campaigns/[id]` -- **Settings navigation restructuring** — reorganized settings tabs with top-level Account and Team sections -- **Email change mutations** — `requestEmailChange` now sends both old and new verification codes in parallel; introduces verifiedOld/verifiedNew state tracking -- **Mailer service** — added optional `subject` parameter to `sendEmailChangeVerificationEmail()` for flexibility in notification messages -- **Form validation consistency** — all form validators aligned with mutation input types for seamless error handling +- **Upgraded Next.js to latest**: updated to the latest stable version for improved performance, security, and feature support +- **NextAuth configuration**: added Credentials provider for backup email authentication alongside existing OAuth providers (GitHub, Google, Discord) and Email OTP +- **Login page provider filtering**: Credentials provider now explicitly excluded from OAuth buttons loop to prevent rendering as a regular provider button +- **Broadcasts vs Campaigns routing**: campaign cards now differentiate routing based on intent; broadcasts route to `/broadcasts/[id]` while campaigns route to `/campaigns/[id]` +- **Settings navigation restructuring**: reorganized settings tabs with top-level Account and Team sections +- **Email change mutations**: `requestEmailChange` now sends both old and new verification codes in parallel; introduces verifiedOld/verifiedNew state tracking +- **Mailer service**: added optional `subject` parameter to `sendEmailChangeVerificationEmail()` for flexibility in notification messages +- **Form validation consistency**: all form validators aligned with mutation input types for seamless error handling ### Fixed -- **Credentials provider filtering** — removed Credentials provider from OAuth buttons array to prevent it from rendering as a sign-in option button -- **Build and deployment** — resolved AWS SDK package corruption from earlier disk space issues with clean reinstall +- **Credentials provider filtering**: removed Credentials provider from OAuth buttons array to prevent it from rendering as a sign-in option button +- **Build and deployment**: resolved AWS SDK package corruption from earlier disk space issues with clean reinstall --- @@ -212,25 +212,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added #### Account Security & Management -- **Email address change with verification** — users can now change their account email via a re-verification flow: request new email → verification code sent → confirm with 6-character code (15-min expiry) → email updated and verified -- **Account-level two-factor authentication (2FA)** — TOTP-based 2FA using authenticator apps; includes: +- **Email address change with verification**: users can now change their account email via a re-verification flow: request new email → verification code sent → confirm with 6-character code (15-min expiry) → email updated and verified +- **Account-level two-factor authentication (2FA)**: TOTP-based 2FA using authenticator apps; includes: - Setup wizard with QR code and manual secret fallback - Recovery codes (10 × 10-character hex codes per setup) for account recovery if authenticator is lost - Timing-safe verification with SHA-256 hashing for recovery codes - Single-use recovery code tracking (mark used, count remaining) - Regenerate recovery codes option (requires current TOTP verification) -- **Server-enforced 2FA** — 2FA verification enforced at the middleware level via HMAC-signed httpOnly cookies (12-hour expiry); users with 2FA enabled are redirected to `/auth/2fa-verify` if cookie is missing/invalid -- **OAuth account linking safety** — users with OAuth-linked accounts (GitHub, Google, Discord) cannot change email to prevent account takeover via dangerous email account linking +- **Server-enforced 2FA**: 2FA verification enforced at the middleware level via HMAC-signed httpOnly cookies (12-hour expiry); users with 2FA enabled are redirected to `/auth/2fa-verify` if cookie is missing/invalid +- **OAuth account linking safety**: users with OAuth-linked accounts (GitHub, Google, Discord) cannot change email to prevent account takeover via dangerous email account linking #### Broadcasts -- **Direct broadcast recipient support** — campaigns with `intent: "BROADCAST"` can now accept direct recipient email lists via `recipientEmails` field; recipients need not be in a contact book -- **Broadcast batch processing** — `CampaignBatchService.worker` now handles direct broadcasts by: +- **Direct broadcast recipient support**: campaigns with `intent: "BROADCAST"` can now accept direct recipient email lists via `recipientEmails` field; recipients need not be in a contact book +- **Broadcast batch processing**: `CampaignBatchService.worker` now handles direct broadcasts by: - Iterating recipient email list - Checking suppression/bounce status - Creating Email and CampaignEmail records - Queuing via EmailQueueService (no contact book required) - Deduplicating via CampaignEmail lookup -- **Dedicated broadcast compose UI** — new `/broadcasts/[broadcastId]/compose` page with: +- **Dedicated broadcast compose UI**: new `/broadcasts/[broadcastId]/compose` page with: - Toggle between contact book and direct recipient modes - Direct recipient textarea with email parsing and validation - Simplified UX (no campaign automation, direct send or schedule) @@ -238,37 +238,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Send now vs. schedule workflows #### Settings Reorganization -- **Account section** — new `/settings/account` page consolidating: +- **Account section**: new `/settings/account` page consolidating: - Email address change (with OAuth provider notice for linked accounts) - Two-factor authentication setup/disable - Recovery codes management (display and regenerate) -- **Team section** — renamed from "General"; `/settings/team` now contains: +- **Team section**: renamed from "General"; `/settings/team` now contains: - Team image upload/management - Team name editing - Danger zone (delete team) #### Infrastructure & Build -- **Docker manifest publishing robustness** — `create_and_publish_manifest` job now waits for platform-specific images (amd64, arm64) to be available before creating multi-platform manifests; prevents "image not found" errors on manifest creation -- **Edge Runtime compatible 2FA utilities** — new `edge-2fa-utils.ts` using Web Crypto API (no Node.js crypto) for middleware HMAC validation in Edge Runtime -- **Dynamic rendering for search params** — `/auth/2fa-verify` uses `Suspense` boundary pattern for safe `useSearchParams()` usage in Next.js 15 +- **Docker manifest publishing robustness**: `create_and_publish_manifest` job now waits for platform-specific images (amd64, arm64) to be available before creating multi-platform manifests; prevents "image not found" errors on manifest creation +- **Edge Runtime compatible 2FA utilities**: new `edge-2fa-utils.ts` using Web Crypto API (no Node.js crypto) for middleware HMAC validation in Edge Runtime +- **Dynamic rendering for search params**: `/auth/2fa-verify` uses `Suspense` boundary pattern for safe `useSearchParams()` usage in Next.js 15 ### Changed #### User Router -- **Profile query enrichment** — `user.getProfile` now includes linked OAuth accounts (`type`, `provider`) to allow UI checks for password/email change eligibility -- **Email change mutations** — `requestEmailChange` validates OAuth account presence and blocks email changes for OAuth-linked users +- **Profile query enrichment**: `user.getProfile` now includes linked OAuth accounts (`type`, `provider`) to allow UI checks for password/email change eligibility +- **Email change mutations**: `requestEmailChange` validates OAuth account presence and blocks email changes for OAuth-linked users #### Campaign Router -- **Campaign update accepts recipient emails** — `updateCampaign` mutation now accepts optional `recipientEmails: string[]` input for direct broadcast editing +- **Campaign update accepts recipient emails**: `updateCampaign` mutation now accepts optional `recipientEmails: string[]` input for direct broadcast editing #### Broadcast UI Navigation -- **Campaign card routing logic** — `CampaignCard` now differentiates broadcast vs. campaign routing: +- **Campaign card routing logic**: `CampaignCard` now differentiates broadcast vs. campaign routing: - Broadcasts: `/broadcasts/[id]/compose` (DRAFT/SCHEDULED) or `/broadcasts/[id]` (SENT/RUNNING) - Campaigns: `/campaigns/[id]/edit` (DRAFT/SCHEDULED) or `/campaigns/[id]` (SENT/RUNNING) -- **Broadcasts landing page** — `/broadcasts` now uses `CreateBroadcast` dialog (separate from `CreateCampaign`) +- **Broadcasts landing page**: `/broadcasts` now uses `CreateBroadcast` dialog (separate from `CreateCampaign`) #### Settings Navigation -- **Settings layout tabs** — updated nav buttons: +- **Settings layout tabs**: updated nav buttons: - Changed "General" → "Team" - Added "Account" tab - Root `/settings` redirects to `/settings/team` @@ -276,11 +276,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed #### Build & Runtime -- **Next.js 15 prerender error for dynamic routes** — `/auth/2fa-verify` now uses server component + Suspense boundary to avoid prerender failure when using `useSearchParams()` -- **Edge Runtime crypto import errors** — middleware no longer imports Node.js `crypto` module; uses Web Crypto API for HMAC validation instead +- **Next.js 15 prerender error for dynamic routes**: `/auth/2fa-verify` now uses server component + Suspense boundary to avoid prerender failure when using `useSearchParams()` +- **Edge Runtime crypto import errors**: middleware no longer imports Node.js `crypto` module; uses Web Crypto API for HMAC validation instead #### Docker CI/CD -- **Manifest creation timing issue** — workflow no longer fails immediately when platform images haven't finished pushing; `wait_for_remote_image()` now called for both amd64 and arm64 images before manifest creation (18 retry attempts, 10-second intervals = 180-second timeout) +- **Manifest creation timing issue**: workflow no longer fails immediately when platform images haven't finished pushing; `wait_for_remote_image()` now called for both amd64 and arm64 images before manifest creation (18 retry attempts, 10-second intervals = 180-second timeout) ### Database @@ -299,80 +299,80 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added #### Marketing Components -- **Modular homepage architecture** — split the landing page into reusable section components (`Hero`, `TrustStrip`, `Features`, `Comparison`, `PricingSection`, `CallToAction`, `DevSection`) for clearer ownership and easier iteration -- **Single pricing calculator flow** — promoted the calculator-led pricing experience and removed older card-based pricing composition in favor of a unified pricing section +- **Modular homepage architecture**: split the landing page into reusable section components (`Hero`, `TrustStrip`, `Features`, `Comparison`, `PricingSection`, `CallToAction`, `DevSection`) for clearer ownership and easier iteration +- **Single pricing calculator flow**: promoted the calculator-led pricing experience and removed older card-based pricing composition in favor of a unified pricing section -#### Dashboard — Broadcasts -- **Broadcasts section** — introduced a dedicated `/broadcasts` route and page hierarchy (`/broadcasts`, `/broadcasts/[broadcastId]`, `/broadcasts/[broadcastId]/edit`) for one-off email blasts, separating them from the Campaigns flow which is now focused on recurring/automated sequences +#### Dashboard: Broadcasts +- **Broadcasts section**: introduced a dedicated `/broadcasts` route and page hierarchy (`/broadcasts`, `/broadcasts/[broadcastId]`, `/broadcasts/[broadcastId]/edit`) for one-off email blasts, separating them from the Campaigns flow which is now focused on recurring/automated sequences -#### Dashboard — Logs -- **Unified logs dashboard** — added a first-class `/logs` dashboard page that merges email events, webhook calls, and notification delivery logs into one searchable audit trail with source and status filtering +#### Dashboard: Logs +- **Unified logs dashboard**: added a first-class `/logs` dashboard page that merges email events, webhook calls, and notification delivery logs into one searchable audit trail with source and status filtering #### Dashboard Settings -- **Settings API Keys page** — added first-class `/settings/api-keys` route -- **Settings SMTP page** — added first-class `/settings/smtp` route +- **Settings API Keys page**: added first-class `/settings/api-keys` route +- **Settings SMTP page**: added first-class `/settings/smtp` route -#### Billing — Custom Plan Contracts -- **Slider-based plan selector** — `BillingPlanSelector` component replaces static plan cards at `/settings/billing` with interactive marketing and transactional email limit sliders (1,000 – 3,000,000 each); calculated contract total updates in real time as limits are adjusted -- **Custom Stripe checkout sessions** — `createCustomCheckoutSession` tRPC mutation creates a Stripe session with `price_data` (unit_amount = exact contract price in CAD) rather than a fixed price ID, locking teams into the exact limit/price combination they selected -- **Custom plan query** — `getCustomPlanContract` tRPC query lets the billing page and `PlanDetails` component surface the active custom contract (limits + monthly price) for teams already on a custom plan -- **Custom plan DB fields** — added four optional fields to the `Team` model (`customPlanEnabled`, `customMarketingEmailLimit`, `customTransactionalEmailLimit`, `customMonthlyPriceCents`); populated at checkout completion via the Stripe webhook +#### Billing: Custom Plan Contracts +- **Slider-based plan selector**: `BillingPlanSelector` component replaces static plan cards at `/settings/billing` with interactive marketing and transactional email limit sliders (1,000 – 3,000,000 each); calculated contract total updates in real time as limits are adjusted +- **Custom Stripe checkout sessions**: `createCustomCheckoutSession` tRPC mutation creates a Stripe session with `price_data` (unit_amount = exact contract price in CAD) rather than a fixed price ID, locking teams into the exact limit/price combination they selected +- **Custom plan query**: `getCustomPlanContract` tRPC query lets the billing page and `PlanDetails` component surface the active custom contract (limits + monthly price) for teams already on a custom plan +- **Custom plan DB fields**: added four optional fields to the `Team` model (`customPlanEnabled`, `customMarketingEmailLimit`, `customTransactionalEmailLimit`, `customMonthlyPriceCents`); populated at checkout completion via the Stripe webhook #### Campaigns -- **Campaign intent field** — campaigns now store an `intent` column (migration `20260510120000_add_campaign_intent`) to distinguish campaign purpose at creation time; `create-campaign` dialog captures intent upfront +- **Campaign intent field**: campaigns now store an `intent` column (migration `20260510120000_add_campaign_intent`) to distinguish campaign purpose at creation time; `create-campaign` dialog captures intent upfront #### SDKs -- **Go SDK initial package** — introduced `packages/go-sdk` with typed client surfaces for emails, contacts, contact books, campaigns, domains, and analytics +- **Go SDK initial package**: introduced `packages/go-sdk` with typed client surfaces for emails, contacts, contact books, campaigns, domains, and analytics #### Documentation -- **SMTP auth API reference page** — added `apps/docs/api-reference/smtp/auth.mdx` -- **Self-hosting Docker doc relocation** — promoted Docker setup docs to `apps/docs/self-hosting/docker.mdx` and aligned navigation +- **SMTP auth API reference page**: added `apps/docs/api-reference/smtp/auth.mdx` +- **Self-hosting Docker doc relocation**: promoted Docker setup docs to `apps/docs/self-hosting/docker.mdx` and aligned navigation #### CI / Review Automation -- **CodeRabbit support** — added `.github/workflows/coderabbit.yml` and root `.coderabbit.yaml` to enable automated PR review summaries and inline feedback on pull requests +- **CodeRabbit support**: added `.github/workflows/coderabbit.yml` and root `.coderabbit.yaml` to enable automated PR review summaries and inline feedback on pull requests ### Changed #### Marketing Site -- **Homepage composition refresh** — replaced older section files (`FeatureCard*`, `PricingTiers`, `CodeExample`) with the new component set and updated page assembly -- **Icon system modernization** — replaced hand-authored inline SVG usage in key marketing and app screens with icon components for consistency and maintainability -- **Developer section improvements** — expanded dev-focused section behavior and language-toggle handling in `CodeLangToggle` and `DevSection` +- **Homepage composition refresh**: replaced older section files (`FeatureCard*`, `PricingTiers`, `CodeExample`) with the new component set and updated page assembly +- **Icon system modernization**: replaced hand-authored inline SVG usage in key marketing and app screens with icon components for consistency and maintainability +- **Developer section improvements**: expanded dev-focused section behavior and language-toggle handling in `CodeLangToggle` and `DevSection` #### Settings UX & Navigation -- **Developer settings consolidation** — aligned developer tooling pages with the canonical Settings area while preserving compatibility flows from legacy dev-settings routes +- **Developer settings consolidation**: aligned developer tooling pages with the canonical Settings area while preserving compatibility flows from legacy dev-settings routes #### Plans, Billing & Limits -- **Pricing/plan constant updates** — refreshed shared Stripe plan/product definitions and app-side plan/payment constants to keep UI, checkout, and limits in sync -- **Billing page rebuilt around custom plan selector** — `/settings/billing` now surfaces the slider-based `BillingPlanSelector` as the primary upgrade path; `PlanDetails` shows active custom contract details (limits and monthly price) when a custom plan is active -- **Custom plan limit enforcement** — `LimitService` now reads `customMarketingEmailLimit` and `customTransactionalEmailLimit` from the `Team` record and enforces per-type monthly caps for custom plan teams, bypassing the standard plan-tier daily limits; the daily usage job skips metered overage billing for custom plan teams to avoid double-charging -- **Admin plan assignment clears custom contract** — `adminAssignPlan` with `method: "complimentary"` now explicitly clears all custom plan fields (`customPlanEnabled`, all limit columns) so stale slider contracts do not persist after a manual admin override -- **Free-plan marketing access switched to limit-based enforcement** — Contacts, Broadcasts, and Campaigns are no longer hard-locked in the dashboard for Free teams; access is now controlled by enforceable plan limits (including campaign count and monthly sending caps) -- **Free plan marketing baseline updated** — FREE plan now includes limited marketing capability (`marketingEmailsIncluded: true`) with a capped campaign allowance (`campaignsLimit: 3`) instead of full marketing exclusion -- **Stripe seed updates** — adjusted `stripe-seed.ts` for current product/price setup behavior +- **Pricing/plan constant updates**: refreshed shared Stripe plan/product definitions and app-side plan/payment constants to keep UI, checkout, and limits in sync +- **Billing page rebuilt around custom plan selector**: `/settings/billing` now surfaces the slider-based `BillingPlanSelector` as the primary upgrade path; `PlanDetails` shows active custom contract details (limits and monthly price) when a custom plan is active +- **Custom plan limit enforcement**: `LimitService` now reads `customMarketingEmailLimit` and `customTransactionalEmailLimit` from the `Team` record and enforces per-type monthly caps for custom plan teams, bypassing the standard plan-tier daily limits; the daily usage job skips metered overage billing for custom plan teams to avoid double-charging +- **Admin plan assignment clears custom contract**: `adminAssignPlan` with `method: "complimentary"` now explicitly clears all custom plan fields (`customPlanEnabled`, all limit columns) so stale slider contracts do not persist after a manual admin override +- **Free-plan marketing access switched to limit-based enforcement**: Contacts, Broadcasts, and Campaigns are no longer hard-locked in the dashboard for Free teams; access is now controlled by enforceable plan limits (including campaign count and monthly sending caps) +- **Free plan marketing baseline updated**: FREE plan now includes limited marketing capability (`marketingEmailsIncluded: true`) with a capped campaign allowance (`campaignsLimit: 3`) instead of full marketing exclusion +- **Stripe seed updates**: adjusted `stripe-seed.ts` for current product/price setup behavior #### Analytics -- **Analytics detail expansion** — dashboard analytics now includes additional breakdown cards (delivery rate, bounce rate, complaint rate, and total volume) for clearer at-a-glance performance tracking -- **Paid-only advanced analytics insights** — added a paid-tier insights section for open rate, click rate, click-to-open rate, and average daily volume with an upgrade CTA for free teams +- **Analytics detail expansion**: dashboard analytics now includes additional breakdown cards (delivery rate, bounce rate, complaint rate, and total volume) for clearer at-a-glance performance tracking +- **Paid-only advanced analytics insights**: added a paid-tier insights section for open rate, click rate, click-to-open rate, and average daily volume with an upgrade CTA for free teams #### Usage Breakdown -- **Full usage limit breakdown** — the `/settings/usage` page now shows a complete limit audit for all tracked resources, including monthly and daily email usage, marketing vs transactional email usage, domains, contact books, contacts, campaigns, team members, and webhooks, so teams can see both current usage and allowed limits in one place +- **Full usage limit breakdown**: the `/settings/usage` page now shows a complete limit audit for all tracked resources, including monthly and daily email usage, marketing vs transactional email usage, domains, contact books, contacts, campaigns, team members, and webhooks, so teams can see both current usage and allowed limits in one place #### Documentation & API Spec -- **OpenAPI refresh** — regenerated and updated API reference spec and intro content -- **Docs navigation/content refresh** — updated docs navigation and onboarding pages (including Go and self-hosting paths) to match current product structure +- **OpenAPI refresh**: regenerated and updated API reference spec and intro content +- **Docs navigation/content refresh**: updated docs navigation and onboarding pages (including Go and self-hosting paths) to match current product structure ### Fixed #### Dashboard & Routing -- **Settings route reliability** — removed dead-end developer settings destinations by wiring pages into canonical Settings routes and maintaining redirect compatibility +- **Settings route reliability**: removed dead-end developer settings destinations by wiring pages into canonical Settings routes and maintaining redirect compatibility #### Billing & Limits -- **Admin bypass email normalization** — `LimitService.isAdminOrFounderTeam` now normalises the environment admin email with `trim()` + `toLowerCase()` and uses a case-insensitive Prisma query, preventing mismatches caused by casing differences in env config -- **Custom plan Stripe webhook sync** — `syncStripeData` now reads `customPlanEnabled`, `customMarketingEmailLimit`, `customTransactionalEmailLimit`, and `customMonthlyPriceCents` from subscription metadata and persists them back to the `Team` record so contract limits survive server restarts and are always in sync with Stripe +- **Admin bypass email normalization**: `LimitService.isAdminOrFounderTeam` now normalises the environment admin email with `trim()` + `toLowerCase()` and uses a case-insensitive Prisma query, preventing mismatches caused by casing differences in env config +- **Custom plan Stripe webhook sync**: `syncStripeData` now reads `customPlanEnabled`, `customMarketingEmailLimit`, `customTransactionalEmailLimit`, and `customMonthlyPriceCents` from subscription metadata and persists them back to the `Team` record so contract limits survive server restarts and are always in sync with Stripe #### Visual Consistency -- **Cross-page icon sizing/alignment** — normalized icon rendering across footer, auth, error, not-found, and dashboard surfaces after component migration -- **UpgradeModal scroll** — fixed scroll behavior in the upgrade and notification modals so long plan/feature lists are fully accessible without clipping +- **Cross-page icon sizing/alignment**: normalized icon rendering across footer, auth, error, not-found, and dashboard surfaces after component migration +- **UpgradeModal scroll**: fixed scroll behavior in the upgrade and notification modals so long plan/feature lists are fully accessible without clipping --- @@ -381,120 +381,120 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added #### Authentication -- **GitHub OAuth support** — added GitHub as a sign-in provider alongside Discord (`GITHUB_ID` / `GITHUB_SECRET`), enabling GitHub auth for cloud and self-hosted deployments +- **GitHub OAuth support**: added GitHub as a sign-in provider alongside Discord (`GITHUB_ID` / `GITHUB_SECRET`), enabling GitHub auth for cloud and self-hosted deployments #### Notification Providers -- **Multi-provider notifications** — teams can now configure external alerting providers for operational events (email, campaign, domain, and error notifications) -- **Supported providers** — Discord, Slack, Microsoft Teams, Telegram, and Custom Webhook are now supported with provider-specific configuration -- **Notification provider schema** — added `NotificationProvider` model to store provider type, config, status, and team linkage -- **Notification log schema** — added `NotificationLog` model to store per-dispatch delivery outcomes and failure details -- **Notification provider API** — added `notificationProvider` tRPC router with `list`, `getById`, `create`, `update`, `delete`, `test`, `getLogs`, and `getStats` -- **Notification dispatcher services** — added provider dispatch and event emission services (`notification-provider-service.ts` and `notification-emitter.ts`) -- **Notifications settings page** — added `/settings/notifications` UI for provider management, testing, logs, and usage guidance -- **Notification integration reference** — added `.references/notification-integration.md` +- **Multi-provider notifications**: teams can now configure external alerting providers for operational events (email, campaign, domain, and error notifications) +- **Supported providers**: Discord, Slack, Microsoft Teams, Telegram, and Custom Webhook are now supported with provider-specific configuration +- **Notification provider schema**: added `NotificationProvider` model to store provider type, config, status, and team linkage +- **Notification log schema**: added `NotificationLog` model to store per-dispatch delivery outcomes and failure details +- **Notification provider API**: added `notificationProvider` tRPC router with `list`, `getById`, `create`, `update`, `delete`, `test`, `getLogs`, and `getStats` +- **Notification dispatcher services**: added provider dispatch and event emission services (`notification-provider-service.ts` and `notification-emitter.ts`) +- **Notifications settings page**: added `/settings/notifications` UI for provider management, testing, logs, and usage guidance +- **Notification integration reference**: added `.references/notification-integration.md` #### Admin / Billing Operations -- **Admin plan assignment flow** — added `adminAssignPlan` to let cloud admins assign plans to teams either as complimentary grants or Stripe checkout-link driven assignments -- **Admin team billing controls** — admin team settings now supports `dailyEmailLimit = -1` for unlimited daily sending +- **Admin plan assignment flow**: added `adminAssignPlan` to let cloud admins assign plans to teams either as complimentary grants or Stripe checkout-link driven assignments +- **Admin team billing controls**: admin team settings now supports `dailyEmailLimit = -1` for unlimited daily sending #### Billing / Plan Source-of-Truth -- **Perks derived from shared plan constants** — `apps/web/src/lib/constants/payments.ts` now generates plan perks from `@bytesend/lib` PLANS rather than static duplicated data -- **Billing plan cards from shared plans** — `/settings/billing` plan options now derive from the shared PLANS map to avoid UI/config drift +- **Perks derived from shared plan constants**: `apps/web/src/lib/constants/payments.ts` now generates plan perks from `@bytesend/lib` PLANS rather than static duplicated data +- **Billing plan cards from shared plans**: `/settings/billing` plan options now derive from the shared PLANS map to avoid UI/config drift #### CI / Automation -- **Issue summary workflow** — added `.github/workflows/issue-summary.yml` to automatically summarize newly opened issues -- **Stale cleanup workflow** — added `.github/workflows/stale-cleanup.yml` to clean up inactive issues and pull requests -- **CodeQL workflow** — introduced `.github/workflows/codeql.yml` and enabled `develop` branch triggers -- **JavaScript SDK release workflow** — added `.github/workflows/npm-release.yml` to build and publish the `bytesend-js` package from `packages/sdk` changes on `main` (plus manual dispatch) -- **Python SDK release workflow** — added `.github/workflows/pypi-release.yml` to build and publish the `bytesend-python` package from `packages/python-sdk` on pushes to `main` and manual dispatch +- **Issue summary workflow**: added `.github/workflows/issue-summary.yml` to automatically summarize newly opened issues +- **Stale cleanup workflow**: added `.github/workflows/stale-cleanup.yml` to clean up inactive issues and pull requests +- **CodeQL workflow**: introduced `.github/workflows/codeql.yml` and enabled `develop` branch triggers +- **JavaScript SDK release workflow**: added `.github/workflows/npm-release.yml` to build and publish the `bytesend-js` package from `packages/sdk` changes on `main` (plus manual dispatch) +- **Python SDK release workflow**: added `.github/workflows/pypi-release.yml` to build and publish the `bytesend-python` package from `packages/python-sdk` on pushes to `main` and manual dispatch #### Community / Governance -- **Repository security policy** — added `.github/SECURITY.md` with supported versions, private reporting process, and response expectations -- **Code of Conduct** — added `.github/CODE_OF_CONDUCT.md` (Contributor Covenant v2.1) -- **Contributing guide** — added `.github/CONTRIBUTING.md` with development workflow, PR expectations, and testing checklist -- **Support guide** — added `.github/SUPPORT.md` with support channels and security-report routing +- **Repository security policy**: added `.github/SECURITY.md` with supported versions, private reporting process, and response expectations +- **Code of Conduct**: added `.github/CODE_OF_CONDUCT.md` (Contributor Covenant v2.1) +- **Contributing guide**: added `.github/CONTRIBUTING.md` with development workflow, PR expectations, and testing checklist +- **Support guide**: added `.github/SUPPORT.md` with support channels and security-report routing #### GitHub Templates -- **PR template** — added `.github/PULL_REQUEST_TEMPLATE.md` to standardize change summaries, testing notes, and release-impact checks -- **Issue template config** — added `.github/ISSUE_TEMPLATE/config.yml` with contact links and blank-issue controls -- **New issue forms** — added `.github/ISSUE_TEMPLATE/feature.yml` and `.github/ISSUE_TEMPLATE/docs.yml` +- **PR template**: added `.github/PULL_REQUEST_TEMPLATE.md` to standardize change summaries, testing notes, and release-impact checks +- **Issue template config**: added `.github/ISSUE_TEMPLATE/config.yml` with contact links and blank-issue controls +- **New issue forms**: added `.github/ISSUE_TEMPLATE/feature.yml` and `.github/ISSUE_TEMPLATE/docs.yml` ### Changed #### Plans & Pricing -- **BASIC plan updated** — aligned plan limits/pricing model by setting BASIC to CA$20/mo with 100,000 monthly emails, 30 members, and 12 domains -- **LIFETIME plan updated** — aligned lifetime limits to current plan progression at CA$199 one-time with 500,000 monthly emails, 100 members, and 30 domains +- **BASIC plan updated**: aligned plan limits/pricing model by setting BASIC to CA$20/mo with 100,000 monthly emails, 30 members, and 12 domains +- **LIFETIME plan updated**: aligned lifetime limits to current plan progression at CA$199 one-time with 500,000 monthly emails, 100 members, and 30 domains #### Settings UX -- **Settings navigation restructured** — removed Team inner General/Members subtabs and promoted them to top-level Settings navigation -- **General tab behavior** — `/settings` now serves as the General overview (team profile and core team settings) -- **Members tab split-out** — members management moved to dedicated `/settings/members` tab alongside billing/usage-related settings -- **Usage resource breakdowns** — usage view now includes explicit domain, webhook, and member usage breakdowns with limit context +- **Settings navigation restructured**: removed Team inner General/Members subtabs and promoted them to top-level Settings navigation +- **General tab behavior**: `/settings` now serves as the General overview (team profile and core team settings) +- **Members tab split-out**: members management moved to dedicated `/settings/members` tab alongside billing/usage-related settings +- **Usage resource breakdowns**: usage view now includes explicit domain, webhook, and member usage breakdowns with limit context #### SMTP Server -- **SMTP server vendored into monorepo** — `apps/smtp-server` is now tracked directly in this repository (no gitlink/submodule-style entry), simplifying versioning and release consistency -- **Authentication compatibility fallback** — SMTP auth now supports the API-driven custom team username flow while retaining a legacy fallback username candidate for older client configurations +- **SMTP server vendored into monorepo**: `apps/smtp-server` is now tracked directly in this repository (no gitlink/submodule-style entry), simplifying versioning and release consistency +- **Authentication compatibility fallback**: SMTP auth now supports the API-driven custom team username flow while retaining a legacy fallback username candidate for older client configurations #### Documentation -- **SMTP docs refreshed for monorepo paths** — clone/build/deployment documentation now references `NodeByteLTD/ByteSend` and `apps/smtp-server` paths throughout -- **SMTP quickstart clarified** — get-started docs now direct users to use their configured SMTP username (default `bytesend`) rather than implying only a fixed username -- **Core docs/readme refresh** — updated main README and docs navigation/content pages for current monorepo structure and self-hosting guidance (`apps/docs/README.md`, `apps/docs/docs.json`, local/docker/self-hosting guide pages) -- **Feature docs expansion** — added new guides for GitHub OAuth, API authentication, plans/pricing, plan management, admin operations, and notification providers (`apps/docs/guides/*`) -- **Mintlify branding refresh** — updated `apps/docs/docs.json` theme colors/navigation and expanded `apps/docs/introduction.mdx` to surface new billing, alerting, and auth capabilities +- **SMTP docs refreshed for monorepo paths**: clone/build/deployment documentation now references `NodeByteLTD/ByteSend` and `apps/smtp-server` paths throughout +- **SMTP quickstart clarified**: get-started docs now direct users to use their configured SMTP username (default `bytesend`) rather than implying only a fixed username +- **Core docs/readme refresh**: updated main README and docs navigation/content pages for current monorepo structure and self-hosting guidance (`apps/docs/README.md`, `apps/docs/docs.json`, local/docker/self-hosting guide pages) +- **Feature docs expansion**: added new guides for GitHub OAuth, API authentication, plans/pricing, plan management, admin operations, and notification providers (`apps/docs/guides/*`) +- **Mintlify branding refresh**: updated `apps/docs/docs.json` theme colors/navigation and expanded `apps/docs/introduction.mdx` to surface new billing, alerting, and auth capabilities #### References -- **Internal references expanded** — added `.references/README.md`, `smtp-auth-and-operations.md`, `release-playbook.md`, and `repository-governance.md` -- **Webhook reference improvements** — expanded `.references/webhook-architecture.md` with operations checklist, common failure modes, and change-safety notes +- **Internal references expanded**: added `.references/README.md`, `smtp-auth-and-operations.md`, `release-playbook.md`, and `repository-governance.md` +- **Webhook reference improvements**: expanded `.references/webhook-architecture.md` with operations checklist, common failure modes, and change-safety notes #### GitHub Templates -- **Issue form upgrades** — revamped bug/marketing/SMTP templates with clearer triage metadata, reproducibility fields, and validation checkboxes +- **Issue form upgrades**: revamped bug/marketing/SMTP templates with clearer triage metadata, reproducibility fields, and validation checkboxes #### Workflows -- **PR labeling workflow rename** — renamed the workflow file to `label-prs.yml` -- **Label action token update** — updated token reference in `.github/workflows/label.yml` -- **Website test workflow tuning** — adjusted website test workflow behavior -- **Docker publish workflow update** — updated `.github/workflows/docker-publish.yml` -- **Docker manifest recreation safety** — docker publish now removes existing manifests before create, preventing rerun failures on previously published tags -- **Docker remote tag cleanup** — docker publish now removes pre-existing remote tags/manifests with `docker buildx imagetools rm` before publishing platform images/manifests, avoiding `is a manifest list` rerun failures -- **Website tests pnpm version alignment** — removed hardcoded pnpm version from `.github/workflows/website-test.yml` so CI uses the repository `packageManager` version (`pnpm@9.0.0`) -- **Docker publish tag strategy hardening** — `.github/workflows/docker-publish.yml` now publishes ref-aware tags (`latest`, `develop`, version tag, and commit SHA) with matching multi-arch manifests -- **Manual Docker publish branch support** — wired `workflow_dispatch` branch input into checkout and tag resolution so manual runs build/publish the selected branch -- **Labeler rules refresh** — updated `.github/labeler.yml` to align automated PR labeling with the current repository structure -- **Actions runtime forward-compatibility** — added `FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true` across workflows to avoid Node 20 JavaScript action deprecation breakage +- **PR labeling workflow rename**: renamed the workflow file to `label-prs.yml` +- **Label action token update**: updated token reference in `.github/workflows/label.yml` +- **Website test workflow tuning**: adjusted website test workflow behavior +- **Docker publish workflow update**: updated `.github/workflows/docker-publish.yml` +- **Docker manifest recreation safety**: docker publish now removes existing manifests before create, preventing rerun failures on previously published tags +- **Docker remote tag cleanup**: docker publish now removes pre-existing remote tags/manifests with `docker buildx imagetools rm` before publishing platform images/manifests, avoiding `is a manifest list` rerun failures +- **Website tests pnpm version alignment**: removed hardcoded pnpm version from `.github/workflows/website-test.yml` so CI uses the repository `packageManager` version (`pnpm@9.0.0`) +- **Docker publish tag strategy hardening**: `.github/workflows/docker-publish.yml` now publishes ref-aware tags (`latest`, `develop`, version tag, and commit SHA) with matching multi-arch manifests +- **Manual Docker publish branch support**: wired `workflow_dispatch` branch input into checkout and tag resolution so manual runs build/publish the selected branch +- **Labeler rules refresh**: updated `.github/labeler.yml` to align automated PR labeling with the current repository structure +- **Actions runtime forward-compatibility**: added `FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true` across workflows to avoid Node 20 JavaScript action deprecation breakage ### Fixed #### Suppressions -- **Suppression removal reliability** — improved suppression deletion flow to handle non-canonical casing/inputs more robustly in dashboard and backend paths +- **Suppression removal reliability**: improved suppression deletion flow to handle non-canonical casing/inputs more robustly in dashboard and backend paths #### Limits / Usage -- **Usage limit consistency** — fixed plan usage limit handling to align dashboard/service behavior with shared plan constants +- **Usage limit consistency**: fixed plan usage limit handling to align dashboard/service behavior with shared plan constants #### Marketing Site -- **Contact CTA destination** — changed the marketing contact link from email to Discord +- **Contact CTA destination**: changed the marketing contact link from email to Discord #### CI / Tests -- **Domain-service unit test import stability** — `apps/web/src/server/service/domain-service.ts` now initializes DNS resolvers with runtime-safe fallbacks (promises API or callback API), preventing `ERR_INVALID_ARG_TYPE` when DNS methods are partially mocked in tests -- **Usage unit test expectation alignment** — `apps/web/src/lib/usage.unit.test.ts` now derives expected costs from exported usage constants instead of stale hardcoded values -- **Workspace SDK resolution in Vitest** — `apps/web/vitest.config.ts` now aliases `bytesend-js` to `packages/sdk/index.ts` during tests so unit suites do not depend on prebuilt SDK `dist` artifacts -- **Contact-service unit test isolation** — `apps/web/src/server/service/contact-service.unit.test.ts` now mocks `LimitService.checkContactsLimit` to avoid transitive `TeamService` cache dependencies and prevent brittle failures -- **Campaign security test alignment** — `apps/web/src/server/api/routers/campaign-security.trpc.test.ts` updated for current plan access expectations +- **Domain-service unit test import stability**: `apps/web/src/server/service/domain-service.ts` now initializes DNS resolvers with runtime-safe fallbacks (promises API or callback API), preventing `ERR_INVALID_ARG_TYPE` when DNS methods are partially mocked in tests +- **Usage unit test expectation alignment**: `apps/web/src/lib/usage.unit.test.ts` now derives expected costs from exported usage constants instead of stale hardcoded values +- **Workspace SDK resolution in Vitest**: `apps/web/vitest.config.ts` now aliases `bytesend-js` to `packages/sdk/index.ts` during tests so unit suites do not depend on prebuilt SDK `dist` artifacts +- **Contact-service unit test isolation**: `apps/web/src/server/service/contact-service.unit.test.ts` now mocks `LimitService.checkContactsLimit` to avoid transitive `TeamService` cache dependencies and prevent brittle failures +- **Campaign security test alignment**: `apps/web/src/server/api/routers/campaign-security.trpc.test.ts` updated for current plan access expectations #### SMTP Server -- **SMTP Dockerfile context compatibility** — `apps/smtp-server/Dockerfile` no longer expects `pnpm-lock.yaml` in app-only build contexts and now uses an app-local install path that works with the `apps/smtp-server` Docker build context -- **SMTP container entrypoint correction** — fixed runtime command in `apps/smtp-server/Dockerfile` to execute `dist/server.js` from the container working directory -- **SMTP Docker Corepack compatibility** — pinned Docker image pnpm activation in `apps/smtp-server/Dockerfile` to `pnpm@9.0.0` (instead of `latest`) to avoid Corepack bootstrap/runtime failures in CI builds -- **SMTP package manager metadata** — added `packageManager: pnpm@9.0.0` to `apps/smtp-server/package.json` so Corepack does not auto-inject newer pnpm versions during container installs +- **SMTP Dockerfile context compatibility**: `apps/smtp-server/Dockerfile` no longer expects `pnpm-lock.yaml` in app-only build contexts and now uses an app-local install path that works with the `apps/smtp-server` Docker build context +- **SMTP container entrypoint correction**: fixed runtime command in `apps/smtp-server/Dockerfile` to execute `dist/server.js` from the container working directory +- **SMTP Docker Corepack compatibility**: pinned Docker image pnpm activation in `apps/smtp-server/Dockerfile` to `pnpm@9.0.0` (instead of `latest`) to avoid Corepack bootstrap/runtime failures in CI builds +- **SMTP package manager metadata**: added `packageManager: pnpm@9.0.0` to `apps/smtp-server/package.json` so Corepack does not auto-inject newer pnpm versions during container installs ### Security -- **SES callback SSRF hardening** — `apps/web/src/app/api/ses_callback/route.ts` no longer fetches user-provided `SubscribeURL` directly; it now constructs a trusted AWS SNS confirmation URL from validated `TopicArn`/`Token` components before issuing the request -- **SES callback log-safety hardening** — replaced ad-hoc request/parse logging in `apps/web/src/app/api/ses_callback/route.ts` with constant-format structured logs to avoid tainted-format-string risks from untrusted payload fields -- **SPF verification sanitization fix** — `apps/web/src/server/service/domain-service.ts` now parses SPF TXT mechanisms and validates `include:` domains (`amazonses.com` or subdomains) instead of broad substring checks -- **DKIM key strength upgrade** — `apps/web/src/server/aws/ses.ts` now generates 2048-bit RSA keys (up from 1024-bit) -- **Stripe seed secret logging removal** — `packages/scripts/stripe-seed.ts` no longer logs any portion of `STRIPE_SECRET_KEY` -- **Python webhook example exception exposure fix** — `packages/python-sdk/example/webhook-test-project/receiver.py` now returns a generic verification failure message and avoids exposing exception text to clients -- **Workflow least-privilege permissions** — `.github/workflows/website-test.yml` now sets explicit `permissions` with `contents: read` +- **SES callback SSRF hardening**: `apps/web/src/app/api/ses_callback/route.ts` no longer fetches user-provided `SubscribeURL` directly; it now constructs a trusted AWS SNS confirmation URL from validated `TopicArn`/`Token` components before issuing the request +- **SES callback log-safety hardening**: replaced ad-hoc request/parse logging in `apps/web/src/app/api/ses_callback/route.ts` with constant-format structured logs to avoid tainted-format-string risks from untrusted payload fields +- **SPF verification sanitization fix**: `apps/web/src/server/service/domain-service.ts` now parses SPF TXT mechanisms and validates `include:` domains (`amazonses.com` or subdomains) instead of broad substring checks +- **DKIM key strength upgrade**: `apps/web/src/server/aws/ses.ts` now generates 2048-bit RSA keys (up from 1024-bit) +- **Stripe seed secret logging removal**: `packages/scripts/stripe-seed.ts` no longer logs any portion of `STRIPE_SECRET_KEY` +- **Python webhook example exception exposure fix**: `packages/python-sdk/example/webhook-test-project/receiver.py` now returns a generic verification failure message and avoids exposing exception text to clients +- **Workflow least-privilege permissions**: `.github/workflows/website-test.yml` now sets explicit `permissions` with `contents: read` --- @@ -503,79 +503,79 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added #### Billing -- **Stripe webhook automation** — `pnpm stripe:seed` now registers the Stripe webhook endpoint automatically. For non-development environments it lists existing webhook endpoints, creates the endpoint if not found (or updates its enabled events if it already exists), and saves the endpoint ID and `whsec_*` secret to the `AppSetting` table. Development environments skip registration and print a `stripe listen` hint instead -- **`getWebhookSecret()`** — new export in `stripe-config.ts` that resolves the webhook secret from the `AppSetting` table; used as a fallback in the Stripe webhook route when `STRIPE_WEBHOOK_SECRET` env var is not set -- **`stripe.webhook` config keys** — `DB_CONFIG_KEYS` in `packages/lib` now includes `stripe.webhook.endpoint_id` and `stripe.webhook.secret` so the seed script and webhook route share a single source of truth for key names +- **Stripe webhook automation**: `pnpm stripe:seed` now registers the Stripe webhook endpoint automatically. For non-development environments it lists existing webhook endpoints, creates the endpoint if not found (or updates its enabled events if it already exists), and saves the endpoint ID and `whsec_*` secret to the `AppSetting` table. Development environments skip registration and print a `stripe listen` hint instead +- **`getWebhookSecret()`**: new export in `stripe-config.ts` that resolves the webhook secret from the `AppSetting` table; used as a fallback in the Stripe webhook route when `STRIPE_WEBHOOK_SECRET` env var is not set +- **`stripe.webhook` config keys**: `DB_CONFIG_KEYS` in `packages/lib` now includes `stripe.webhook.endpoint_id` and `stripe.webhook.secret` so the seed script and webhook route share a single source of truth for key names #### Schema -- **`extraDomainSlots` column** — added `extraDomainSlots Int @default(0)` to the `Team` model for tracking purchased additional domain slots -- **`extraMemberSlots` column** — added `extraMemberSlots Int @default(0)` to the `Team` model for tracking purchased additional team member slots +- **`extraDomainSlots` column**: added `extraDomainSlots Int @default(0)` to the `Team` model for tracking purchased additional domain slots +- **`extraMemberSlots` column**: added `extraMemberSlots Int @default(0)` to the `Team` model for tracking purchased additional team member slots #### Legal Pages (Cloud) -- **Cookie Policy** — new `/cookie-policy` page covering UK PECR-compliant cookie usage; contact: `legal@nodebyte.co.uk` -- **DMCA Policy** — new `/dmca` page with designated DMCA agent and takedown procedure; primary contact: `dmca@nodebyte.co.uk` -- **Acceptable Use Policy** — new `/acceptable-use` page defining prohibited use for the email platform; contact: `legal@nodebyte.co.uk` -- **Data Processing Agreement** — new `/dpa` page (UK GDPR Art. 28) documenting sub-processors (NodeByte Hosting UK, Amazon SES EU/US, Upstash Redis EU); contact: `legal@nodebyte.co.uk` -- **`/legal` hub** — new central legal index page listing all six policy documents (Terms, Privacy, Cookie Policy, AUP, DMCA, DPA) as navigable cards with contact email references - -#### Plan Enforcement — Marketing Features -- **`LimitReason.MARKETING_NOT_AVAILABLE`** — new enum value added to `LimitReason` in `lib/constants/plans.ts` for use across server guards and the upgrade modal -- **`LimitService.checkMarketingAccess(teamId)`** — new static method returning `false` for Free plan teams in cloud mode; bypassed for self-hosted and admin/founder teams -- **Campaign API guard** — `createCampaign` and `duplicateCampaign` tRPC mutations now call `checkMarketingAccess` upfront and throw `FORBIDDEN` for Free plan teams -- **Campaign service guard** — `createCampaignFromApi` and `scheduleCampaign` in `campaign-service.ts` now call `checkMarketingAccess` and throw `ByteSendApiError(FORBIDDEN)` for Free plan teams - -#### Plan Enforcement — Resource Limits -- **Limit methods return usage counters** — All `LimitService.check*Limit()` methods now return `{ isLimitReached, limit, currentCount, reason? }` to enable UI display of usage ratios -- **Domain limit enforcement** — `domain.createDomain` now enforces the domain limit (base + extraDomainSlots) at the API level and returns descriptive error with currentCount -- **Team member limit enforcement** — `team.createTeamInvite` enforces the team member limit (base + extraMemberSlots) and includes currentCount in error message -- **Contact limit enforcement** — `ContactQueueService.addBulkContactJobs` checks the contact limit before queueing imports; includes currentCount in error -- **Webhook limit enforcement** — `WebhookService.createWebhook` already enforced limits (reconfirmed) -- **Contact book limit enforcement** — `contactBookService.createContactBook` already enforced limits (reconfirmed) - -#### Plan Enforcement — Purchase Add-ons -- **`purchaseAddonMemberSlots` mutation** — new tRPC mutation (alongside existing `purchaseAddonDomainSlots`) allows teams to buy additional team member slots at CA$5/slot/month -- **Separate addon price IDs** — `PRICE_KEYS.addon` now includes both `domainMonthly` and `memberMonthly` for distinct pricing; `createAddonCheckoutSession` accepts `addonType` parameter to select the correct price -- **Webhook addon tracking** — Stripe webhook processing now distinguishes between `EXTRA_DOMAIN` and `EXTRA_MEMBER` addon prices and updates `team.extraDomainSlots` and `team.extraMemberSlots` independently +- **Cookie Policy**: new `/cookie-policy` page covering UK PECR-compliant cookie usage; contact: `legal@nodebyte.co.uk` +- **DMCA Policy**: new `/dmca` page with designated DMCA agent and takedown procedure; primary contact: `dmca@nodebyte.co.uk` +- **Acceptable Use Policy**: new `/acceptable-use` page defining prohibited use for the email platform; contact: `legal@nodebyte.co.uk` +- **Data Processing Agreement**: new `/dpa` page (UK GDPR Art. 28) documenting sub-processors (NodeByte Hosting UK, Amazon SES EU/US, Upstash Redis EU); contact: `legal@nodebyte.co.uk` +- **`/legal` hub**: new central legal index page listing all six policy documents (Terms, Privacy, Cookie Policy, AUP, DMCA, DPA) as navigable cards with contact email references + +#### Plan Enforcement: Marketing Features +- **`LimitReason.MARKETING_NOT_AVAILABLE`**: new enum value added to `LimitReason` in `lib/constants/plans.ts` for use across server guards and the upgrade modal +- **`LimitService.checkMarketingAccess(teamId)`**: new static method returning `false` for Free plan teams in cloud mode; bypassed for self-hosted and admin/founder teams +- **Campaign API guard**: `createCampaign` and `duplicateCampaign` tRPC mutations now call `checkMarketingAccess` upfront and throw `FORBIDDEN` for Free plan teams +- **Campaign service guard**: `createCampaignFromApi` and `scheduleCampaign` in `campaign-service.ts` now call `checkMarketingAccess` and throw `ByteSendApiError(FORBIDDEN)` for Free plan teams + +#### Plan Enforcement: Resource Limits +- **Limit methods return usage counters**: All `LimitService.check*Limit()` methods now return `{ isLimitReached, limit, currentCount, reason? }` to enable UI display of usage ratios +- **Domain limit enforcement**: `domain.createDomain` now enforces the domain limit (base + extraDomainSlots) at the API level and returns descriptive error with currentCount +- **Team member limit enforcement**: `team.createTeamInvite` enforces the team member limit (base + extraMemberSlots) and includes currentCount in error message +- **Contact limit enforcement**: `ContactQueueService.addBulkContactJobs` checks the contact limit before queueing imports; includes currentCount in error +- **Webhook limit enforcement**: `WebhookService.createWebhook` already enforced limits (reconfirmed) +- **Contact book limit enforcement**: `contactBookService.createContactBook` already enforced limits (reconfirmed) + +#### Plan Enforcement: Purchase Add-ons +- **`purchaseAddonMemberSlots` mutation**: new tRPC mutation (alongside existing `purchaseAddonDomainSlots`) allows teams to buy additional team member slots at CA$5/slot/month +- **Separate addon price IDs**: `PRICE_KEYS.addon` now includes both `domainMonthly` and `memberMonthly` for distinct pricing; `createAddonCheckoutSession` accepts `addonType` parameter to select the correct price +- **Webhook addon tracking**: Stripe webhook processing now distinguishes between `EXTRA_DOMAIN` and `EXTRA_MEMBER` addon prices and updates `team.extraDomainSlots` and `team.extraMemberSlots` independently #### Email Metering & Overage Billing -- **Email meter event reporting** — `EmailQueueService` now reports successful emails to Stripe `billing.meterEventAdjustments` after each send, tracked separately by type (marketing vs transactional). Failures are logged but non-fatal so email delivery is never blocked by metering issues -- **Overage usage tracking** — Marketing and transactional emails beyond the plan's included monthly limit are now reported to Stripe for metered billing (overage charges) +- **Email meter event reporting**: `EmailQueueService` now reports successful emails to Stripe `billing.meterEventAdjustments` after each send, tracked separately by type (marketing vs transactional). Failures are logged but non-fatal so email delivery is never blocked by metering issues +- **Overage usage tracking**: Marketing and transactional emails beyond the plan's included monthly limit are now reported to Stripe for metered billing (overage charges) -#### Dashboard — Usage Indicators -- **Domain usage counter + purchase flow** — "Add domain" now shows "X / Y" usage and includes an in-dialog add-on checkout CTA. When below limit, the add form is shown; when at limit, the add form is hidden and the purchase CTA + limit message are shown -- **Team member usage counter + purchase flow** — "Invite Member" now shows "X / Y" usage and includes an in-dialog add-on checkout CTA. When below limit, invite form is shown; when at limit, the invite form is hidden and the purchase CTA + limit message are shown -- **Upgrade/purchase flow wiring** — Domain/member add-on CTAs open Stripe checkout sessions with proper success/cancel URLs and metadata for webhook handling +#### Dashboard: Usage Indicators +- **Domain usage counter + purchase flow**: "Add domain" now shows "X / Y" usage and includes an in-dialog add-on checkout CTA. When below limit, the add form is shown; when at limit, the add form is hidden and the purchase CTA + limit message are shown +- **Team member usage counter + purchase flow**: "Invite Member" now shows "X / Y" usage and includes an in-dialog add-on checkout CTA. When below limit, invite form is shown; when at limit, the invite form is hidden and the purchase CTA + limit message are shown +- **Upgrade/purchase flow wiring**: Domain/member add-on CTAs open Stripe checkout sessions with proper success/cancel URLs and metadata for webhook handling ### Changed #### Development Setup -- **Database migration required** — run `pnpm prisma migrate dev` to add the `extraMemberSlots` column to the Team table and create the new member addon price in Stripe via `pnpm stripe:seed` +- **Database migration required**: run `pnpm prisma migrate dev` to add the `extraMemberSlots` column to the Team table and create the new member addon price in Stripe via `pnpm stripe:seed` #### Marketing Site -- **Pricing plans updated** — landing page pricing section (`page.tsx` and `PricingTiers.tsx`) now shows the correct three plans: **Free** (CA$0, 12,500 emails/mo), **Hobby** (CA$5/mo, 25,000 emails/mo), and **Lite** (CA$10/mo, 50,000 emails/mo, recommended). Removed the old Professional and Lifetime cards -- **Comparison table corrected** — free tier row updated from `5,000/mo` to `12,500/mo`; "Lifetime plan" row replaced with "Custom plans" (✓ for ByteSend, — for all competitors) to reflect the current offering -- **CTA copy corrected** — "5,000 emails per month" updated to "12,500 emails per month" in the bottom CTA section -- **Footer simplified** — site footer reverted to minimal single-row layout (`© ByteSend · Docs · Changelog · Legal · Status`) with "Legal" linking to the new `/legal` hub instead of individual policy links -- **Legal contact emails** — all `hey@nodebyte.co.uk` references in `privacy/page.tsx` and `terms/page.tsx` replaced with `legal@nodebyte.co.uk` - -#### Dashboard — Marketing Feature Gating (UI) -- **Sidebar Marketing section locked on Free plan** — `AppSidebar` now checks `currentTeam.plan` and, for Free plan teams in cloud mode, renders the Contacts and Campaigns items as non-navigable buttons with a lock icon and dimmed opacity. Clicking either item opens the upgrade modal. The "Marketing" section label gains a "Paid" badge -- **Campaigns page upgrade gate** — `/campaigns` renders a centred lock screen (icon + copy + "Upgrade plan" button) instead of the campaign list when the current team is on the Free plan -- **Contacts page upgrade gate** — `/contacts` renders the same lock screen pattern for Free plan teams -- **Upgrade modal message** — `UpgradeModal` messages Record now includes `MARKETING_NOT_AVAILABLE`: "Marketing features (Contacts & Campaigns) are not available on the Free plan." - -#### Dashboard — Editor Surfaces -- **Template/Campaign/Double opt-in editor layouts unified** — all three editor pages now share the same sticky top bar, metadata strips, and canvas structure for consistent behavior -- **Top-bar clipping resolved across all editor pages** — removed negative vertical wrapper offsets that were causing the back/status row to clip under the dashboard header -- **Editor canvas attached to metadata strip** — removed the visual gap so the editor appears connected to the variables/required strip rather than floating as a separate block -- **Editor width expanded to full available content area** — editor canvas now spans the dashboard content width instead of constrained widths/max-width wrappers -- **Theme-aware editor shell** — editor wrapper, toolbar, popovers, slash command menu, and inline controls now use design tokens (`bg-background`, `bg-popover`, `border-border`, `text-foreground`) for light/dark consistency -- **Toolbar feature expansion** — added paragraph/heading controls, task list, text alignment (left/center/right), blockquote, code block, horizontal rule, unlink, and undo/redo actions in addition to existing inline formatting and list controls +- **Pricing plans updated**: landing page pricing section (`page.tsx` and `PricingTiers.tsx`) now shows the correct three plans: **Free** (CA$0, 12,500 emails/mo), **Hobby** (CA$5/mo, 25,000 emails/mo), and **Lite** (CA$10/mo, 50,000 emails/mo, recommended). Removed the old Professional and Lifetime cards +- **Comparison table corrected**: free tier row updated from `5,000/mo` to `12,500/mo`; "Lifetime plan" row replaced with "Custom plans" (✓ for ByteSend, — for all competitors) to reflect the current offering +- **CTA copy corrected**: "5,000 emails per month" updated to "12,500 emails per month" in the bottom CTA section +- **Footer simplified**: site footer reverted to minimal single-row layout (`© ByteSend · Docs · Changelog · Legal · Status`) with "Legal" linking to the new `/legal` hub instead of individual policy links +- **Legal contact emails**: all `hey@nodebyte.co.uk` references in `privacy/page.tsx` and `terms/page.tsx` replaced with `legal@nodebyte.co.uk` + +#### Dashboard: Marketing Feature Gating (UI) +- **Sidebar Marketing section locked on Free plan**: `AppSidebar` now checks `currentTeam.plan` and, for Free plan teams in cloud mode, renders the Contacts and Campaigns items as non-navigable buttons with a lock icon and dimmed opacity. Clicking either item opens the upgrade modal. The "Marketing" section label gains a "Paid" badge +- **Campaigns page upgrade gate**: `/campaigns` renders a centred lock screen (icon + copy + "Upgrade plan" button) instead of the campaign list when the current team is on the Free plan +- **Contacts page upgrade gate**: `/contacts` renders the same lock screen pattern for Free plan teams +- **Upgrade modal message**: `UpgradeModal` messages Record now includes `MARKETING_NOT_AVAILABLE`: "Marketing features (Contacts & Campaigns) are not available on the Free plan." + +#### Dashboard: Editor Surfaces +- **Template/Campaign/Double opt-in editor layouts unified**: all three editor pages now share the same sticky top bar, metadata strips, and canvas structure for consistent behavior +- **Top-bar clipping resolved across all editor pages**: removed negative vertical wrapper offsets that were causing the back/status row to clip under the dashboard header +- **Editor canvas attached to metadata strip**: removed the visual gap so the editor appears connected to the variables/required strip rather than floating as a separate block +- **Editor width expanded to full available content area**: editor canvas now spans the dashboard content width instead of constrained widths/max-width wrappers +- **Theme-aware editor shell**: editor wrapper, toolbar, popovers, slash command menu, and inline controls now use design tokens (`bg-background`, `bg-popover`, `border-border`, `text-foreground`) for light/dark consistency +- **Toolbar feature expansion**: added paragraph/heading controls, task list, text alignment (left/center/right), blockquote, code block, horizontal rule, unlink, and undo/redo actions in addition to existing inline formatting and list controls ### Fixed #### Database -- **Migration history drift resolved** — `_prisma_migrations` table contained ~50 stale records from old migrations that no longer existed locally. Truncated the table and replaced the entire history with a single baseline migration (`20260507000000_init`) generated from the current schema. Local `prisma/migrations/` folder now has exactly one migration; DB records match +- **Migration history drift resolved**: `_prisma_migrations` table contained ~50 stale records from old migrations that no longer existed locally. Truncated the table and replaced the entire history with a single baseline migration (`20260507000000_init`) generated from the current schema. Local `prisma/migrations/` folder now has exactly one migration; DB records match --- @@ -584,38 +584,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added #### SMTP -- **Per-team custom SMTP username** — teams can now set a custom SMTP username instead of the shared `bytesend` default. The username is stored on the `Team` model (`smtpUsername String?`; `null` means use the global default). Validation enforces alphanumeric characters, underscores, dots, and hyphens (max 64 chars) -- **`POST /api/v1/smtp/auth` endpoint** — new public API endpoint the SMTP server calls during `onAuth` to validate credentials. Looks up the API key, resolves the team's effective username (`smtpUsername ?? SMTP_USER`), and returns `{valid: true}` or 401. Exempt from the standard bearer-token middleware and rate limiter -- **SMTP server remote auth** — `onAuth` in `apps/smtp-server` now calls the ByteSend API for credential validation instead of doing a static string comparison against `SMTP_AUTH_USERNAME`. The server is fully stateless about usernames; all logic lives in the API +- **Per-team custom SMTP username**: teams can now set a custom SMTP username instead of the shared `bytesend` default. The username is stored on the `Team` model (`smtpUsername String?`; `null` means use the global default). Validation enforces alphanumeric characters, underscores, dots, and hyphens (max 64 chars) +- **`POST /api/v1/smtp/auth` endpoint**: new public API endpoint the SMTP server calls during `onAuth` to validate credentials. Looks up the API key, resolves the team's effective username (`smtpUsername ?? SMTP_USER`), and returns `{valid: true}` or 401. Exempt from the standard bearer-token middleware and rate limiter +- **SMTP server remote auth**: `onAuth` in `apps/smtp-server` now calls the ByteSend API for credential validation instead of doing a static string comparison against `SMTP_AUTH_USERNAME`. The server is fully stateless about usernames; all logic lives in the API #### Dashboard -- **Editable SMTP settings page** — the SMTP credentials page (`/developer-settings/smtp`) is now a client component with an editable username field. Shows the effective username (custom or default), a "Reset to default" button when a custom value is set, and an inline save button that appears when the field is dirty -- **`team.getTeamDetails` tRPC query** — new procedure returning `id`, `name`, and `smtpUsername` for the current team -- **`team.updateSmtpUsername` tRPC mutation** — team admins can update or reset their SMTP username. Passing `null` reverts to the global default +- **Editable SMTP settings page**: the SMTP credentials page (`/developer-settings/smtp`) is now a client component with an editable username field. Shows the effective username (custom or default), a "Reset to default" button when a custom value is set, and an inline save button that appears when the field is dirty +- **`team.getTeamDetails` tRPC query**: new procedure returning `id`, `name`, and `smtpUsername` for the current team +- **`team.updateSmtpUsername` tRPC mutation**: team admins can update or reset their SMTP username. Passing `null` reverts to the global default #### Notifications -- **Discord webhook notifications** — `DISCORD_WEBHOOK_URL` is now fully wired to real app events. When set, ByteSend posts a message to Discord on: new user signup (email + name), new team created (name + team ID), hard bounce detected (email ID, subject, affected recipients, team ID), and spam complaint received (same fields). All notifications fire-and-forget and never block the main request flow +- **Discord webhook notifications**: `DISCORD_WEBHOOK_URL` is now fully wired to real app events. When set, ByteSend posts a message to Discord on: new user signup (email + name), new team created (name + team ID), hard bounce detected (email ID, subject, affected recipients, team ID), and spam complaint received (same fields). All notifications fire-and-forget and never block the main request flow ### Changed -#### Design System — Dashboard-wide consistency pass +#### Design System: Dashboard-wide consistency pass All dashboard pages and components now consistently follow the design system. The following violations were corrected across 13+ files: **Status badges** -- `email-status-badge.tsx` — replaced all hardcoded Tailwind palette colors (`bg-emerald-500/15 text-emerald-500`, `bg-purple-500/15 text-purple-500`, `bg-gray-400/30`, etc.) with CSS variable design tokens (`bg-green/15 text-green`, `bg-primary/10 text-primary`, `bg-muted/30 text-muted-foreground`, etc.) -- `domain-badge.tsx` — replaced `text-emerald-600 dark:text-emerald-400 bg-emerald-500/10`, `text-amber-600 dark:text-amber-400 bg-amber-500/10` etc. with `text-green bg-green/15`, `text-yellow bg-yellow/15` -- `webhook-status-badge.tsx` and `webhook-call-status-badge.tsx` — replaced `bg-gray-700/10 text-gray-400` default state and removed fixed `w-[130px]`/`w-[110px]` in favour of `min-w-24 px-2` -- `contact-list.tsx` — replaced fixed `w-[130px]` status pills with `min-w-24 px-2` +- `email-status-badge.tsx`: replaced all hardcoded Tailwind palette colors (`bg-emerald-500/15 text-emerald-500`, `bg-purple-500/15 text-purple-500`, `bg-gray-400/30`, etc.) with CSS variable design tokens (`bg-green/15 text-green`, `bg-primary/10 text-primary`, `bg-muted/30 text-muted-foreground`, etc.) +- `domain-badge.tsx`: replaced `text-emerald-600 dark:text-emerald-400 bg-emerald-500/10`, `text-amber-600 dark:text-amber-400 bg-amber-500/10` etc. with `text-green bg-green/15`, `text-yellow bg-yellow/15` +- `webhook-status-badge.tsx` and `webhook-call-status-badge.tsx`: replaced `bg-gray-700/10 text-gray-400` default state and removed fixed `w-[130px]`/`w-[110px]` in favour of `min-w-24 px-2` +- `contact-list.tsx`: replaced fixed `w-[130px]` status pills with `min-w-24 px-2` **Card and table borders** -- `email-list.tsx`, `contact-list.tsx`, `webhook-list.tsx`, `suppression-list.tsx`, `dashboard/reputation-metrics.tsx` — replaced `border shadow` / `border rounded-xl shadow` with `border border-border/60 rounded-xl` -- `contact-list.tsx` — fixed typo `border-broder` → `border-border/60` +- `email-list.tsx`, `contact-list.tsx`, `webhook-list.tsx`, `suppression-list.tsx`, `dashboard/reputation-metrics.tsx`: replaced `border shadow` / `border rounded-xl shadow` with `border border-border/60 rounded-xl` +- `contact-list.tsx`: fixed typo `border-broder` → `border-border/60` **Email preview** -- `email-details.tsx` — replaced `dark:bg-slate-200 h-[350px]` email preview container with `bg-white h-88`; card borders changed from `rounded-lg shadow` to `border-border/60 rounded-xl`; `border-gray-300 dark:border-gray-700` timeline connector → `border-border` +- `email-details.tsx`: replaced `dark:bg-slate-200 h-[350px]` email preview container with `bg-white h-88`; card borders changed from `rounded-lg shadow` to `border-border/60 rounded-xl`; `border-gray-300 dark:border-gray-700` timeline connector → `border-border` -**Editor pages — dark-mode canvas** -- `double-opt-in/page.tsx` — settings card `border rounded-lg shadow` → `border border-border/60 rounded-xl`; editor wrapper `rounded-lg bg-gray-50` → same dark-aware panel (border + header + white canvas) applied to template and campaign editors in the previous release +**Editor pages: dark-mode canvas** +- `double-opt-in/page.tsx`: settings card `border rounded-lg shadow` → `border border-border/60 rounded-xl`; editor wrapper `rounded-lg bg-gray-50` → same dark-aware panel (border + header + white canvas) applied to template and campaign editors in the previous release **Arbitrary Tailwind values replaced with shorthands** across all modified files: - `w-[700px]` → `w-175` / `max-w-175`; `w-[600px]` → `w-150`; `w-[300px]` → `w-75`; `w-[240px]` → `w-60`; `w-[200px]` → `w-50`; `w-[180px]` → `w-45`; `w-[150px]` → `w-38`; `w-[130px]` → `min-w-24 px-2`; `w-[110px]` → `min-w-24 px-2`; `w-[100px]` → `w-25`; `w-[80px]` → `w-20`; `w-[70px]` → `w-17.5`; `h-[350px]` → `h-88`; `h-[18px] w-[18px]` → `h-4.5 w-4.5`; `w-[300px]` tooltip → `w-75`; `-mt-[0.125rem]` → `-mt-0.5` @@ -627,17 +627,17 @@ All dashboard pages and components now consistently follow the design system. Th ### Fixed #### Email Delivery -- **Emails stuck as QUEUED forever** — when `getConfigurationSetName()` returned `null` the job silently returned success to BullMQ without marking the email as failed, leaving it in `QUEUED` state indefinitely. Now explicitly marks the email `FAILED` with a descriptive error event so the problem is visible in the email log -- **No retry on transient SES errors** — any SES error (throttle, 5xx, network hiccup) was immediately written as a permanent `FAILED` with no retry. Transient errors (`TooManyRequestsException`, `ServiceUnavailableException`, server-fault responses) are now re-thrown so BullMQ retries the job automatically -- **Zero retry budget on email jobs** — `DEFAULT_QUEUE_OPTIONS` had no `attempts` key so BullMQ defaulted to 1 attempt. Email jobs now receive **3 attempts** with **10 s exponential backoff** (10 s → 20 s → 40 s) -- **Silent worker crashes** — email queue workers had no `error` or `stalled` event listeners; a crashed worker left jobs orphaned with no log trace. Both events are now logged with region and queue context +- **Emails stuck as QUEUED forever**: when `getConfigurationSetName()` returned `null` the job silently returned success to BullMQ without marking the email as failed, leaving it in `QUEUED` state indefinitely. Now explicitly marks the email `FAILED` with a descriptive error event so the problem is visible in the email log +- **No retry on transient SES errors**: any SES error (throttle, 5xx, network hiccup) was immediately written as a permanent `FAILED` with no retry. Transient errors (`TooManyRequestsException`, `ServiceUnavailableException`, server-fault responses) are now re-thrown so BullMQ retries the job automatically +- **Zero retry budget on email jobs**: `DEFAULT_QUEUE_OPTIONS` had no `attempts` key so BullMQ defaulted to 1 attempt. Email jobs now receive **3 attempts** with **10 s exponential backoff** (10 s → 20 s → 40 s) +- **Silent worker crashes**: email queue workers had no `error` or `stalled` event listeners; a crashed worker left jobs orphaned with no log trace. Both events are now logged with region and queue context #### Domain / DKIM -- **DKIM auto-reregister infinite loop** — the hourly background verification job triggered auto-reregistration on `wrong_key` DNS status and also when `lastCheckedAt` was `null`, causing an endless re-registration cycle for newly added domains. Auto-reregister now only fires when the DKIM record is confirmed `found` in DNS (propagation confirmed) but SES has not acknowledged it for over 1 hour, and requires a non-null `lastCheckedAt` -- **Verify button inaccessible after DKIM re-generation** — reregistration set `isVerifying: true`, which hid the Verify button and locked users out of the verification flow. Now sets `isVerifying: false` and uses a Redis-backed `dkimReregistered` flag (24 h TTL) to show an amber guidance banner with instructions; the banner clears automatically when the user clicks Verify +- **DKIM auto-reregister infinite loop**: the hourly background verification job triggered auto-reregistration on `wrong_key` DNS status and also when `lastCheckedAt` was `null`, causing an endless re-registration cycle for newly added domains. Auto-reregister now only fires when the DKIM record is confirmed `found` in DNS (propagation confirmed) but SES has not acknowledged it for over 1 hour, and requires a non-null `lastCheckedAt` +- **Verify button inaccessible after DKIM re-generation**: reregistration set `isVerifying: true`, which hid the Verify button and locked users out of the verification flow. Now sets `isVerifying: false` and uses a Redis-backed `dkimReregistered` flag (24 h TTL) to show an amber guidance banner with instructions; the banner clears automatically when the user clicks Verify #### Version Display -- **Version always showing "unknown" in production** — Docker Compose defaulted `APP_VERSION` to the string literal `"unknown"` when not provided by CI; the `/api/version` route immediately returned this sentinel without attempting the GitHub API fallback. The route now ignores `"unknown"` and `"canary"` as sentinel values, and the Docker Compose `APP_VERSION` arg now defaults to empty so the GitHub release lookup runs when CI does not inject a version +- **Version always showing "unknown" in production**: Docker Compose defaulted `APP_VERSION` to the string literal `"unknown"` when not provided by CI; the `/api/version` route immediately returned this sentinel without attempting the GitHub API fallback. The route now ignores `"unknown"` and `"canary"` as sentinel values, and the Docker Compose `APP_VERSION` arg now defaults to empty so the GitHub release lookup runs when CI does not inject a version --- @@ -646,21 +646,21 @@ All dashboard pages and components now consistently follow the design system. Th ### Added #### Admin Panel -- **Domains admin section** — added a global domains view to the admin panel with filtering, pagination, team ownership, region, verification status, tracking flags, and verification-in-progress visibility -- **Webhooks admin section** — added a global webhooks view to the admin panel with filtering, pagination, owning team, creator, status, subscribed event summary, consecutive failure count, and last success/failure timestamps -- **Billing admin section** — added a global billing view to the admin panel with summary cards and per-team billing records covering plan, latest subscription, billing email, Stripe customer ID, period end, and cancel-at-period-end state +- **Domains admin section**: added a global domains view to the admin panel with filtering, pagination, team ownership, region, verification status, tracking flags, and verification-in-progress visibility +- **Webhooks admin section**: added a global webhooks view to the admin panel with filtering, pagination, owning team, creator, status, subscribed event summary, consecutive failure count, and last success/failure timestamps +- **Billing admin section**: added a global billing view to the admin panel with summary cards and per-team billing records covering plan, latest subscription, billing email, Stripe customer ID, period end, and cancel-at-period-end state ### Changed #### Admin Panel -- **Expanded admin navigation** — admin tabs now include Domains, Webhooks, and Billing alongside SES Configurations, Teams, Email Analytics, and Users -- **Teams and Users tables redesigned** — the Teams and Users admin lists now use the same shared table primitives and muted header-row treatment as SES Configurations, replacing the older hand-rolled tables and bright blue row actions with a more consistent admin UI -- **Admin status styling unified** — teams and users now use compact semantic pill indicators for active/blocked and user flag states so status presentation matches the rest of the admin panel +- **Expanded admin navigation**: admin tabs now include Domains, Webhooks, and Billing alongside SES Configurations, Teams, Email Analytics, and Users +- **Teams and Users tables redesigned**: the Teams and Users admin lists now use the same shared table primitives and muted header-row treatment as SES Configurations, replacing the older hand-rolled tables and bright blue row actions with a more consistent admin UI +- **Admin status styling unified**: teams and users now use compact semantic pill indicators for active/blocked and user flag states so status presentation matches the rest of the admin panel ### Fixed -- **Mobile sidebar user section still clipped in portrait** — the previous sidebar fix was incomplete on short mobile viewports. The mobile drawer now uses a viewport-bounded height (`svh` with `dvh` support), a `min-h-0` inner column, safe-area bottom padding, and non-shrinking sidebar header/footer regions so the user section remains visible in portrait as well as landscape -- **JavaScript SDK repository metadata** — corrected the npm package repository URL in `packages/sdk/package.json` from the old repository path to `https://github.com/NodeByteHosting/bytesend-cloud`, so published package metadata now points to the right source repository +- **Mobile sidebar user section still clipped in portrait**: the previous sidebar fix was incomplete on short mobile viewports. The mobile drawer now uses a viewport-bounded height (`svh` with `dvh` support), a `min-h-0` inner column, safe-area bottom padding, and non-shrinking sidebar header/footer regions so the user section remains visible in portrait as well as landscape +- **JavaScript SDK repository metadata**: corrected the npm package repository URL in `packages/sdk/package.json` from the old repository path to `https://github.com/NodeByteHosting/bytesend-cloud`, so published package metadata now points to the right source repository --- @@ -669,14 +669,14 @@ All dashboard pages and components now consistently follow the design system. Th ### Added #### Domain Verification -- **DKIM auto-reregistration** — when a DKIM TXT record is confirmed present in DNS but AWS SES has been stuck in a non-`SUCCESS` state for over an hour, the verification cycle now automatically regenerates the DKIM signing attributes and forces a fresh SES check cycle, eliminating the "delete and redo" workaround -- **Parallel DNS pre-checks** — `refreshDomainVerification` now runs independent DNS lookups for DKIM, SPF, and MX in parallel alongside the SES identity poll, returning a `dnsPrecheck` result with per-record `"found" | "wrong_key" | "not_found"` status -- **Manual DKIM re-generation** — new `reregisterDkim` tRPC mutation exposed in the domain Actions dropdown; generates a fresh RSA key pair, updates the stored public key, and resets DKIM status to `NOT_STARTED` so the verification loop restarts cleanly -- **Full domain section redesign** — complete Vercel-inspired overhaul of all domain pages and components: +- **DKIM auto-reregistration**: when a DKIM TXT record is confirmed present in DNS but AWS SES has been stuck in a non-`SUCCESS` state for over an hour, the verification cycle now automatically regenerates the DKIM signing attributes and forces a fresh SES check cycle, eliminating the "delete and redo" workaround +- **Parallel DNS pre-checks**: `refreshDomainVerification` now runs independent DNS lookups for DKIM, SPF, and MX in parallel alongside the SES identity poll, returning a `dnsPrecheck` result with per-record `"found" | "wrong_key" | "not_found"` status +- **Manual DKIM re-generation**: new `reregisterDkim` tRPC mutation exposed in the domain Actions dropdown; generates a fresh RSA key pair, updates the stored public key, and resets DKIM status to `NOT_STARTED` so the verification loop restarts cleanly +- **Full domain section redesign**: complete Vercel-inspired overhaul of all domain pages and components: - Domain list rewritten as a full-width column-header table (`Domain / Status / Region / Added`) replacing the old card-stack layout; clickable rows with hover states and empty state illustration - `DomainStatusBadge` redesigned as compact pill badges with Lucide status icons (CheckCircle2, XCircle, Clock, AlertTriangle) and semantic color fills (emerald/red/amber) - `StatusIndicator` simplified to a 1px self-stretch vertical line with the same semantic colors - - Domain detail page: removed `max-w-4xl` constraint — layout now fills available width at all breakpoints + - Domain detail page: removed `max-w-4xl` constraint: layout now fills available width at all breakpoints - Domain detail page header improved: region shown inline, mobile-first `flex-col sm:flex-row` layout, Actions + Send test buttons in a consistent toolbar - DNS status signal cards (`DKIM / SPF / DMARC`) now render full-width in a `grid-cols-1 sm:grid-cols-3` grid with tinted backgrounds per status, icon + label + description + DNS hint in a consistent visual hierarchy - DNS records table: improved column widths, `border-b border-border/40` row separators, `w-55` Name column, `max-w-90 truncate` Value cells @@ -685,32 +685,32 @@ All dashboard pages and components now consistently follow the design system. Th ### Changed #### Performance -- **Removed framer-motion entirely** — all framer-motion animations replaced with Tailwind CSS `animate-in` / `animate-out` / `data-[state]` variants: - - `email-details.tsx` — fade-in replaced with `animate-in fade-in duration-300` - - `campaigns/[campaignId]/page.tsx` — `AnimatePresence` + `motion.div` layout animations removed - - `packages/ui/accordion.tsx` — unused framer-motion import removed - - `packages/ui/sheet.tsx` — framer-motion overlay and slide animations replaced with Radix `data-[state=open/closed]` Tailwind variants -- **Sheet transition animations removed** — all `animate-in` / `animate-out` slide and fade classes stripped from `SheetOverlay` and all `sheetVariants` sides in `packages/ui/sheet.tsx`; drawer now opens and closes instantly with no layout shift -- **Float keyframes removed** — `--animate-float`, `--animate-float-delayed`, and the `@keyframes float` block removed from `packages/ui/styles/globals.css`; accordion animation duration reduced from default to `0.2s` -- **Marketing page animation and gradient cleanup** — removed all gradient overlays (including the `bg-linear-to-b` overlay in `FeatureCard.tsx`) and transition effects from the marketing page; email preview fade-in wrapper removed from `email-details.tsx` +- **Removed framer-motion entirely**: all framer-motion animations replaced with Tailwind CSS `animate-in` / `animate-out` / `data-[state]` variants: + - `email-details.tsx`: fade-in replaced with `animate-in fade-in duration-300` + - `campaigns/[campaignId]/page.tsx`: `AnimatePresence` + `motion.div` layout animations removed + - `packages/ui/accordion.tsx`: unused framer-motion import removed + - `packages/ui/sheet.tsx`: framer-motion overlay and slide animations replaced with Radix `data-[state=open/closed]` Tailwind variants +- **Sheet transition animations removed**: all `animate-in` / `animate-out` slide and fade classes stripped from `SheetOverlay` and all `sheetVariants` sides in `packages/ui/sheet.tsx`; drawer now opens and closes instantly with no layout shift +- **Float keyframes removed**: `--animate-float`, `--animate-float-delayed`, and the `@keyframes float` block removed from `packages/ui/styles/globals.css`; accordion animation duration reduced from default to `0.2s` +- **Marketing page animation and gradient cleanup**: removed all gradient overlays (including the `bg-linear-to-b` overlay in `FeatureCard.tsx`) and transition effects from the marketing page; email preview fade-in wrapper removed from `email-details.tsx` #### Design System -- **Geist font** — switched from Inter + JetBrains Mono to Geist Sans + Geist Mono via `next/font/google`; CSS custom properties `--font-geist-sans` / `--font-geist-mono` wired through `@theme` in `globals.css` -- **Vercel-style neutral palette** — overhauled the entire color system from indigo-tinted backgrounds to pure black/gray neutrals: +- **Geist font**: switched from Inter + JetBrains Mono to Geist Sans + Geist Mono via `next/font/google`; CSS custom properties `--font-geist-sans` / `--font-geist-mono` wired through `@theme` in `globals.css` +- **Vercel-style neutral palette**: overhauled the entire color system from indigo-tinted backgrounds to pure black/gray neutrals: - Light mode: white background, near-black text (`#171717`), neutral gray borders (`#e5e5e5`), `#f5f5f5` muted surfaces - Dark mode: near-black background (`#0a0a0a`), `#111` card surfaces, `#262626` borders, `#737373` muted foreground - ByteSend electric blue primary (213 76%/94%) unchanged as the brand accent #### Marketing Site -- **Full landing page overhaul** — complete Vercel-inspired redesign of `apps/web/src/app/(marketing)/page.tsx`: - - **Hero** — typography scaled up (5xl → 7xl), badge updated to "Open source · Self-hostable · Free tier included", added "Read the docs" secondary CTA - - **TrustStrip** — full-width divider with column separators (Vercel style), updated platform stats - - **DevSection** (new) — split panel with value prop, feature checklist, primary/secondary CTAs on the left, and a terminal-style TypeScript SDK code snippet on the right (static `
/`, no added dependencies)
-  - **Comparison table** — redesigned from a card grid to an HTML `` comparing ByteSend vs Resend vs SendGrid vs Postmark vs AWS SES across key features with ✓ / — cells
-  - **CTA** — `bg-muted/20` alternating background, larger headline, self-hosting note with docs link
+- **Full landing page overhaul**: complete Vercel-inspired redesign of `apps/web/src/app/(marketing)/page.tsx`:
+  - **Hero**: typography scaled up (5xl → 7xl), badge updated to "Open source · Self-hostable · Free tier included", added "Read the docs" secondary CTA
+  - **TrustStrip**: full-width divider with column separators (Vercel style), updated platform stats
+  - **DevSection** (new): split panel with value prop, feature checklist, primary/secondary CTAs on the left, and a terminal-style TypeScript SDK code snippet on the right (static `
/`, no added dependencies)
+  - **Comparison table**: redesigned from a card grid to an HTML `
` comparing ByteSend vs Resend vs SendGrid vs Postmark vs AWS SES across key features with ✓ / — cells + - **CTA**: `bg-muted/20` alternating background, larger headline, self-hosting note with docs link #### Version System -- **Version route rewritten** — `/api/version` now uses a multi-source fallback cascade instead of a single GitLab call: +- **Version route rewritten**: `/api/version` now uses a multi-source fallback cascade instead of a single GitLab call: 1. `NEXT_PUBLIC_APP_VERSION` build-time env var (CI sets this before `next build`) 2. GitLab: `permalink/latest` → releases list → repository tags 3. GitHub: `releases/latest` → releases list → tags @@ -719,27 +719,27 @@ All dashboard pages and components now consistently follow the design system. Th - `revalidate` set to `3600` so the version is cached per-deployment rather than fetched on every request #### UI / Dashboard -- **Breadcrumb navigation** — dashboard header now renders a full breadcrumb trail built from the pathname with human-readable segment labels, replacing the single-segment display -- **Settings nav tabs** — `SettingsNavButton` active indicator switched to `border-foreground`; transitions updated to `transition-all duration-150` +- **Breadcrumb navigation**: dashboard header now renders a full breadcrumb trail built from the pathname with human-readable segment labels, replacing the single-segment display +- **Settings nav tabs**: `SettingsNavButton` active indicator switched to `border-foreground`; transitions updated to `transition-all duration-150` ### Fixed -- Domain detail page had duplicate legacy component definitions (`DomainSettings`, `DnsVerificationStatus`, old `DomainItemPage`) left over from a partial edit — removed all stale code +- Domain detail page had duplicate legacy component definitions (`DomainSettings`, `DnsVerificationStatus`, old `DomainItemPage`) left over from a partial edit: removed all stale code - `packages/ui/sheet.tsx` no longer depends on framer-motion for slide and fade transitions, resolving WebKit rendering performance issues on Safari -- **OAuth profile picture not showing in sidebar** — `PrismaAdapter` only writes `image` to the database on the very first OAuth sign-in via `createUser`; subsequent logins never updated a stale or missing image. The `signIn` callback in `auth.ts` now reads the correct provider-specific image field on every OAuth login (`avatar_url` for GitHub, `picture` for Google, CDN URL constructed from `id`/`avatar` for Discord) and syncs it to the DB when it differs. The `session` callback explicitly forwards `user.image` so the updated value reaches the client immediately without requiring a re-login. -- **Sidebar mobile footer pushed off-screen** — `overflow-y-auto` on the mobile `SheetContent` wrapper broke the flex layout, causing `SidebarFooter` (with the user avatar and version info) to scroll off-screen on smaller viewports. Changed to `overflow-hidden` so the footer stays pinned and only `SidebarContent` scrolls. -- **Version route always returning "canary"** — the original implementation only tried a single GitLab endpoint (`permalink/latest`) which requires GitLab 14.2+ with formal releases configured; all failures were silently swallowed with no logging. Replaced with the multi-endpoint cascade described above. +- **OAuth profile picture not showing in sidebar**: `PrismaAdapter` only writes `image` to the database on the very first OAuth sign-in via `createUser`; subsequent logins never updated a stale or missing image. The `signIn` callback in `auth.ts` now reads the correct provider-specific image field on every OAuth login (`avatar_url` for GitHub, `picture` for Google, CDN URL constructed from `id`/`avatar` for Discord) and syncs it to the DB when it differs. The `session` callback explicitly forwards `user.image` so the updated value reaches the client immediately without requiring a re-login. +- **Sidebar mobile footer pushed off-screen**: `overflow-y-auto` on the mobile `SheetContent` wrapper broke the flex layout, causing `SidebarFooter` (with the user avatar and version info) to scroll off-screen on smaller viewports. Changed to `overflow-hidden` so the footer stays pinned and only `SidebarContent` scrolls. +- **Version route always returning "canary"**: the original implementation only tried a single GitLab endpoint (`permalink/latest`) which requires GitLab 14.2+ with formal releases configured; all failures were silently swallowed with no logging. Replaced with the multi-endpoint cascade described above. --- ## [1.0.0-beta.1] - 2026-04-08 -Initial public beta release of ByteSend — an all-in-one email infrastructure platform for transactional and marketing email delivery. +Initial public beta release of ByteSend: an all-in-one email infrastructure platform for transactional and marketing email delivery. ### Added #### Platform & Auth -- Email magic-link authentication with 6-character code entry (always shown after submit; code submits directly to NextAuth callback — no "please click the link" dead-end) +- Email magic-link authentication with 6-character code entry (always shown after submit; code submits directly to NextAuth callback: no "please click the link" dead-end) - OAuth sign-in via GitHub, Google, and Discord - Profile setup screen on first login (name + avatar URL) for email-only users - Session-based team context with team switching in the sidebar @@ -836,7 +836,7 @@ Initial public beta release of ByteSend — an all-in-one email infrastructure p - PostgreSQL via Prisma ORM with full migration history - Redis via BullMQ for job queues - S3-compatible object storage for team images, campaign assets, and template images -- Server-side upload proxy (`/api/upload`) — all file uploads go server-to-S3, eliminating browser CORS issues with object storage +- Server-side upload proxy (`/api/upload`): all file uploads go server-to-S3, eliminating browser CORS issues with object storage - Environment variable validation with `@t3-oss/env-nextjs` #### Marketing Site @@ -856,17 +856,17 @@ Initial public beta release of ByteSend — an all-in-one email infrastructure p ### Fixed (this release cycle) -- **CORS on file uploads** — Presigned S3 PUT URLs were blocked by browser CORS preflight against Hetzner Object Storage. All uploads now go through the `/api/upload` Next.js route which performs the S3 `PutObject` server-side. -- **Login code entry did nothing** — `handleVerificationCodeSubmit` showed an error telling users to click the magic link instead of verifying. Now correctly navigates to `/api/auth/callback/email?token=...` so manual code entry actually signs the user in. -- **Email lost after magic link redirect** — The user's email was stored only in component state; following the magic link to `?verify=1` cleared it. Email is now persisted in `sessionStorage` and restored on mount. -- **Two separate post-email UIs** — The `emailSent` card (info only, no code entry) and the `isVerifying` card (broken code entry) were separate. Merged into a single unified code-entry UI shown immediately after email submission. -- **Dashboard header disappears on scroll** — `sticky top-0` broke because `overflow-x-hidden` on the sidebar wrapper created a scroll container boundary, causing the sticky element's stacking context to disappear as the document scrolled. Fixed by switching to a `h-dvh overflow-hidden` viewport pane layout where the header is `shrink-0` and only the `
` scrolls. -- **Sidebar user info pushed off-screen on mobile** — Adding links to `SidebarFooter` grew it beyond the viewport with no escape. Footer now only contains `VersionInfo` + `NavUser` with `shrink-0`. Feedback and Discord links moved into `SidebarContent` with `mt-auto` so they float to the bottom of the scrollable zone and can never overflow. -- **Hero images returning null** — `next/image` makes a server-side request to optimise external images; the CDN (`embrly.ca`) blocked this with an empty response. Switched to the local `public/hero-light.webp` and `public/hero-dark.webp` assets. -- **SMTP server build failure** — Orphaned `main().catch(...)` call at the bottom of `server.ts` referenced a function that was never defined; removed. -- **Create team routing** — Sidebar "Create team" link pointed to `/create-team` (404). Fixed to `/join-team` which renders `` correctly with its own scoped `TRPCReactProvider` layout. -- **Team name uniqueness** — No uniqueness constraint existed on `Team.name`, allowing duplicate team names. Added `@unique` to the Prisma schema, created migration, and added pre-flight checks in `createTeam` and `updateTeam` service methods. -- **`isBanned` migration drift** — Column existed in the DB but not in the schema, causing Prisma Client to ignore it. Added `isBanned` to the schema and regenerated the client. +- **CORS on file uploads**: Presigned S3 PUT URLs were blocked by browser CORS preflight against Hetzner Object Storage. All uploads now go through the `/api/upload` Next.js route which performs the S3 `PutObject` server-side. +- **Login code entry did nothing**: `handleVerificationCodeSubmit` showed an error telling users to click the magic link instead of verifying. Now correctly navigates to `/api/auth/callback/email?token=...` so manual code entry actually signs the user in. +- **Email lost after magic link redirect**: The user's email was stored only in component state; following the magic link to `?verify=1` cleared it. Email is now persisted in `sessionStorage` and restored on mount. +- **Two separate post-email UIs**: The `emailSent` card (info only, no code entry) and the `isVerifying` card (broken code entry) were separate. Merged into a single unified code-entry UI shown immediately after email submission. +- **Dashboard header disappears on scroll**: `sticky top-0` broke because `overflow-x-hidden` on the sidebar wrapper created a scroll container boundary, causing the sticky element's stacking context to disappear as the document scrolled. Fixed by switching to a `h-dvh overflow-hidden` viewport pane layout where the header is `shrink-0` and only the `
` scrolls. +- **Sidebar user info pushed off-screen on mobile**: Adding links to `SidebarFooter` grew it beyond the viewport with no escape. Footer now only contains `VersionInfo` + `NavUser` with `shrink-0`. Feedback and Discord links moved into `SidebarContent` with `mt-auto` so they float to the bottom of the scrollable zone and can never overflow. +- **Hero images returning null**: `next/image` makes a server-side request to optimise external images; the CDN (`embrly.ca`) blocked this with an empty response. Switched to the local `public/hero-light.webp` and `public/hero-dark.webp` assets. +- **SMTP server build failure**: Orphaned `main().catch(...)` call at the bottom of `server.ts` referenced a function that was never defined; removed. +- **Create team routing**: Sidebar "Create team" link pointed to `/create-team` (404). Fixed to `/join-team` which renders `` correctly with its own scoped `TRPCReactProvider` layout. +- **Team name uniqueness**: No uniqueness constraint existed on `Team.name`, allowing duplicate team names. Added `@unique` to the Prisma schema, created migration, and added pre-flight checks in `createTeam` and `updateTeam` service methods. +- **`isBanned` migration drift**: Column existed in the DB but not in the schema, causing Prisma Client to ignore it. Added `isBanned` to the schema and regenerated the client. --- diff --git a/apps/docs/get-started/examples.mdx b/apps/docs/get-started/examples.mdx index 8969549..1214932 100644 --- a/apps/docs/get-started/examples.mdx +++ b/apps/docs/get-started/examples.mdx @@ -100,7 +100,7 @@ npm run send ## React Email (TypeScript) -Pass a React Email component as `react` and the SDK renders it to HTML for you — no separate render step needed. +Pass a React Email component as `react` and the SDK renders it to HTML for you, so no separate render step is needed. ```json package.json { @@ -242,7 +242,7 @@ console.log("Queued email", data.emailId); ## Next.js (App Router) -Send from a route handler, and receive [webhooks](/guides/webhooks) in another. Keep your API key on the server — never import the SDK in a client component. +Send from a route handler, and receive [webhooks](/guides/webhooks) in another. Keep your API key on the server and never import the SDK in a client component. ```ts app/api/welcome/route.ts import { ByteSend } from "bytesend-js"; @@ -272,7 +272,7 @@ import { Webhooks } from "bytesend-js"; const webhooks = new Webhooks(process.env.BYTESEND_WEBHOOK_SECRET!); export async function POST(request: Request) { - // Verify against the raw body — parsing JSON first breaks the signature. + // Verify against the raw body: parsing JSON first breaks the signature. const rawBody = await request.text(); try { diff --git a/apps/docs/get-started/go.mdx b/apps/docs/get-started/go.mdx index a6fbe42..5359f80 100644 --- a/apps/docs/get-started/go.mdx +++ b/apps/docs/get-started/go.mdx @@ -260,8 +260,8 @@ fmt.Println("Contact ID:", resp.ContactID) resp, err := client.Contacts.List(ctx, "cb_contactbook_id", bytesend.ListContactsParams{ Page: "1", Limit: "100", - // Emails: "a@example.com,b@example.com" — filter by email addresses - // IDs: "ct_1,ct_2" — filter by contact IDs + // Emails: "a@example.com,b@example.com" : filter by email addresses + // IDs: "ct_1,ct_2" : filter by contact IDs }) if err != nil { log.Fatal(err) @@ -317,7 +317,7 @@ if err != nil { log.Fatal(err) } for _, domain := range resp { - fmt.Printf("%s — Status: %s\n", domain.Name, domain.Status) + fmt.Printf("%s (%s)\n", domain.Name, domain.Status) } ``` diff --git a/apps/docs/get-started/local.mdx b/apps/docs/get-started/local.mdx index 88c8528..80cf669 100644 --- a/apps/docs/get-started/local.mdx +++ b/apps/docs/get-started/local.mdx @@ -25,7 +25,7 @@ packages/ - [Node.js](https://nodejs.org) 20 or later - [pnpm](https://pnpm.io) 9 or later (`corepack enable` installs it automatically) -- [Docker](https://docs.docker.com/engine/install/) — used to run Postgres and Redis locally +- [Docker](https://docs.docker.com/engine/install/): used to run Postgres and Redis locally - An [AWS](https://aws.amazon.com) account with SES access (free tier works) ## Fork and Clone the Repo @@ -77,7 +77,7 @@ packages/ ln -s ../../.env apps/web/.env ``` ```powershell - # Windows (PowerShell — run as administrator) + # Windows (PowerShell: run as administrator) New-Item -ItemType SymbolicLink -Path apps\web\.env -Target ..\..\env ``` diff --git a/apps/docs/guides/admin-operations.mdx b/apps/docs/guides/admin-operations.mdx index 4e91fc0..56277b7 100644 --- a/apps/docs/guides/admin-operations.mdx +++ b/apps/docs/guides/admin-operations.mdx @@ -202,7 +202,7 @@ Give the Admin role only to people who manage billing or the team itself. Everyo ### Two-Factor Authentication -Turn on two-factor authentication in **Settings → Account** with any authenticator app. Store the recovery codes somewhere safe — they are the only way back in if you lose your device. If you sign in with GitHub, Google or Discord, enable 2FA on that provider too. +Turn on two-factor authentication in **Settings → Account** with any authenticator app. Store the recovery codes somewhere safe. They are the only way back in if you lose your device. If you sign in with GitHub, Google or Discord, enable 2FA on that provider too. ### API Key Management @@ -216,7 +216,7 @@ Admins should: ### Activity History ByteSend does not yet keep a team-visible audit log. To keep an eye on your account: -- Review your API keys regularly — the dashboard shows when each key was last used +- Review your API keys regularly. The dashboard shows when each key was last used - Subscribe a [webhook](/guides/webhooks) or [notification provider](/guides/notification-providers) to email and domain events - Check **Settings → Members** for unexpected members or pending invites diff --git a/apps/docs/guides/api-authentication.mdx b/apps/docs/guides/api-authentication.mdx index cc2b445..58c7b52 100644 --- a/apps/docs/guides/api-authentication.mdx +++ b/apps/docs/guides/api-authentication.mdx @@ -18,7 +18,7 @@ ByteSend API uses **Bearer token authentication** for all API endpoints. You can 4. Click **Generate New API Key** 5. Give your key a name (e.g., "Development", "Production") 6. Click **Create** -7. Copy the key immediately — you won't be able to see it again +7. Copy the key immediately. You won't be able to see it again 8. Store it securely (use environment variables, not in version control) ## Using Your API Key diff --git a/apps/docs/guides/campaigns.mdx b/apps/docs/guides/campaigns.mdx index eaa0352..0c764ec 100644 --- a/apps/docs/guides/campaigns.mdx +++ b/apps/docs/guides/campaigns.mdx @@ -23,7 +23,7 @@ Campaigns are different from **transactional emails** (which go to a single reci | ------- | --------- | ------------- | | Recipients | Contact book | Individual `to` address | | Personalization | Contact properties (`{{firstName}}`) | Custom per-request | -| Scheduling | Yes — schedule ahead | No | +| Scheduling | Yes, schedule ahead | No | | Unsubscribe | Automatic opt-out handling | Manual | | Use case | Marketing, newsletters | Receipts, alerts, auth codes | | Dashboard | Campaign analytics | Email logs | @@ -37,9 +37,9 @@ Campaigns are different from **transactional emails** (which go to a single reci 1. Go to [Campaigns](https://bytesend.cloud/campaigns) 2. Click **New Campaign** 3. Fill in: - - **Name** — internal label (not visible to recipients) - - **Subject** — email subject line - - **From address** — must use a [verified domain](https://bytesend.cloud/domains) + - **Name**: internal label (not visible to recipients) + - **Subject**: email subject line + - **From address**: must use a [verified domain](https://bytesend.cloud/domains) - **Reply-to** (optional) 4. Design your email in the built-in editor or paste HTML 5. Select the **contact book** to send to @@ -126,7 +126,7 @@ Subject: Hi {{firstName}}, here's what's new this month ```html

Hey {{firstName}},

-

You're on the {{plan}} plan — here's what's new for you.

+

You're on the {{plan}} plan. Here's what's new for you.

``` If a contact doesn't have a value for a variable, it renders as an empty string. See [Campaign Personalization](/guides/campaign-personalization) for advanced usage and fallback values. @@ -148,12 +148,12 @@ ByteSend automatically handles unsubscribes: After sending, view per-campaign metrics in the dashboard: -- **Delivered** — successfully reached the inbox -- **Opened** — recipient opened the email -- **Clicked** — recipient clicked a link -- **Bounced** — permanently undeliverable addresses -- **Complained** — marked as spam -- **Unsubscribed** — opted out via the unsubscribe link +- **Delivered**: successfully reached the inbox +- **Opened**: recipient opened the email +- **Clicked**: recipient clicked a link +- **Bounced**: permanently undeliverable addresses +- **Complained**: marked as spam +- **Unsubscribed**: opted out via the unsubscribe link You can also pull these via the [Analytics API](/api-reference/analytics/email-time-series). diff --git a/apps/docs/guides/connected-accounts.mdx b/apps/docs/guides/connected-accounts.mdx index be0e512..819b941 100644 --- a/apps/docs/guides/connected-accounts.mdx +++ b/apps/docs/guides/connected-accounts.mdx @@ -33,7 +33,7 @@ You need access to both addresses, the same as any other email change. If two-fa ## Verified emails only -ByteSend only accepts a provider sign-in when the provider has verified that email address. If you see *"That account's email address isn't verified with the provider"*, verify the email in your GitHub, Google or Discord settings, then try again — or sign in with your email address instead. +ByteSend only accepts a provider sign-in when the provider has verified that email address. If you see *"That account's email address isn't verified with the provider"*, verify the email in your GitHub, Google or Discord settings, then try again, or sign in with your email address instead. This protects your account: without it, anyone could add your email address to a new account on another service and use it to sign in to ByteSend as you. diff --git a/apps/docs/guides/contact-books.mdx b/apps/docs/guides/contact-books.mdx index ceed2a4..d5631fd 100644 --- a/apps/docs/guides/contact-books.mdx +++ b/apps/docs/guides/contact-books.mdx @@ -86,7 +86,7 @@ Every contact in a contact book has one of these statuses: | ------ | ----------- | | **Subscribed** | Active and will receive campaign emails | | **Pending** | Added but awaiting double opt-in confirmation | -| **Unsubscribed** | Opted out — will not receive campaign emails | +| **Unsubscribed** | Opted out, won't receive campaign emails | Contacts with **Pending** or **Unsubscribed** status are excluded from campaign sends. They will not receive any marketing emails from ByteSend. diff --git a/apps/docs/guides/deliverability.mdx b/apps/docs/guides/deliverability.mdx index 0f601fa..0d74b77 100644 --- a/apps/docs/guides/deliverability.mdx +++ b/apps/docs/guides/deliverability.mdx @@ -20,7 +20,7 @@ A hard bounce means the email was permanently undeliverable. The address doesn't | Threshold | Action | | --------- | ------ | -| Below **1.5%** | Healthy — no action | +| Below **1.5%** | Healthy, no action needed | | **1.5% – 2%** | Warning displayed in dashboard | | **2% or above** | Sending automatically blocked | @@ -30,7 +30,7 @@ A complaint is recorded when a recipient marks your email as spam. | Threshold | Action | | --------- | ------ | -| Below **0.08%** | Healthy — no action | +| Below **0.08%** | Healthy, no action needed | | **0.08% – 0.1%** | Warning displayed in dashboard | | **0.1% or above** | Sending automatically blocked | @@ -79,8 +79,8 @@ Remove addresses that have bounced, unsubscribed, or haven't engaged in 90+ days ByteSend handles DKIM signing automatically when you [verify your domain](https://bytesend.cloud/domains). Make sure you also configure: -- **SPF** — Add ByteSend to your domain's allowed senders -- **DMARC** — A DMARC record tells inbox providers what to do if authentication fails. Start with `p=none` to monitor, then move to `p=quarantine` once you've confirmed alignment. +- **SPF**: Add ByteSend to your domain's allowed senders +- **DMARC**: A DMARC record tells inbox providers what to do if authentication fails. Start with `p=none` to monitor, then move to `p=quarantine` once you've confirmed alignment. All three are shown in the domain verification flow in the dashboard. @@ -203,5 +203,5 @@ If your sending is blocked due to reputation thresholds: ## Related -- [Spam Protection](/guides/spam-protection) — outbound scoring and held emails -- [Changing Sending Region](/guides/sending-regions) — move a domain to another AWS region without downtime +- [Spam Protection](/guides/spam-protection): outbound scoring and held emails +- [Changing Sending Region](/guides/sending-regions): move a domain to another AWS region without downtime diff --git a/apps/docs/guides/plan-management.mdx b/apps/docs/guides/plan-management.mdx index 0d8e973..92bec4c 100644 --- a/apps/docs/guides/plan-management.mdx +++ b/apps/docs/guides/plan-management.mdx @@ -160,7 +160,7 @@ For detailed setup instructions: - **Rotate admin roles** to prevent over-privileging - **Review team members regularly** in your monthly management checklist - **Use different API keys** for different integrations -- **Never share API keys** between team members — generate individual keys +- **Never share API keys** between team members. Generate individual keys ### Offboarding Team Members diff --git a/apps/docs/guides/sending-regions.mdx b/apps/docs/guides/sending-regions.mdx index 1e44271..b9dd667 100644 --- a/apps/docs/guides/sending-regions.mdx +++ b/apps/docs/guides/sending-regions.mdx @@ -6,7 +6,7 @@ icon: globe ## Overview -Every domain sends from one AWS SES region, chosen when you add it. You can move a verified domain to another region — for example to keep data in the EU, or to sit closer to your recipients — without any downtime. +Every domain sends from one AWS SES region, chosen when you add it. You can move a verified domain to another region without any downtime, for example to keep data in the EU or to sit closer to your recipients. Only team **Admins** can change a domain's region. @@ -21,7 +21,7 @@ Your domain keeps sending from its current region for the whole move. ByteSend r Open the domain in the dashboard, select **Change region** in the **Sending region** card and choose the new region. - Add the new `TXT` record shown on the domain page. Its name includes the region (for example `bytesend-eu-west-2._domainkey`), so it sits **alongside** your existing DKIM record — don't delete the old one yet. + Add the new `TXT` record shown on the domain page. Its name includes the region (for example `bytesend-eu-west-2._domainkey`), so it sits **alongside** your existing DKIM record. Don't delete the old one yet. Change the `MX` record on your `mail.` subdomain to the new region's value, for example `feedback-smtp.eu-west-2.amazonses.com`. Replace the old value; don't add a second record. Your SPF record does not change. diff --git a/apps/docs/guides/spam-protection.mdx b/apps/docs/guides/spam-protection.mdx index e0ad5a3..1e6f50c 100644 --- a/apps/docs/guides/spam-protection.mdx +++ b/apps/docs/guides/spam-protection.mdx @@ -6,7 +6,7 @@ icon: shield-halved ## Overview -Every email you send through the API, the SMTP relay or a campaign is scored by ByteSend's spam protection before it is queued. It protects your domain's reputation — and every other customer's — from compromised API keys, phishing and accidental spam. +Every email you send through the API, the SMTP relay or a campaign is scored by ByteSend's spam protection before it is queued. It protects your domain's reputation, and every other customer's, from compromised API keys, phishing and accidental spam. Most mail never notices it: ordinary transactional email such as password resets, verification codes and receipts scores well below the thresholds. @@ -64,5 +64,5 @@ If five of a team's messages are held within 24 hours, sending is blocked for th - **Include real text.** An email that is a single image with no text looks like spam to every filter, not just ByteSend's. -Think a legitimate email was held? Contact support on [Discord](https://discord.gg/C2Q4GHXKQA) with the email ID — reviews also help ByteSend tune the rules. +Think a legitimate email was held? Contact support on [Discord](https://discord.gg/C2Q4GHXKQA) with the email ID. Reviews also help ByteSend tune the rules. diff --git a/apps/docs/guides/use-with-react-email.mdx b/apps/docs/guides/use-with-react-email.mdx index 539430a..10a04d8 100644 --- a/apps/docs/guides/use-with-react-email.mdx +++ b/apps/docs/guides/use-with-react-email.mdx @@ -84,7 +84,7 @@ See the complete [React Email TypeScript example](/get-started/examples#react-em ### JavaScript -Use `.jsx` files and run them with `tsx` — it handles JSX without any Babel configuration: +Use `.jsx` files and run them with `tsx`, which handles JSX without any Babel configuration: ```sh npx tsx send.jsx diff --git a/apps/docs/self-hosting/admin-panel.mdx b/apps/docs/self-hosting/admin-panel.mdx index 4b4753e..4baf11b 100644 --- a/apps/docs/self-hosting/admin-panel.mdx +++ b/apps/docs/self-hosting/admin-panel.mdx @@ -55,7 +55,7 @@ Message bodies are hidden in the email explorer until you choose **View content* Every day at 04:30 UTC, ByteSend checks each verified sending domain against the Spamhaus Domain Block List, SURBL and URIBL, and posts newly listed domains to the Discord webhook in `DISCORD_WEBHOOK_URL`. Checks are kept for 30 days. -These lists refuse queries that come through large public DNS resolvers, which most cloud servers use. ByteSend shows those results as **Unknown** rather than reporting a false "clean". For reliable Spamhaus results, set `SPAMHAUS_DQS_KEY` — see [environment variables](/self-hosting/docker#environment-variable-reference). +These lists refuse queries that come through large public DNS resolvers, which most cloud servers use. ByteSend shows those results as **Unknown** rather than reporting a false "clean". For reliable Spamhaus results, set `SPAMHAUS_DQS_KEY` (see [environment variables](/self-hosting/docker#environment-variable-reference)). ByteSend sends through Amazon's shared SES IP addresses, so only your sending **domains** are checked, not IPs. diff --git a/apps/docs/self-hosting/certificates.mdx b/apps/docs/self-hosting/certificates.mdx index 5cd1b9e..f5c8d70 100644 --- a/apps/docs/self-hosting/certificates.mdx +++ b/apps/docs/self-hosting/certificates.mdx @@ -39,9 +39,9 @@ sudo certbot certonly --webroot \ -d smtp.example.com ``` -### Method 3: DNS challenge (recommended — no open ports required) +### Method 3: DNS challenge (recommended: no open ports required) -The DNS challenge is the cleanest approach for an SMTP server. It requires no open HTTP port at any point — certbot proves domain ownership by adding a temporary DNS TXT record instead. +The DNS challenge is the cleanest approach for an SMTP server. It requires no open HTTP port at any point: certbot proves domain ownership by adding a temporary DNS TXT record instead. **Manual (one-time / test):** @@ -74,7 +74,7 @@ sudo certbot certonly \ -d smtp.example.com ``` -Other provider plugins: `certbot-dns-route53`, `certbot-dns-digitalocean`, `certbot-dns-google`, etc. — see the [certbot documentation](https://certbot.eff.org/docs/using.html#dns-plugins) for a full list. +Other provider plugins: `certbot-dns-route53`, `certbot-dns-digitalocean`, `certbot-dns-google`, etc. See the [certbot documentation](https://certbot.eff.org/docs/using.html#dns-plugins) for a full list. Use a scoped API token with only **Zone → DNS → Edit** permissions for the target zone. Never use a global API key. @@ -112,7 +112,7 @@ EOF sudo chmod +x /etc/letsencrypt/renewal-hooks/post/bytesend-smtp.sh ``` -The ByteSend SMTP Server watches certificate files for changes and reloads TLS automatically — no restart required. +The ByteSend SMTP Server watches certificate files for changes and reloads TLS automatically, so no restart is required. --- @@ -136,8 +136,8 @@ openssl req -x509 -newkey rsa:4096 -sha256 -days 365 -nodes \ ``` This produces: -- `fullchain.pem` — self-signed certificate -- `privkey.pem` — private key +- `fullchain.pem`: self-signed certificate +- `privkey.pem`: private key Configure the server: @@ -247,7 +247,7 @@ The process running the server must be able to read both files. Private keys are **Systemd service (runs as `smtp` user):** ```bash -# Grant read access using ACLs (recommended — preserves existing permissions) +# Grant read access using ACLs (recommended: preserves existing permissions) sudo setfacl -R -m u:smtp:rx /etc/letsencrypt/live/smtp.example.com/ sudo setfacl -R -m u:smtp:rx /etc/letsencrypt/archive/smtp.example.com/ diff --git a/apps/docs/self-hosting/docker.mdx b/apps/docs/self-hosting/docker.mdx index c043992..58dfa04 100644 --- a/apps/docs/self-hosting/docker.mdx +++ b/apps/docs/self-hosting/docker.mdx @@ -11,7 +11,7 @@ This guide covers the fastest path to a running ByteSend instance using Docker C - [Docker Engine](https://docs.docker.com/engine/install/) 24+ - [Docker Compose](https://docs.docker.com/compose/) v2 (included with Docker Desktop) - A domain name pointing to your server (for production) -- AWS credentials with SES access — see [Create AWS Credentials](/get-started/create-aws-credentials) +- AWS credentials with SES access: see [Create AWS Credentials](/get-started/create-aws-credentials) --- diff --git a/apps/docs/self-hosting/firewall.mdx b/apps/docs/self-hosting/firewall.mdx index cd14e93..f5a8977 100644 --- a/apps/docs/self-hosting/firewall.mdx +++ b/apps/docs/self-hosting/firewall.mdx @@ -26,13 +26,13 @@ sudo ufw allow 22/tcp Open the ports your clients need. At minimum allow 587; add the others as required: ```bash -# Port 25 — MTA / inter-server (often blocked by cloud providers) +# Port 25: MTA / inter-server (often blocked by cloud providers) sudo ufw allow 25/tcp -# Port 465 — Implicit TLS (SMTPS) +# Port 465: Implicit TLS (SMTPS) sudo ufw allow 465/tcp -# Port 587 — Submission with STARTTLS (most common) +# Port 587: Submission with STARTTLS (most common) sudo ufw allow 587/tcp # Alternate ports used by ByteSend SMTP (optional) diff --git a/apps/docs/self-hosting/overview.mdx b/apps/docs/self-hosting/overview.mdx index 353df26..9d98fe8 100644 --- a/apps/docs/self-hosting/overview.mdx +++ b/apps/docs/self-hosting/overview.mdx @@ -5,8 +5,8 @@ description: "An end-to-end guide on how to self-host ByteSend using Docker or a ByteSend is fully self-hostable. This guide covers two deployment paths: -- **[Docker (recommended)](#docker-deployment)** — spin up the entire stack with a single `docker compose` command -- **[Manual / bare-metal](#manual-deployment)** — install directly on a Linux server using Node.js and pnpm +- **[Docker (recommended)](#docker-deployment)**: spin up the entire stack with a single `docker compose` command +- **[Manual / bare-metal](#manual-deployment)**: install directly on a Linux server using Node.js and pnpm If you have questions, join [#self-host](https://discord.gg/C2Q4GHXKQA) on Discord. @@ -58,7 +58,7 @@ At minimum, set the following variables: NEXTAUTH_URL=https://your-domain.com NEXTAUTH_SECRET= -# Database (managed by compose — change password) +# Database (managed by compose: change password) POSTGRES_PASSWORD= DATABASE_URL=postgresql://bytesend:@postgres:5432/bytesend @@ -70,11 +70,11 @@ AWS_ACCESS_KEY= AWS_SECRET_KEY= AWS_DEFAULT_REGION=eu-west-1 -# GitHub OAuth (optional — enables social sign-in) +# GitHub OAuth (optional: enables social sign-in) GITHUB_ID= GITHUB_SECRET= -# Stripe (optional — enables billing) +# Stripe (optional: enables billing) STRIPE_SECRET_KEY= STRIPE_WEBHOOK_SECRET= ``` @@ -110,7 +110,7 @@ docker compose -f docker/prod/compose.yml --env-file docker/prod/.env logs -f we The app is now accessible at **http://your-server-ip:3000**. -Port 3000 should not be exposed directly in production. Set up a reverse proxy (nginx or Traefik) in front of it and configure HTTPS. See [Reverse Proxy Setup](./reverse-proxy) for the SMTP server guide — the same nginx patterns apply. +Port 3000 should not be exposed directly in production. Set up a reverse proxy (nginx or Traefik) in front of it and configure HTTPS. See [Reverse Proxy Setup](./reverse-proxy) for the SMTP server guide. The same nginx patterns apply. --- diff --git a/apps/docs/self-hosting/reverse-proxy.mdx b/apps/docs/self-hosting/reverse-proxy.mdx index 3ec1d38..604c23d 100644 --- a/apps/docs/self-hosting/reverse-proxy.mdx +++ b/apps/docs/self-hosting/reverse-proxy.mdx @@ -11,7 +11,7 @@ A reverse proxy sits in front of the SMTP server and handles TLS termination. Th - The SMTP process runs as a non-root user and cannot bind to privileged ports (25, 465, 587) directly **When to skip it:** -- You want the simplest possible setup — use `SMTP_TLS_MODE=manual` with certbot instead. See [Certificate Setup](./certificates). +- You want the simplest possible setup: use `SMTP_TLS_MODE=manual` with certbot instead. See [Certificate Setup](./certificates). --- @@ -19,9 +19,9 @@ A reverse proxy sits in front of the SMTP server and handles TLS termination. Th Nginx proxies raw TCP (SMTP) via its `stream` module. Each port requires its own `server` block. -The `stream` module is separate from the `http` module. Ensure your nginx build includes it (`nginx -V 2>&1 | grep stream`), and place the `stream {}` block at the top level of `nginx.conf` — **not** inside `http {}`. +The `stream` module is separate from the `http` module. Ensure your nginx build includes it (`nginx -V 2>&1 | grep stream`), and place the `stream {}` block at the top level of `nginx.conf`, **not** inside `http {}`. -### Port 587 — Submission with STARTTLS +### Port 587: Submission with STARTTLS The most common port for application/client email sending. Nginx terminates TLS; the backend receives plain TCP on `127.0.0.1:587` with `SMTP_TLS_MODE=none`. @@ -42,7 +42,7 @@ stream { } ``` -### Port 465 — Implicit TLS (SMTPS) +### Port 465: Implicit TLS (SMTPS) Used by clients that require an SSL-wrapped connection from the start (no STARTTLS negotiation). Add a second `server` block in the same `stream {}` context: @@ -56,7 +56,7 @@ stream { server 127.0.0.1:465; } - # Port 587 — STARTTLS + # Port 587: STARTTLS server { listen 587 ssl; proxy_pass smtp_submission; @@ -66,7 +66,7 @@ stream { ssl_protocols TLSv1.2 TLSv1.3; } - # Port 465 — Implicit TLS + # Port 465: Implicit TLS server { listen 465 ssl; proxy_pass smtp_smtps; @@ -78,9 +78,9 @@ stream { } ``` -### Port 25 — MTA (Plain / Inter-server) +### Port 25: MTA (Plain / Inter-server) -Port 25 is used by other mail servers (MX delivery) and typically does **not** need TLS termination at the proxy — pass it straight through. If you do want nginx to sit in front, use a plain TCP proxy without SSL: +Port 25 is used by other mail servers (MX delivery) and typically does **not** need TLS termination at the proxy, so pass it straight through. If you do want nginx to sit in front, use a plain TCP proxy without SSL: ```nginx stream { @@ -88,7 +88,7 @@ stream { server 127.0.0.1:25; } - # Port 25 — plain passthrough (no TLS termination) + # Port 25: plain passthrough (no TLS termination) server { listen 25; proxy_pass smtp_mta; diff --git a/apps/docs/self-hosting/security.mdx b/apps/docs/self-hosting/security.mdx index 62b6071..345656a 100644 --- a/apps/docs/self-hosting/security.mdx +++ b/apps/docs/self-hosting/security.mdx @@ -137,7 +137,7 @@ However, the ByteSend SMTP Server currently binds to all interfaces. For isolati 1. **Firewall rules** (ufw, cloud security groups) to restrict access by IP 2. **Reverse proxy** (nginx, Traefik) in front to terminate TLS and apply rate limits -3. **VPN/private network** — run the server on an internal network and expose via VPN only +3. **VPN/private network**: run the server on an internal network and expose via VPN only ### Restrict by IP @@ -163,7 +163,7 @@ sudo ufw delete allow 25/tcp - Use **Let's Encrypt** (free, trusted by all clients) - Avoid **self-signed certs** in production -- Renew **before expiry** — set up certbot auto-renewal +- Renew **before expiry**: set up certbot auto-renewal See the [Certificate Setup](./certificates) guide for full details. @@ -259,7 +259,7 @@ Port 25 is the standard MTA port and is often targeted by spammers. If you're no 1. **Disable port 25** and use only 465/587 for outbound submission 2. **Implement SPF/DKIM/DMARC** records to help other servers validate your emails -3. **Monitor bounce rates** — reject undeliverable emails early to reduce spam bounce-back +3. **Monitor bounce rates**: reject undeliverable emails early to reduce spam bounce-back Most cloud providers block port 25 outbound by default, so if you only need outbound SMTP, use port 587 instead. @@ -285,7 +285,7 @@ Detailed AppArmor/SELinux profiles for ByteSend SMTP are beyond the scope here, Although the SMTP server is stateless, consider backing up: -- `.env` file (contains API keys — encrypt before backup!) +- `.env` file (contains API keys, so encrypt before backup!) - Certificate files (for reference) - Logs (for audit/forensics) diff --git a/apps/docs/self-hosting/smtp-server.mdx b/apps/docs/self-hosting/smtp-server.mdx index 5aff40f..3f69496 100644 --- a/apps/docs/self-hosting/smtp-server.mdx +++ b/apps/docs/self-hosting/smtp-server.mdx @@ -45,8 +45,8 @@ The server supports two TLS configurations: - **STARTTLS** on ports 25, 587, 2587 (clients upgrade to encrypted) - **Implicit TLS (SMTPS)** on ports 465, 2465 (encrypted from the start) - Requires: - - `SMTP_TLS_CERT_PATH` — full certificate chain (PEM format) - - `SMTP_TLS_KEY_PATH` — private key (PEM format) + - `SMTP_TLS_CERT_PATH`: full certificate chain (PEM format) + - `SMTP_TLS_KEY_PATH`: private key (PEM format) - Certificates reload automatically when files change (zero-downtime renewal) --- @@ -175,8 +175,8 @@ If you prefer to build the image locally: | `SMTP_AUTH_USERNAME` | `bytesend` | Optional legacy fallback if SMTP client omits username | | `BYTESEND_BASE_URL` | `https://bytesend.cloud` | URL to your ByteSend instance (e.g., `https://api.example.com`) | | `SMTP_TLS_MODE` | `none` | TLS mode: `none` or `manual` | -| `SMTP_TLS_CERT_PATH` | — | Path to certificate file (required if `SMTP_TLS_MODE=manual`) | -| `SMTP_TLS_KEY_PATH` | — | Path to private key file (required if `SMTP_TLS_MODE=manual`) | +| `SMTP_TLS_CERT_PATH` | None | Path to certificate file (required if `SMTP_TLS_MODE=manual`) | +| `SMTP_TLS_KEY_PATH` | None | Path to private key file (required if `SMTP_TLS_MODE=manual`) | | `NODE_ENV` | `production` | Set to `production` for production use | ### Using `.env` Files @@ -233,7 +233,7 @@ To run the SMTP server behind nginx or Traefik (with `SMTP_TLS_MODE=none`), see ## Firewall Setup -To configure UFW rules for SMTP ports — including the Docker + UFW bypass issue — see the [Firewall Setup](./firewall) guide. +To configure UFW rules for SMTP ports, including the Docker + UFW bypass issue, see the [Firewall Setup](./firewall) guide. --- diff --git a/apps/web/src/app/(dashboard)/admin/teams/[teamId]/page.tsx b/apps/web/src/app/(dashboard)/admin/teams/[teamId]/page.tsx index 8042524..8958d51 100644 --- a/apps/web/src/app/(dashboard)/admin/teams/[teamId]/page.tsx +++ b/apps/web/src/app/(dashboard)/admin/teams/[teamId]/page.tsx @@ -262,7 +262,7 @@ export default function AdminTeamDetailPage() { ) : ( - No Stripe subscription{team.plan !== "FREE" ? " — plan was assigned manually" : ""}. + No Stripe subscription{team.plan !== "FREE" ? " (plan was assigned manually)" : ""}. )} diff --git a/apps/web/src/app/(dashboard)/admin/teams/_components/assign-plan-card.tsx b/apps/web/src/app/(dashboard)/admin/teams/_components/assign-plan-card.tsx index 2bf9497..286c657 100644 --- a/apps/web/src/app/(dashboard)/admin/teams/_components/assign-plan-card.tsx +++ b/apps/web/src/app/(dashboard)/admin/teams/_components/assign-plan-card.tsx @@ -15,10 +15,10 @@ import { api } from "~/trpc/react"; const PLAN_OPTIONS: Array<{ value: Plan; label: string }> = [ { value: "FREE", label: "Free" }, - { value: "HOBBY", label: "Hobby — CA$5/mo" }, - { value: "LITE", label: "Lite — CA$10/mo" }, - { value: "BASIC", label: "Pro — CA$30/mo" }, - { value: "LIFETIME", label: "Lifetime — CA$199 one-time" }, + { value: "HOBBY", label: "Hobby (CA$5/mo)" }, + { value: "LITE", label: "Lite (CA$10/mo)" }, + { value: "BASIC", label: "Pro (CA$30/mo)" }, + { value: "LIFETIME", label: "Lifetime (CA$199 one-time)" }, ]; export function AssignPlanCard({ teamId, currentPlan }: { teamId: number; currentPlan: Plan }) { diff --git a/apps/web/src/app/(dashboard)/broadcasts/create-broadcast.tsx b/apps/web/src/app/(dashboard)/broadcasts/create-broadcast.tsx index 2bafa38..898f592 100644 --- a/apps/web/src/app/(dashboard)/broadcasts/create-broadcast.tsx +++ b/apps/web/src/app/(dashboard)/broadcasts/create-broadcast.tsx @@ -83,7 +83,7 @@ export default function CreateBroadcast() { Name diff --git a/apps/web/src/app/(dashboard)/domains/[domainId]/page.tsx b/apps/web/src/app/(dashboard)/domains/[domainId]/page.tsx index 1214f71..d5f2693 100644 --- a/apps/web/src/app/(dashboard)/domains/[domainId]/page.tsx +++ b/apps/web/src/app/(dashboard)/domains/[domainId]/page.tsx @@ -95,7 +95,7 @@ export default function DomainItemPage({ { onSuccess: () => { toast.success( - "DKIM keys regenerated — update the TXT record in your DNS with the new value below, then click Verify.", + "DKIM keys regenerated. Update the TXT record in your DNS with the new value below, then click Verify.", ); utils.domain.getDomain.invalidate({ id: Number(domainId) }); }, @@ -297,7 +297,7 @@ export default function DomainItemPage({

- DKIM record not yet found in DNS. Propagation can take up to 48 hours — make sure you've added the TXT record exactly as shown below. + DKIM record not yet found in DNS. Propagation can take up to 48 hours, so make sure you've added the TXT record exactly as shown below.

)} @@ -554,7 +554,7 @@ const DomainSettings: React.FC<{ domain: DomainResponse }> = ({ domain }) => {

Open tracking

- Embed a 1×1 pixel to detect opens — may affect deliverability + Embed a 1×1 pixel to detect opens. May affect deliverability

{ - toast.success("Region move started — add the new DNS records below"); + toast.success("Region move started. Add the new DNS records below."); onOpenChange(false); await utils.domain.getDomain.invalidate({ id: domain.id }); }, @@ -116,7 +116,7 @@ export function RegionMoveCard({ domain }: { domain: DomainResponse }) { toast.info( missing.length ? `Not visible in DNS yet: ${missing.join(" and ")}. DNS changes can take up to an hour.` - : "Records found — waiting for AWS to confirm. This usually takes a few minutes.", + : "Records found. Waiting for AWS to confirm. This usually takes a few minutes.", ); } await utils.domain.getDomain.invalidate({ id: domain.id }); diff --git a/apps/web/src/app/(dashboard)/domains/add-domain.tsx b/apps/web/src/app/(dashboard)/domains/add-domain.tsx index c152b7e..101908e 100644 --- a/apps/web/src/app/(dashboard)/domains/add-domain.tsx +++ b/apps/web/src/app/(dashboard)/domains/add-domain.tsx @@ -237,7 +237,7 @@ export default function AddDomain() { )} {!isAtLimit && (

- Need more domains? Purchase extra slots — CA$1/mo each. + Need more domains? Purchase extra slots for CA$1/mo each.

)} diff --git a/apps/web/src/app/(dashboard)/settings/account/connected-accounts.tsx b/apps/web/src/app/(dashboard)/settings/account/connected-accounts.tsx index 1410dd9..0cf991a 100644 --- a/apps/web/src/app/(dashboard)/settings/account/connected-accounts.tsx +++ b/apps/web/src/app/(dashboard)/settings/account/connected-accounts.tsx @@ -85,7 +85,7 @@ export function ConnectedAccounts({

{meta.name}

- {account ? (account.email ?? "Connected — reconnect to see its email") : "Not connected"} + {account ? (account.email ?? "Connected. Reconnect to see its email") : "Not connected"}

diff --git a/apps/web/src/app/(dashboard)/settings/team/invite-team-member.tsx b/apps/web/src/app/(dashboard)/settings/team/invite-team-member.tsx index c01ae7a..896dc20 100644 --- a/apps/web/src/app/(dashboard)/settings/team/invite-team-member.tsx +++ b/apps/web/src/app/(dashboard)/settings/team/invite-team-member.tsx @@ -268,7 +268,7 @@ export default function InviteTeamMember() { )} {!isAtLimit && (

- Need more seats? Purchase extra member slots — CA$2/mo each. + Need more seats? Purchase extra member slots for CA$2/mo each.

)}
{[ - { service: "Simple Analytics", purpose: "Aggregate, privacy-friendly analytics", cookies: "None — no cookies or fingerprinting" }, + { service: "Simple Analytics", purpose: "Aggregate, privacy-friendly analytics", cookies: "None (no cookies or fingerprinting)" }, { service: "Stripe", purpose: "Payment processing (billing pages only)", cookies: "Stripe sets cookies for fraud prevention and session management on payment flows" }, ].map(({ service, purpose, cookies }) => ( diff --git a/apps/web/src/app/(marketing)/dmca/page.tsx b/apps/web/src/app/(marketing)/dmca/page.tsx index b21c2c1..b42e69a 100644 --- a/apps/web/src/app/(marketing)/dmca/page.tsx +++ b/apps/web/src/app/(marketing)/dmca/page.tsx @@ -76,7 +76,7 @@ export default function DmcaPage() {

-

Copyright Agent — NodeByte LTD

+

Copyright Agent: NodeByte LTD

Designated agent for copyright matters

(
diff --git a/apps/web/src/app/(marketing)/legal/page.tsx b/apps/web/src/app/(marketing)/legal/page.tsx index 5939736..0608b27 100644 --- a/apps/web/src/app/(marketing)/legal/page.tsx +++ b/apps/web/src/app/(marketing)/legal/page.tsx @@ -25,7 +25,7 @@ const policies = [ { href: "/acceptable-use", title: "Acceptable Use Policy", - description: "Rules for sending email via ByteSend — consent, suppression, prohibited content, and enforcement.", + description: "Rules for sending email via ByteSend: consent, suppression, prohibited content, and enforcement.", updated: "7 May 2026", }, { diff --git a/apps/web/src/app/(marketing)/privacy/page.tsx b/apps/web/src/app/(marketing)/privacy/page.tsx index 4ea70ee..ceff13f 100644 --- a/apps/web/src/app/(marketing)/privacy/page.tsx +++ b/apps/web/src/app/(marketing)/privacy/page.tsx @@ -135,7 +135,7 @@ export default function PrivacyPage() {
{term}