diff --git a/.references/deploy-v0.7.0.md b/.references/deploy-v0.7.0.md new file mode 100644 index 0000000..6c45255 --- /dev/null +++ b/.references/deploy-v0.7.0.md @@ -0,0 +1,68 @@ +# Deploying v0.7.0 + +Checklist for shipping v0.7.0 (new pricing, dashboard overview, domain monitoring, new-account limit) to ByteSend Cloud. Do it in this order. Items marked **(if not done)** carry over from v0.5.0 and v0.6.0. + +## 1. Before deploying + +- [ ] **Check VAT with your accountant.** NodeByte is UK-registered, so UK customers are charged 20% VAT once you're VAT-registered (required above £90k turnover a year). EU consumers need EU VAT via the OSS scheme from the first sale, because there's no threshold for non-EU sellers of digital services. EU businesses with a VAT number are reverse-charged. US sales tax only applies once you pass a state's threshold. Stripe Tax monitors these thresholds for you. +- [ ] **Turn on Stripe Tax** (Stripe dashboard → Tax): + - Set the origin address to NodeByte's UK address. + - Set the product tax code to *Software as a service (SaaS), business use* (`txcd_10103001`). + - Add a registration for **United Kingdom**, and for **EU (OSS)** once you've registered. + - The seed creates every price (all currencies) as tax-exclusive, so VAT is added on top of $5 / $20 / $90. +- [ ] **Decide what to do about existing CAD customers.** A Stripe customer who has been billed in CAD can't be moved to a USD price. Existing subscribers keep working as they are, but if one of them changes plan, checkout or the portal will refuse. You have two options: + - add `cad` to `currencyOptions()` in `packages/lib/src/stripe/seed.ts`, with suggested amounts CA$7 / CA$28 / CA$125; or + - handle these customers by hand: cancel at period end, then resubscribe them under a new customer. + + There are few of them, so doing it by hand is fine for now. +- [ ] **Check custom contracts.** `customMonthlyPriceCents` was entered in CAD but now displays with `$`. Re-enter it in USD for any team with a custom plan (Admin → Teams → team → Custom plan). + +## 2. Deploy + +- [ ] **Set env vars** on the web app: + - `STRIPE_AUTOMATIC_TAX=true`, only after Stripe Tax is set up. If it's on without a registration, checkout fails. + - `DISCORD_LINKED_ROLES_CLIENT_ID` and `DISCORD_LINKED_ROLES_CLIENT_SECRET` **(if not done)**. These go on the web app, not the bot. +- [ ] **Run migrations** with `pnpm db:migrate-deploy` (or `prisma migrate deploy`). Pending since v0.6.0: + - `20261020000000_add_blocklist` + - `20261020010000_new_team_ramp_and_domain_age` + - `20261020020000_usage_alerts_and_domain_health` + - `20261020030000_add_scale_plan` (adds `SCALE` to the `Plan` enum) +- [ ] **Re-seed Stripe**: run `pnpm stripe:seed:prod`. + - It archives the old products and creates Starter, Pro and Scale with USD prices plus GBP and EUR `currency_options`. Prices are tagged `metadata.pricing = 2026-10-usd`. + - It skips Lite and Lifetime. + - It reuses the existing usage meters, so overage for current subscribers keeps reporting. + - Archived products and prices keep billing existing subscriptions. Plans are resolved from `price.metadata.plan`, so nobody gets downgraded. + - Check the output for the new `STRIPE_SCALE_*` price IDs; they're stored in `AppSetting` in whichever database `DATABASE_URL` points at. + - Run it once. Recreate mode is on, so a second run archives the products the first one made. + - Webhook registration uses `NEXTAUTH_URL`. With a localhost URL it's skipped, and the existing prod endpoint is left as it is. +- [ ] Deploy the web app, and restart the worker so the domain health job (twice daily) gets scheduled. + +## 3. Stripe dashboard after seeding + +- [ ] **Customer portal** (live mode, Settings → Billing → Customer portal): + - Turn on **Customers can switch plans**. Remove the archived products, and add ByteSend Starter, Pro and Scale with their $ monthly price. GBP and EUR come from the same price. + - Don't add the add-ons, Lite or Lifetime. + - Set downgrades to apply at the end of the billing period, and cancellations to take effect at period end. + - The portal only swaps the monthly price. The webhook then moves the overage prices to match, so this needs the v0.7.0 web app deployed. +- [ ] Do a test checkout with a UK and an EU address, and confirm it shows £ or € and adds VAT. +- [ ] Check that one existing CAD subscriber still shows their plan on Settings → Billing. + +## 4. Things that change for existing users + +- **Free teams drop from 12,500 to 5,000 emails a month, and from 5,000 to 200 a day, as soon as you deploy.** Announce this first: email free teams and post in Discord, ideally a week ahead. Teams already over 5,000 this month are stopped until the month resets. +- New free teams are limited to 50 emails a day for their first 7 days. Admins can lift this per team (Admin → Teams → team → Approve sending). +- Lite and Lifetime teams keep everything. Their billing page shows a "legacy plan" note. +- Paid subscribers keep their CAD price until they change plan. + +## 5. Carry-overs (if not done) + +- [ ] **Discord bot env:** `EVENT_LOG_CHANNEL_ID`, `MEMBER_ROLE_ID`, `BOT_ROLE_ID`. In the Developer Portal, enable the **Server Members** intent. Give the bot **Manage Roles**, with its role placed above Members and Bots. +- [ ] **S3 uploads 403:** add a public-read bucket policy for the uploads prefix (or put CloudFront in front), and make sure `S3_REGION` matches the bucket's region. +- [ ] **SES callbacks:** in Admin → SES regions, run **Repair** on us-east-1 (event destination pointing at the `-full` topic). In ca-central-1, fix the subscription whose callback URL has a doubled path. +- [ ] **Status page:** rename the component to "US West (N. California)". +- [ ] **GitHub:** check that CODEOWNERS and branch protection on `ByteSendApp/ByteSend` use the new org's teams. + +## 6. Release + +- [ ] Tag `v0.7.0` from `main` after merging `develop` (see `release-playbook.md`). CHANGELOG already has the `[0.7.0]` section. +- [ ] Post the announcement: new prices, Scale plan, local currency, the free plan change and the new-account limit. diff --git a/CHANGELOG.md b/CHANGELOG.md index 230ad82..fbc4764 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 --- +## [0.7.0] - 2026-10-19 + +### Added +- **Dashboard overview**: the dashboard home now opens with a getting-started checklist, sending status (and exactly why sending is limited, when it is), usage against the monthly and daily limits, 7-day bounce and complaint rates against the pause thresholds, domain health and recent emails, above the existing analytics +- **Domain DNS monitoring**: verified domains are re-checked twice a day, and if their DKIM, SPF or MAIL FROM records change, team admins are emailed (once the problem shows on two checks in a row) and again when it's fixed. The domain page shows the problem while it lasts +- **Usage alerts for paid plans**: teams on paid plans are told at 80% and 100% of the emails included in their plan, once each per month +- **Team notifications work**: Discord, Slack, Teams, Telegram and webhook providers now receive events. Previously nothing was ever sent to them. Domain verified/failed, DNS problems, usage alerts and campaign started/completed go to every provider. Per-email events (sent, delivered, bounced, complained, opened, clicked) and contact events are opt-in per provider and capped at 20 per minute per provider, so a busy team can't flood a channel +- **Domain age**: new sending domains are looked up over RDAP. Domains registered in the last 30 days score higher in spam protection, and admins are alerted when one is added +- Admins can approve a new team's sending early from the team page +- **Scale plan**: $90/mo with 500,000 emails included, 30 domains and 50 team members, and the lowest overage rates +- **Local prices and tax**: Checkout shows set prices in pounds and euros for UK and European customers, and can add VAT and sales tax with Stripe Tax (`STRIPE_AUTOMATIC_TAX=true`), including VAT number collection for businesses + +### Changed +- **New pricing, now in US dollars**: Starter (was Hobby) $5/mo for 25,000 emails, Pro $20/mo for 100,000 and Scale $90/mo for 500,000, with lower overage rates. Existing subscribers keep the price they signed up at +- **Free plan** now includes 5,000 emails a month and 200 a day (was 12,500 a month and 5,000 a day) +- Lite and Lifetime are no longer sold. Teams already on them keep their plan, limits and price +- **New-account limit**: free teams can send 50 emails a day during their first 7 days. Paying teams, custom plans and admin-approved teams are exempt +- The admin panel now uses the main sidebar for its sections instead of a second navigation column +- "Analytics" in the sidebar is now "Overview" +- **New logo**: the Ribbon (an envelope inside a send arrow) is the main logo, and the Send B monogram is the app icon, favicon and team badge. Both are in `public/brand/` as SVGs, wordmarks, app icons and avatars + +### Fixed +- A subscription's plan is read from its Stripe price, so re-seeding Stripe prices can no longer drop an existing subscriber to the free plan +- Changing plan in the Stripe customer portal now moves the overage prices to the new plan too. Previously only the monthly price changed, so extra emails kept being billed at the old plan's rates +- Removed the unused `stripe-integration.ts`, which no longer compiled +- `docker/prod/compose.yml` and the Docker README pulled `bytesend/web` and `bytesend/smtp`, which don't exist; they now use the published `bytesend/bytesend` and `bytesend/smtp-proxy` images +- The plans docs listed out-of-date limits and prices (including a 100 emails/month free tier, missing Hobby and Lite plans, and annual billing that isn't offered); they now match the plans in the app +- Sheets and dialogs on phones no longer run off the edge of the screen, and tall dialogs scroll instead of overflowing +- The logo in the site header, footer, sidebar, login, profile setup and loading screens is now the crisp vector mark, instead of an image with a dark tile baked in +- Errors from notification provider settings (e.g. "Provider not found", invalid webhook URLs) now reach the dashboard and API with their message instead of an empty error + +--- + ## [0.6.0] - 2026-10-19 ### Added @@ -948,7 +981,8 @@ Initial public beta release of ByteSend: an all-in-one email infrastructure plat --- -[Unreleased]: https://github.com/ByteSendApp/ByteSend/compare/v0.6.0...HEAD +[Unreleased]: https://github.com/ByteSendApp/ByteSend/compare/v0.7.0...HEAD +[0.7.0]: https://github.com/ByteSendApp/ByteSend/compare/v0.6.0...v0.7.0 [0.6.0]: https://github.com/ByteSendApp/ByteSend/compare/v0.5.0...v0.6.0 [0.5.0]: https://github.com/ByteSendApp/ByteSend/compare/v0.4.4...v0.5.0 [0.4.4]: https://github.com/ByteSendApp/ByteSend/compare/v0.4.3...v0.4.4 diff --git a/apps/docs/favicon.svg b/apps/docs/favicon.svg index 991bf65..7660a44 100644 --- a/apps/docs/favicon.svg +++ b/apps/docs/favicon.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/apps/docs/guides/admin-operations.mdx b/apps/docs/guides/admin-operations.mdx index 56277b7..9fd0256 100644 --- a/apps/docs/guides/admin-operations.mdx +++ b/apps/docs/guides/admin-operations.mdx @@ -46,31 +46,13 @@ The billing dashboard shows: - **Team Members**: Used vs. plan limit - **Verified Domains**: Used vs. plan limit - **Renewal Date**: When your next billing cycle begins -- **Cost**: Monthly/annual amount +- **Cost**: Your monthly or one-time price ### Upgrading Your Plan -#### Automatic Plan Limits +#### Plan limits -Each plan comes with specific limits: - -**Free Plan**: -- 100 emails/month -- 1 domain -- 1 team member -- 7-day history - -**BASIC Plan**: -- 100,000 emails/month -- 12 domains -- 30 team members -- 90-day history - -**LIFETIME Plan**: -- 500,000 emails/month -- 30 domains -- 100 team members -- Unlimited history +Each plan sets limits on emails, domains, team members, webhooks and contacts. See [Plans & Pricing](/guides/plans-and-pricing) for the current numbers. #### When to Upgrade diff --git a/apps/docs/guides/campaigns.mdx b/apps/docs/guides/campaigns.mdx index 93d2ec2..73974e4 100644 --- a/apps/docs/guides/campaigns.mdx +++ b/apps/docs/guides/campaigns.mdx @@ -267,11 +267,10 @@ You can also pull these via the [Analytics API](/api-reference/analytics/email-t | Plan | Campaigns | Monthly emails | | ---- | --------- | -------------- | -| Free | 3 | 12,500 | -| Hobby | 30 | 25,000 | -| Lite | 100 | 50,000 | +| Free | 3 | 5,000 | +| Starter | 30 | 25,000 | | Pro | 200 | 100,000 | -| Lifetime | 1,000 | 500,000 | +| Scale | 1,000 | 500,000 | Marketing emails are included on all plans. Overage billing applies on paid plans when you exceed the monthly limit. diff --git a/apps/docs/guides/contact-books.mdx b/apps/docs/guides/contact-books.mdx index 5bbe7d7..71ba6c2 100644 --- a/apps/docs/guides/contact-books.mdx +++ b/apps/docs/guides/contact-books.mdx @@ -318,10 +318,9 @@ If you handle unsubscribes via webhooks (e.g., reading from `email.complained`), | Plan | Contact Books | Contacts per account | | ---- | ------------- | -------------------- | | Free | 5 | 100 | -| Hobby | 10 | 200 | -| Lite | 25 | 300 | +| Starter | 10 | 200 | | Pro | 50 | 1,000 | -| Lifetime | 200 | 10,000 | +| Scale | 200 | 10,000 | --- diff --git a/apps/docs/guides/plans-and-pricing.mdx b/apps/docs/guides/plans-and-pricing.mdx index 1e10ec7..0d0439b 100644 --- a/apps/docs/guides/plans-and-pricing.mdx +++ b/apps/docs/guides/plans-and-pricing.mdx @@ -1,206 +1,65 @@ --- title: Plans & Pricing -description: "Choose the right ByteSend plan for your email needs" +description: "ByteSend Cloud plans, limits and how billing works" icon: credit-card --- -## Overview +ByteSend Cloud has a free plan and three paid plans. Prices are in US dollars, and Checkout shows set prices in pounds or euros if you're in the UK or Europe. The [pricing page](https://bytesend.cloud/#pricing) always has the current prices and lets you estimate your bill. -ByteSend offers flexible pricing plans to accommodate teams of any size, from solopreneurs to enterprises. Choose the plan that best fits your email volume and team requirements. + +Self-hosted ByteSend has no plans or limits: you pay AWS directly for what you send. + -## Available Plans +## Plan comparison -### Free Plan +| | Free | Starter | Pro | Scale | +|---|---|---|---|---| +| **Price** | Free | $5/mo (£4 / €5) | $20/mo (£16 / €19) | $90/mo (£72 / €85) | +| **Emails included** | 5,000/mo | 25,000/mo | 100,000/mo | 500,000/mo | +| **Daily limit** | 200/day | None | None | None | +| **Extra emails** | Not available | $0.40 per 1,000 transactional, $0.70 per 1,000 marketing | $0.35 / $0.60 per 1,000 | $0.30 / $0.50 per 1,000 | +| **Domains** | 2 | 4 | 12 | 30 | +| **Team members** | 5 | 10 | 30 | 50 | +| **Webhooks** | 3 | 5 | 25 | 50 | +| **Contacts** | 100 | 200 | 1,000 | 10,000 | +| **Contact books** | 5 | 10 | 50 | 200 | +| **Campaigns** | 3 | 30 | 200 | 1,000 | +| **Support** | Community | Community | Priority | Priority | -Perfect for getting started with ByteSend. +Every plan includes the REST API, SMTP relay, SDKs, templates, webhooks, analytics and both transactional and marketing email. -**Monthly Cost**: Free +Need more domains or seats without changing plan? Extra domains are $1/mo each and extra team members $2/mo each. -**Limits**: -- 100 emails/month -- 1 domain -- 1 team member -- 1 webhook -- 7-day message history +## New accounts -**Features**: -- Full API access -- Email templates -- Basic analytics -- SMTP support -- Community support +To keep ByteSend's shared sending reputation healthy, new **free** teams can send up to **50 emails a day** for their first 7 days. The limit lifts automatically after that, straight away if you upgrade to any paid plan, or sooner if you [contact support](https://discord.gg/C2Q4GHXKQA). -**Best for**: Personal projects, testing, and development +## What happens at your limit -### BASIC Plan +- **Free:** sending stops for the rest of the day or month once you reach the daily or monthly limit, and you're emailed when you get close. +- **Starter, Pro and Scale:** emails beyond your plan's allowance keep sending and are added to your next invoice at the per-1,000 rates above. -For growing teams sending regular emails. +Sending also pauses for any plan whose 7-day hard-bounce rate goes above 2% or complaint rate above 0.1%. See [Deliverability](/guides/deliverability). -**Monthly Cost**: CA$20/month (billed annually: CA$200/year) +## Changing plans -**Limits**: -- 100,000 emails/month -- 12 verified domains -- 30 team members -- Unlimited webhooks -- 90-day message history +Upgrade, downgrade or cancel at any time from **Settings → Billing** in the [dashboard](https://bytesend.cloud/settings/billing). -**Features**: -- Everything in Free plan -- Advanced analytics -- Priority email support -- Custom templates -- Webhook retry logic -- Email scheduling -- SMTP enhanced features +- **Upgrades** take effect immediately. +- **Downgrades and cancellations** take effect at the end of the current billing period. If you're over the new plan's limits (for example, more domains than it allows), remove the extras first. -**Best for**: Small businesses, startups, and growing teams +## Billing -### LIFETIME Plan +Payments are handled by Stripe, and invoices are available under **Settings → Billing**. VAT and sales tax are added at checkout based on your billing address. Businesses can enter a VAT number to have reverse charge applied where it's allowed. -One-time payment for unlimited access. Ideal for long-term projects. +For anything above 500,000 emails a month, or custom limits, ask on [Discord](https://discord.gg/C2Q4GHXKQA) about a custom plan. -**One-Time Cost**: CA$199 (paid once, forever) +## Legacy plans -**Limits**: -- 500,000 emails/month -- 30 verified domains -- 100 team members -- Unlimited webhooks -- Unlimited message history +Lite and Lifetime are no longer sold. If you already have one, nothing changes: you keep its limits and price for as long as you stay on it. Teams that subscribed before October 2026 also keep the price they signed up at. If you move to a different plan, you can't switch back to a legacy one. -**Features**: -- Everything in BASIC plan -- Advanced features and future updates -- Priority support -- No recurring billing +## Next steps -**Best for**: Agencies, established businesses, and cost-conscious teams - -## Plan Comparison - -| Feature | Free | BASIC | LIFETIME | -|---------|------|-------|----------| -| **Email Volume** | 100/mo | 100,000/mo | 500,000/mo | -| **Domains** | 1 | 12 | 30 | -| **Team Members** | 1 | 30 | 100 | -| **Message History** | 7 days | 90 days | Unlimited | -| **API Access** | ✓ | ✓ | ✓ | -| **Analytics** | Basic | Advanced | Advanced | -| **SMTP Support** | ✓ | ✓ | ✓ | -| **Email Templates** | ✓ | ✓ | ✓ | -| **Webhooks** | 1 | Unlimited | Unlimited | -| **Support** | Community | Priority | Priority | -| **Cost** | Free | CA$20/mo | CA$199 (one-time) | - -## Upgrading Your Plan - -### From Free to BASIC - -1. Log in to your [ByteSend Dashboard](https://bytesend.cloud) -2. Navigate to **Settings** → **Billing** → **Plans** -3. Click **Upgrade to BASIC** -4. Enter your payment details -5. Confirm the upgrade -6. Your plan is active immediately - -### From Free/BASIC to LIFETIME - -1. Go to **Settings** → **Billing** → **Plans** -2. Click **Upgrade to LIFETIME** -3. Review the one-time cost -4. Enter your payment details -5. Complete the purchase -6. Lifetime access is activated immediately - -### Prorated Pricing - -If you upgrade mid-month: -- If on an annual BASIC plan: You'll receive a credit for your remaining months -- If on a monthly BASIC plan: The upgrade to LIFETIME is a flat one-time fee -- Free plan upgrades are charged the full plan amount - -## Downgrading Your Plan - -### From BASIC to Free - -1. Go to **Settings** → **Billing** -2. Click **Downgrade to Free** -3. Confirm the action -4. Your plan downgrades at the end of your current billing cycle -5. You'll lose access to BASIC features when downgraded - - -Downgrading may affect your account if you exceed free tier limits. For example: -- Excess team members will be archived -- Excess domains will be temporarily disabled -- Webhooks beyond the limit will be disabled - - -## Frequently Asked Questions - -### What happens if I exceed my email limit? - -- Emails exceeding your monthly limit will be queued -- You can send them immediately by upgrading your plan -- You'll receive a notification when approaching your limit - -### Can I change my plan after purchase? - -Yes, you can upgrade or downgrade at any time from **Settings** → **Billing** → **Plans**. - -### Do you offer annual billing discounts? - -Yes! BASIC plan annual billing saves you 2 months: -- Monthly: CA$20 × 12 = CA$240/year -- Annual: CA$200/year (saves CA$40) - -### Is the LIFETIME plan really permanent? - -Yes! With the LIFETIME plan: -- No recurring charges after the initial purchase -- You keep your plan even if you stop using ByteSend -- Future features and updates are included - -### Do you offer enterprise plans? - -Yes! For high-volume needs (1M+ emails/month), we offer custom enterprise pricing. [Contact sales](https://discord.gg/C2Q4GHXKQA) to discuss your requirements. - -### Can I cancel my subscription? - -You can cancel your BASIC plan at any time. Simply go to **Settings** → **Billing** and click **Cancel Plan**. You'll retain access until the end of your billing period. - -## Billing & Payments - -### Accepted Payment Methods - -- Credit/Debit cards (Visa, Mastercard, American Express) -- PayPal -- Wire transfer (for enterprise customers) - -### Invoices - -All invoices are available in your dashboard: - -1. Go to **Settings** → **Billing** → **Invoices** -2. View, download, or email invoices -3. Invoices are emailed automatically after each billing cycle - -### Tax Information - -- VAT/GST is calculated based on your billing location -- Tax information can be added in **Settings** → **Billing** → **Tax** -- All prices displayed are in CAD - -## Support - -For billing questions or concerns: - -- **Free Plan**: Community support via [Discord](https://discord.gg/C2Q4GHXKQA) -- **BASIC/LIFETIME Plans**: Priority email and Discord support - -## Next Steps - -- [Upgrade your plan](https://bytesend.cloud/settings/billing) -- [Manage your team members](/guides/plan-management) -- [Explore billing operations](/guides/admin-operations) +- [Manage your plan and team](/guides/plan-management) +- [Rate limits](/guides/rate-limits) +- [Deliverability](/guides/deliverability) diff --git a/apps/docs/logo/wordmark-dark.png b/apps/docs/logo/wordmark-dark.png index 855fa0c..2193f78 100644 Binary files a/apps/docs/logo/wordmark-dark.png and b/apps/docs/logo/wordmark-dark.png differ diff --git a/apps/docs/logo/wordmark-light.png b/apps/docs/logo/wordmark-light.png index ad92c80..5aa6cd0 100644 Binary files a/apps/docs/logo/wordmark-light.png and b/apps/docs/logo/wordmark-light.png differ diff --git a/apps/web/prisma/migrations/20261020010000_new_team_ramp_and_domain_age/migration.sql b/apps/web/prisma/migrations/20261020010000_new_team_ramp_and_domain_age/migration.sql new file mode 100644 index 0000000..d27230e --- /dev/null +++ b/apps/web/prisma/migrations/20261020010000_new_team_ramp_and_domain_age/migration.sql @@ -0,0 +1,6 @@ +-- AlterTable +ALTER TABLE "Team" ADD COLUMN "sendingApprovedAt" TIMESTAMP(3); + +-- AlterTable +ALTER TABLE "Domain" ADD COLUMN "registeredAt" TIMESTAMP(3), +ADD COLUMN "registrationCheckedAt" TIMESTAMP(3); diff --git a/apps/web/prisma/migrations/20261020020000_usage_alerts_and_domain_health/migration.sql b/apps/web/prisma/migrations/20261020020000_usage_alerts_and_domain_health/migration.sql new file mode 100644 index 0000000..02fa107 --- /dev/null +++ b/apps/web/prisma/migrations/20261020020000_usage_alerts_and_domain_health/migration.sql @@ -0,0 +1,9 @@ +-- AlterEnum +ALTER TYPE "NotificationEventType" ADD VALUE 'USAGE_ALERT'; +ALTER TYPE "NotificationEventType" ADD VALUE 'DOMAIN_HEALTH'; + +-- AlterTable +ALTER TABLE "Domain" ADD COLUMN "dnsIssues" JSONB, +ADD COLUMN "dnsIssuesSince" TIMESTAMP(3), +ADD COLUMN "dnsIssuesNotifiedAt" TIMESTAMP(3), +ADD COLUMN "dnsCheckedAt" TIMESTAMP(3); diff --git a/apps/web/prisma/migrations/20261020030000_add_scale_plan/migration.sql b/apps/web/prisma/migrations/20261020030000_add_scale_plan/migration.sql new file mode 100644 index 0000000..80092a1 --- /dev/null +++ b/apps/web/prisma/migrations/20261020030000_add_scale_plan/migration.sql @@ -0,0 +1,2 @@ +-- AlterEnum +ALTER TYPE "Plan" ADD VALUE 'SCALE'; diff --git a/apps/web/prisma/schema.prisma b/apps/web/prisma/schema.prisma index 41e3904..d0afe7c 100644 --- a/apps/web/prisma/schema.prisma +++ b/apps/web/prisma/schema.prisma @@ -168,6 +168,7 @@ enum Plan { LITE HOBBY BASIC + SCALE LIFETIME } @@ -186,6 +187,8 @@ model Team { isVerified Boolean @default(false) dailyEmailLimit Int @default(10000) isBlocked Boolean @default(false) + /// Set by an admin to lift the new-team daily sending cap early. + sendingApprovedAt DateTime? extraDomainSlots Int @default(0) extraMemberSlots Int @default(0) customPlanEnabled Boolean @default(false) @@ -279,6 +282,14 @@ model Domain { errorMessage String? subdomain String? sesTenantId String? + /// When the registrable domain was registered, from RDAP. Null if unknown. + registeredAt DateTime? + registrationCheckedAt DateTime? + /// DNS problems found by the domain health monitor on a verified domain, e.g. a removed DKIM record. + dnsIssues Json? + dnsIssuesSince DateTime? + dnsIssuesNotifiedAt DateTime? + dnsCheckedAt DateTime? isVerifying Boolean @default(false) pendingRegion String? pendingDkimSelector String? @@ -635,6 +646,8 @@ enum NotificationEventType { CAMPAIGN_STARTED CAMPAIGN_COMPLETED ERROR_ALERT + USAGE_ALERT + DOMAIN_HEALTH } model NotificationProvider { diff --git a/apps/web/public/brand/app-icon-1024.png b/apps/web/public/brand/app-icon-1024.png index 4fc53a5..ae9b36b 100644 Binary files a/apps/web/public/brand/app-icon-1024.png and b/apps/web/public/brand/app-icon-1024.png differ diff --git a/apps/web/public/brand/app-icon-ribbon-1024.png b/apps/web/public/brand/app-icon-ribbon-1024.png new file mode 100644 index 0000000..7233033 Binary files /dev/null and b/apps/web/public/brand/app-icon-ribbon-1024.png differ diff --git a/apps/web/public/brand/discord-banner.png b/apps/web/public/brand/discord-banner.png index 4ab1a70..326e832 100644 Binary files a/apps/web/public/brand/discord-banner.png and b/apps/web/public/brand/discord-banner.png differ diff --git a/apps/web/public/brand/discord-invite-splash.png b/apps/web/public/brand/discord-invite-splash.png index 475e9d7..8a5dba2 100644 Binary files a/apps/web/public/brand/discord-invite-splash.png and b/apps/web/public/brand/discord-invite-splash.png differ diff --git a/apps/web/public/brand/github-social-preview.png b/apps/web/public/brand/github-social-preview.png index 1bac323..4e82714 100644 Binary files a/apps/web/public/brand/github-social-preview.png and b/apps/web/public/brand/github-social-preview.png differ diff --git a/apps/web/public/brand/icon-compact.svg b/apps/web/public/brand/icon-compact.svg new file mode 100644 index 0000000..7660a44 --- /dev/null +++ b/apps/web/public/brand/icon-compact.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/web/public/brand/icon-glyph.svg b/apps/web/public/brand/icon-glyph.svg new file mode 100644 index 0000000..3f8946e --- /dev/null +++ b/apps/web/public/brand/icon-glyph.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/web/public/brand/icon-mono-black.svg b/apps/web/public/brand/icon-mono-black.svg new file mode 100644 index 0000000..aefcba8 --- /dev/null +++ b/apps/web/public/brand/icon-mono-black.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/web/public/brand/icon-mono-white.svg b/apps/web/public/brand/icon-mono-white.svg new file mode 100644 index 0000000..3cb5434 --- /dev/null +++ b/apps/web/public/brand/icon-mono-white.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/web/public/brand/icon-tile.svg b/apps/web/public/brand/icon-tile.svg new file mode 100644 index 0000000..d8f7302 --- /dev/null +++ b/apps/web/public/brand/icon-tile.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/web/public/brand/icon.svg b/apps/web/public/brand/icon.svg new file mode 100644 index 0000000..9b912bb --- /dev/null +++ b/apps/web/public/brand/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/web/public/brand/mark-compact.svg b/apps/web/public/brand/mark-compact.svg index 991bf65..d9f02b7 100644 --- a/apps/web/public/brand/mark-compact.svg +++ b/apps/web/public/brand/mark-compact.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/apps/web/public/brand/mark-glyph.svg b/apps/web/public/brand/mark-glyph.svg index b57b9c5..74948b9 100644 --- a/apps/web/public/brand/mark-glyph.svg +++ b/apps/web/public/brand/mark-glyph.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/apps/web/public/brand/mark-mono-black.svg b/apps/web/public/brand/mark-mono-black.svg index ecffaaa..75a9a08 100644 --- a/apps/web/public/brand/mark-mono-black.svg +++ b/apps/web/public/brand/mark-mono-black.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/apps/web/public/brand/mark-mono-white.svg b/apps/web/public/brand/mark-mono-white.svg index d8c1128..8b2bbd3 100644 --- a/apps/web/public/brand/mark-mono-white.svg +++ b/apps/web/public/brand/mark-mono-white.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/apps/web/public/brand/mark-on-dark.svg b/apps/web/public/brand/mark-on-dark.svg new file mode 100644 index 0000000..9ae4262 --- /dev/null +++ b/apps/web/public/brand/mark-on-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/web/public/brand/mark.svg b/apps/web/public/brand/mark.svg index f41f813..9e1c640 100644 --- a/apps/web/public/brand/mark.svg +++ b/apps/web/public/brand/mark.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/apps/web/public/brand/social-avatar-ribbon.png b/apps/web/public/brand/social-avatar-ribbon.png new file mode 100644 index 0000000..d1d63ac Binary files /dev/null and b/apps/web/public/brand/social-avatar-ribbon.png differ diff --git a/apps/web/public/brand/social-avatar.png b/apps/web/public/brand/social-avatar.png index 8357b7d..d77c56c 100644 Binary files a/apps/web/public/brand/social-avatar.png and b/apps/web/public/brand/social-avatar.png differ diff --git a/apps/web/public/brand/wordmark-dark-tight.png b/apps/web/public/brand/wordmark-dark-tight.png index 855fa0c..1bc55b5 100644 Binary files a/apps/web/public/brand/wordmark-dark-tight.png and b/apps/web/public/brand/wordmark-dark-tight.png differ diff --git a/apps/web/public/brand/wordmark-dark.png b/apps/web/public/brand/wordmark-dark.png index 23c701a..2193f78 100644 Binary files a/apps/web/public/brand/wordmark-dark.png and b/apps/web/public/brand/wordmark-dark.png differ diff --git a/apps/web/public/brand/wordmark-icon-dark-tight.png b/apps/web/public/brand/wordmark-icon-dark-tight.png new file mode 100644 index 0000000..3431054 Binary files /dev/null and b/apps/web/public/brand/wordmark-icon-dark-tight.png differ diff --git a/apps/web/public/brand/wordmark-icon-dark.png b/apps/web/public/brand/wordmark-icon-dark.png new file mode 100644 index 0000000..1099c85 Binary files /dev/null and b/apps/web/public/brand/wordmark-icon-dark.png differ diff --git a/apps/web/public/brand/wordmark-icon-light-tight.png b/apps/web/public/brand/wordmark-icon-light-tight.png new file mode 100644 index 0000000..e1f545c Binary files /dev/null and b/apps/web/public/brand/wordmark-icon-light-tight.png differ diff --git a/apps/web/public/brand/wordmark-icon-light.png b/apps/web/public/brand/wordmark-icon-light.png new file mode 100644 index 0000000..ecd734d Binary files /dev/null and b/apps/web/public/brand/wordmark-icon-light.png differ diff --git a/apps/web/public/brand/wordmark-light-tight.png b/apps/web/public/brand/wordmark-light-tight.png index ad92c80..8a70bdf 100644 Binary files a/apps/web/public/brand/wordmark-light-tight.png and b/apps/web/public/brand/wordmark-light-tight.png differ diff --git a/apps/web/public/brand/wordmark-light.png b/apps/web/public/brand/wordmark-light.png index 7e018fb..5aa6cd0 100644 Binary files a/apps/web/public/brand/wordmark-light.png and b/apps/web/public/brand/wordmark-light.png differ diff --git a/apps/web/public/brand/x-header.png b/apps/web/public/brand/x-header.png index a652b00..be7cb99 100644 Binary files a/apps/web/public/brand/x-header.png and b/apps/web/public/brand/x-header.png differ diff --git a/apps/web/public/favicon.ico b/apps/web/public/favicon.ico index ab25de4..c0704d8 100644 Binary files a/apps/web/public/favicon.ico and b/apps/web/public/favicon.ico differ diff --git a/apps/web/public/favicon.svg b/apps/web/public/favicon.svg index 991bf65..7660a44 100644 --- a/apps/web/public/favicon.svg +++ b/apps/web/public/favicon.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/apps/web/public/favicon_io/android-chrome-192x192.png b/apps/web/public/favicon_io/android-chrome-192x192.png index c1fd7e4..9021cc0 100644 Binary files a/apps/web/public/favicon_io/android-chrome-192x192.png and b/apps/web/public/favicon_io/android-chrome-192x192.png differ diff --git a/apps/web/public/favicon_io/android-chrome-512x512.png b/apps/web/public/favicon_io/android-chrome-512x512.png index 95aec3b..ae7c0d3 100644 Binary files a/apps/web/public/favicon_io/android-chrome-512x512.png and b/apps/web/public/favicon_io/android-chrome-512x512.png differ diff --git a/apps/web/public/favicon_io/apple-touch-icon.png b/apps/web/public/favicon_io/apple-touch-icon.png index d6b6713..da51d98 100644 Binary files a/apps/web/public/favicon_io/apple-touch-icon.png and b/apps/web/public/favicon_io/apple-touch-icon.png differ diff --git a/apps/web/public/favicon_io/favicon-16x16.png b/apps/web/public/favicon_io/favicon-16x16.png index 135c910..da4f8e9 100644 Binary files a/apps/web/public/favicon_io/favicon-16x16.png and b/apps/web/public/favicon_io/favicon-16x16.png differ diff --git a/apps/web/public/favicon_io/favicon-32x32.png b/apps/web/public/favicon_io/favicon-32x32.png index 5b5c6a3..2ba8a88 100644 Binary files a/apps/web/public/favicon_io/favicon-32x32.png and b/apps/web/public/favicon_io/favicon-32x32.png differ diff --git a/apps/web/public/favicon_io/favicon.ico b/apps/web/public/favicon_io/favicon.ico index ab25de4..c0704d8 100644 Binary files a/apps/web/public/favicon_io/favicon.ico and b/apps/web/public/favicon_io/favicon.ico differ diff --git a/apps/web/public/logo-squircle.png b/apps/web/public/logo-squircle.png index 725b49b..ae7c0d3 100644 Binary files a/apps/web/public/logo-squircle.png and b/apps/web/public/logo-squircle.png differ diff --git a/apps/web/public/logo.png b/apps/web/public/logo.png index 676eb53..27fc1a4 100644 Binary files a/apps/web/public/logo.png and b/apps/web/public/logo.png differ diff --git a/apps/web/public/logo.svg b/apps/web/public/logo.svg index f41f813..9e1c640 100644 --- a/apps/web/public/logo.svg +++ b/apps/web/public/logo.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/apps/web/public/nameplate.png b/apps/web/public/nameplate.png index 7e018fb..5aa6cd0 100644 Binary files a/apps/web/public/nameplate.png and b/apps/web/public/nameplate.png differ diff --git a/apps/web/scripts/brand/emojis.tsx b/apps/web/scripts/brand/emojis.tsx index c1fbcc5..61d3377 100644 --- a/apps/web/scripts/brand/emojis.tsx +++ b/apps/web/scripts/brand/emojis.tsx @@ -5,7 +5,7 @@ import type { ReactElement, ReactNode } from "react"; import { ImageResponse } from "next/og"; import { PNG } from "pngjs"; import gifenc from "gifenc"; -import { BRAND_COLORS, BrandMark } from "../../src/lib/brand"; +import { BRAND_COLORS, BrandIcon, BrandMark } from "../../src/lib/brand"; // gifenc is CommonJS, so its named exports are only reachable through the default import. const { GIFEncoder, applyPalette, quantize } = gifenc; @@ -172,6 +172,7 @@ function FlyingMail({ offset }: { offset: number }) { async function main() { save("bs_logo.png", await renderPng(frame())); save("bs_send.png", await renderPng(frame())); + save("bs_icon.png", await renderPng(frame())); save( "bs_api.png", await renderPng( diff --git a/apps/web/scripts/brand/generate.tsx b/apps/web/scripts/brand/generate.tsx index cb97dcd..63b6088 100644 --- a/apps/web/scripts/brand/generate.tsx +++ b/apps/web/scripts/brand/generate.tsx @@ -8,7 +8,9 @@ import { BRAND_MARK_ASPECT, BRAND_NAME, BRAND_TAGLINE, + BrandIcon, BrandMark, + brandIconSvgString, brandMarkSvgString, type BrandMarkDetail, } from "../../src/lib/brand"; @@ -59,10 +61,17 @@ function encodeIco(frames: Array<{ size: number; data: Buffer }>) { return Buffer.concat([header, ...entries, ...frames.map((frame) => frame.data)]); } -function Wordmark({ height, onDark }: { height: number; onDark: boolean }) { +type Logo = "ribbon" | "icon"; + +function Wordmark({ height, onDark, logo = "ribbon" }: { height: number; onDark: boolean; logo?: Logo }) { + const flapColor = onDark ? BRAND_COLORS.ink : BRAND_COLORS.paper; return (
- + {logo === "ribbon" ? ( + + ) : ( + + )}
Byte Send @@ -71,14 +80,24 @@ function Wordmark({ height, onDark }: { height: number; onDark: boolean }) { ); } -function MarkOnly({ size, detail, background, radius = 0, inset = 0.14 }: { +function Centered({ children }: { children: ReactElement }) { + return ( +
+ {children} +
+ ); +} + +function LogoOnly({ size, detail, logo = "icon", background, radius = 0, inset = 0.14 }: { size: number; detail: BrandMarkDetail; + logo?: Logo; background?: string; radius?: number; inset?: number; }) { - const markWidth = size * (1 - inset * 2); + const width = size * (1 - inset * 2); + const flapColor = background ?? BRAND_COLORS.paper; return (
- + {logo === "ribbon" ? ( + + ) : ( + + )}
); } @@ -122,7 +145,7 @@ function Banner({ }} >
- +
, 1024, 1024, fonts)); - write("logo.png", await png(, 1024, 1024, fonts)); - write( - "logo-squircle.png", - await png(, 512, 512, fonts), - ); - write("nameplate.png", await png(
, 1600, 500, fonts)); - write("brand/wordmark-light.png", await png(
, 1600, 500, fonts)); - write("brand/wordmark-dark.png", await png(
, 1600, 500, fonts)); - // Tight crops for places that scale a logo to a fixed height, such as the docs navbar. - write("brand/wordmark-light-tight.png", await png(
, 1200, 220, fonts)); - write("brand/wordmark-dark-tight.png", await png(
, 1200, 220, fonts)); - write("brand/app-icon-1024.png", await png(, 1024, 1024, fonts)); - - write("favicon_io/android-chrome-512x512.png", await png(, 512, 512, fonts)); - write("favicon_io/android-chrome-192x192.png", await png(, 192, 192, fonts)); - write("favicon_io/apple-touch-icon.png", await png(, 180, 180, fonts)); - - const favicon16 = await png(, 16, 16, fonts); - const favicon32 = await png(, 32, 32, fonts); - const favicon48 = await png(, 48, 48, fonts); + // Icon and monogram: the Send B. + write("brand/icon.svg", brandIconSvgString({ detail: "full" })); + write("brand/icon-compact.svg", brandIconSvgString({ detail: "compact" })); + write("brand/icon-glyph.svg", brandIconSvgString({ detail: "glyph" })); + write("brand/icon-tile.svg", brandIconSvgString({ detail: "full", tile: ink })); + write("brand/icon-mono-black.svg", brandIconSvgString({ detail: "full", variant: "mono", monoColor: "#000000" })); + write("brand/icon-mono-white.svg", brandIconSvgString({ detail: "full", variant: "mono", monoColor: "#ffffff" })); + write("favicon.svg", brandIconSvgString({ detail: "compact" })); + + for (const [suffix, logo] of [["", "ribbon"], ["-icon", "icon"]] as const) { + write(`brand/wordmark${suffix}-light.png`, await png(, 1600, 500, fonts)); + write(`brand/wordmark${suffix}-dark.png`, await png(, 1600, 500, fonts)); + // Tight crops for places that scale a logo to a fixed height, such as the docs navbar. + write(`brand/wordmark${suffix}-light-tight.png`, await png(, 1200, 220, fonts)); + write(`brand/wordmark${suffix}-dark-tight.png`, await png(, 1200, 220, fonts)); + } + write("nameplate.png", await png(, 1600, 500, fonts)); + + write("brand/app-icon-1024.png", await png(, 1024, 1024, fonts)); + write("brand/app-icon-ribbon-1024.png", await png(, 1024, 1024, fonts)); + write("brand/social-avatar.png", await png(, 400, 400, fonts)); + write("brand/social-avatar-ribbon.png", await png(, 400, 400, fonts)); + write("logo-squircle.png", await png(, 512, 512, fonts)); + + write("favicon_io/android-chrome-512x512.png", await png(, 512, 512, fonts)); + write("favicon_io/android-chrome-192x192.png", await png(, 192, 192, fonts)); + write("favicon_io/apple-touch-icon.png", await png(, 180, 180, fonts)); + + const favicon16 = await png(, 16, 16, fonts); + const favicon32 = await png(, 32, 32, fonts); + const favicon48 = await png(, 48, 48, fonts); write("favicon_io/favicon-16x16.png", favicon16); write("favicon_io/favicon-32x32.png", favicon32); const ico = encodeIco([ @@ -212,7 +250,6 @@ async function main() { // X's mobile app zooms the header, crops both sides and overlays buttons in the top corners, // so the lockup stays small and centred inside the area every client shows. write("brand/x-header.png", await png(, 1500, 500, fonts)); - write("brand/social-avatar.png", await png(, 400, 400, fonts)); console.log(`\n${BRAND_NAME} brand assets generated.`); } diff --git a/apps/web/scripts/stripe-seed.ts b/apps/web/scripts/stripe-seed.ts index 27d554f..013d0be 100644 --- a/apps/web/scripts/stripe-seed.ts +++ b/apps/web/scripts/stripe-seed.ts @@ -21,6 +21,7 @@ import { syncPlansToStripe, generateDbConfig, DB_CONFIG_KEYS, + PRICING_VERSION, } from "../../../packages/lib/src/stripe/seed.ts"; import { STRIPE_ADDON_PRODUCTS } from "../../../packages/lib/src/stripe/products.ts"; @@ -82,7 +83,7 @@ async function upsertAddonProductAndPrice(params: { } const existingPrices = await stripe.prices.search({ - query: `product:'${product.id}' AND metadata['type']:'${priceMetadataType}'`, + query: `product:'${product.id}' AND active:'true' AND metadata['type']:'${priceMetadataType}' AND metadata['pricing']:'${PRICING_VERSION}'`, limit: 1, }); @@ -93,10 +94,16 @@ async function upsertAddonProductAndPrice(params: { } else { price = await stripe.prices.create({ product: product.id, - currency: "cad", + currency: "usd", unit_amount: priceMonthly, + // Add-ons cost the same number in every currency ($1 / £1 / €1 per domain). + tax_behavior: "exclusive", + currency_options: { + gbp: { unit_amount: priceMonthly, tax_behavior: "exclusive" }, + eur: { unit_amount: priceMonthly, tax_behavior: "exclusive" }, + }, recurring: { interval: "month", usage_type: "licensed" }, - metadata: { type: priceMetadataType, environment }, + metadata: { type: priceMetadataType, environment, pricing: PRICING_VERSION }, }); console.log(` ✓ Created add-on price: ${price.id}`); } @@ -199,6 +206,9 @@ async function main() { } else if (!appUrl) { console.warn("\n⚠️ Webhook: NEXTAUTH_URL / APP_URL not set — skipping endpoint registration."); console.warn(" Set NEXTAUTH_URL and re-run to auto-register the webhook."); + } else if (/^https?:\/\/(localhost|127\.0\.0\.1)(:|\/|$)/.test(appUrl)) { + console.warn(`\n⚠️ Webhook: ${appUrl} isn't publicly reachable, so Stripe can't send to it. Skipping registration.`); + console.warn(" Your existing endpoint and stored secret are unchanged."); } else { const webhookUrl = `${appUrl.replace(/\/$/, "")}/api/webhook/stripe`; console.log(`\n🔔 Registering webhook endpoint: ${webhookUrl}`); diff --git a/apps/web/src/app/(dashboard)/admin/_components/admin-nav.tsx b/apps/web/src/app/(dashboard)/admin/_components/admin-nav.tsx index 23c9a69..9ffd7c3 100644 --- a/apps/web/src/app/(dashboard)/admin/_components/admin-nav.tsx +++ b/apps/web/src/app/(dashboard)/admin/_components/admin-nav.tsx @@ -1,7 +1,5 @@ "use client"; -import Link from "next/link"; -import { usePathname } from "next/navigation"; import type { LucideIcon } from "lucide-react"; import { Activity, @@ -19,7 +17,6 @@ import { Users, Webhook, } from "lucide-react"; -import { cn } from "@bytesend/ui/lib/utils"; import { isCloud } from "~/utils/common"; type AdminNavItem = { @@ -30,7 +27,7 @@ type AdminNavItem = { requiresAdminFlag?: boolean; }; -type AdminNavGroup = { label?: string; items: AdminNavItem[] }; +export type AdminNavGroup = { label?: string; items: AdminNavItem[] }; const NAV_GROUPS: AdminNavGroup[] = [ { items: [{ href: "/admin", label: "Overview", icon: LayoutDashboard }] }, @@ -67,55 +64,15 @@ const NAV_GROUPS: AdminNavGroup[] = [ { items: [{ href: "/admin/audit", label: "Audit log", icon: ScrollText }] }, ]; -function isActivePath(pathname: string, href: string) { +export function isActiveAdminPath(pathname: string, href: string) { return href === "/admin" ? pathname === href : pathname === href || pathname.startsWith(`${href}/`); } -export function AdminNav({ isAdmin }: { isAdmin: boolean }) { - const pathname = usePathname(); +/** Admin sections the current admin can open, rendered by the main sidebar on /admin pages. */ +export function getAdminNavGroups(isAdmin: boolean): AdminNavGroup[] { const cloud = isCloud(); - - const groups = NAV_GROUPS.map((group) => ({ + return NAV_GROUPS.map((group) => ({ ...group, - items: group.items.filter( - (item) => (!item.cloudOnly || cloud) && (!item.requiresAdminFlag || isAdmin), - ), + items: group.items.filter((item) => (!item.cloudOnly || cloud) && (!item.requiresAdminFlag || isAdmin)), })).filter((group) => group.items.length > 0); - - return ( - - ); } diff --git a/apps/web/src/app/(dashboard)/admin/emails/email-detail-sheet.tsx b/apps/web/src/app/(dashboard)/admin/emails/email-detail-sheet.tsx index bef2463..2f03969 100644 --- a/apps/web/src/app/(dashboard)/admin/emails/email-detail-sheet.tsx +++ b/apps/web/src/app/(dashboard)/admin/emails/email-detail-sheet.tsx @@ -51,7 +51,7 @@ export function EmailDetailSheet({ emailId, onClose }: { emailId: string | null; } }} > - + {email?.subject || (emailQuery.isLoading ? "Loading…" : "(no subject)")} {emailId} diff --git a/apps/web/src/app/(dashboard)/admin/layout.tsx b/apps/web/src/app/(dashboard)/admin/layout.tsx index 3f33935..1c730a9 100644 --- a/apps/web/src/app/(dashboard)/admin/layout.tsx +++ b/apps/web/src/app/(dashboard)/admin/layout.tsx @@ -7,7 +7,6 @@ import { H1 } from "@bytesend/ui"; import Spinner from "@bytesend/ui/src/spinner"; import { isCloud, isSelfHosted } from "~/utils/common"; import { AdminCommandSearch } from "./_components/admin-command-search"; -import { AdminNav } from "./_components/admin-nav"; export default function AdminLayout({ children, @@ -44,12 +43,7 @@ export default function AdminLayout({
{isCloud() ? : null}
-
- -
{children}
-
+
{children}
); } 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 8958d51..d2f5d0c 100644 --- a/apps/web/src/app/(dashboard)/admin/teams/[teamId]/page.tsx +++ b/apps/web/src/app/(dashboard)/admin/teams/[teamId]/page.tsx @@ -29,6 +29,14 @@ import { AssignPlanCard } from "../_components/assign-plan-card"; import { DeleteTeamCard } from "../_components/delete-team-card"; import { DomainRegionControl } from "../_components/domain-region-control"; import { TeamSettingsCard } from "../_components/team-settings-card"; +import { toast } from "@bytesend/ui/src/toaster"; +import { + domainAgeDays, + isInNewTeamRamp, + NEW_TEAM_DAILY_LIMIT, + newTeamRampEndsAt, + YOUNG_DOMAIN_DAYS, +} from "~/lib/constants/trust"; const DOMAIN_STATUS: Record = { SUCCESS: { label: "Verified", tone: "success" }, @@ -82,6 +90,14 @@ export default function AdminTeamDetailPage() { { enabled: Number.isInteger(teamId), retry: false }, ); const team = teamQuery.data; + const utils = api.useUtils(); + const approveSending = api.admin.setTeamSendingApproved.useMutation({ + onSuccess: async (updated) => { + toast.success(updated.sendingApprovedAt ? "Sending approved: the new-team limit is lifted" : "Approval revoked"); + await Promise.all([utils.admin.getTeamDetail.invalidate({ teamId }), utils.admin.listAuditLog.invalidate()]); + }, + onError: (error) => toast.error("Could not update approval", { description: error.message }), + }); const usageSeries = useMemo( () => [ @@ -126,6 +142,12 @@ export default function AdminTeamDetailPage() { {team.plan} {team.isBlocked ? Blocked : null} {!team.isActive ? Inactive : null} + {isInNewTeamRamp(team) ? ( + + New-team limit: {NEW_TEAM_DAILY_LIMIT}/day + + ) : null} + {team.sendingApprovedAt ? Sending approved : null}

#{team.id} · created{" "} @@ -147,6 +169,16 @@ export default function AdminTeamDetailPage() { ) : null} + {isInNewTeamRamp(team) || team.sendingApprovedAt ? ( + + ) : null} diff --git a/apps/web/src/app/(dashboard)/settings/billing/page.tsx b/apps/web/src/app/(dashboard)/settings/billing/page.tsx index 52f6888..1392dbb 100644 --- a/apps/web/src/app/(dashboard)/settings/billing/page.tsx +++ b/apps/web/src/app/(dashboard)/settings/billing/page.tsx @@ -8,18 +8,9 @@ import { format } from "date-fns"; import { useTeam } from "~/providers/team-context"; import { api } from "~/trpc/react"; import { PlanDetails } from "~/components/payments/PlanDetails"; -import { - UpgradeButton, -} from "~/components/payments/UpgradeButton"; import { PLANS } from "@bytesend/lib"; import { BillingPlanSelector } from "~/components/payments/BillingPlanSelector"; -function formatPlanPrice(plan: (typeof PLANS)[keyof typeof PLANS]): string { - if (plan.oneTimePrice) return `CA$${plan.oneTimePrice / 100} one-time`; - if (plan.monthlyPrice === 0) return "Free"; - return `CA$${plan.monthlyPrice / 100} / mo`; -} - export default function SettingsPage() { const { currentTeam, currentIsAdmin } = useTeam(); const manageSessionUrl = api.billing.getManageSessionUrl.useMutation(); @@ -106,34 +97,15 @@ export default function SettingsPage() { isManaging={manageSessionUrl.isPending} /> - -

-
-

Lifetime

-

- One-time purchase with a high hard cap and no recurring monthly plan charge. -

-
-
- - {formatPlanPrice(PLANS.LIFETIME)} - - {currentTeam.plan === "LIFETIME" ? ( - - ) : currentTeam.plan === "FREE" ? ( - - ) : ( - - )} -
-
- + {currentTeam.plan === "LIFETIME" || currentTeam.plan === "LITE" ? ( + +

You're on a legacy plan

+

+ {PLANS[currentTeam.plan].displayName} is no longer sold, but you keep it, its limits and your price for as + long as you stay on it. +

+
+ ) : null}
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 896dc20..7552778 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 for CA$2/mo each. + Need more seats? Purchase extra member slots for $2/mo each.

)}
diff --git a/apps/web/src/app/(dashboard)/settings/usage/usage.tsx b/apps/web/src/app/(dashboard)/settings/usage/usage.tsx index 9474f5e..29d4bc5 100644 --- a/apps/web/src/app/(dashboard)/settings/usage/usage.tsx +++ b/apps/web/src/app/(dashboard)/settings/usage/usage.tsx @@ -41,7 +41,7 @@ function getUsageByType( } function getEffectiveEmailLimits( - plan: "FREE" | "BASIC" | "HOBBY" | "LITE" | "LIFETIME", + plan: "FREE" | "BASIC" | "HOBBY" | "LITE" | "SCALE" | "LIFETIME", customContract?: { customPlanEnabled: boolean; customMarketingEmailLimit: number | null; @@ -172,7 +172,7 @@ function EmailLimitsBreakdown({ }: { usage: { type: EmailUsageType; sent: number }[]; dayUsage: { type: EmailUsageType; sent: number }[]; - plan: "FREE" | "BASIC" | "HOBBY" | "LITE" | "LIFETIME"; + plan: "FREE" | "BASIC" | "HOBBY" | "LITE" | "SCALE" | "LIFETIME"; customContract?: { customPlanEnabled: boolean; customMarketingEmailLimit: number | null; @@ -277,7 +277,7 @@ function PaidPlanUsage({ Amount due

- {isUnlimited ? "CA$0.00" : `CA$${amountDue.toFixed(2)}`} + {isUnlimited ? "$0.00" : `$${amountDue.toFixed(2)}`}

{isUnlimited && (

Included in plan

@@ -292,7 +292,7 @@ function PaidPlanUsage({ Credit remaining

- {isUnlimited ? "∞" : `CA$${(creditRemaining ?? 0).toFixed(2)}`} + {isUnlimited ? "∞" : `$${(creditRemaining ?? 0).toFixed(2)}`}

{!isUnlimited && } @@ -327,11 +327,11 @@ function PaidPlanUsage({ {item.type.toLowerCase()} - {item.sent.toLocaleString()} × CA${USAGE_UNIT_PRICE[item.type]} + {item.sent.toLocaleString()} × ${USAGE_UNIT_PRICE[item.type]} - CA${getCost(item.sent, item.type).toFixed(2)} + ${getCost(item.sent, item.type).toFixed(2)} ))} diff --git a/apps/web/src/app/login/login-page.tsx b/apps/web/src/app/login/login-page.tsx index 2a9b0b4..bf69aa4 100644 --- a/apps/web/src/app/login/login-page.tsx +++ b/apps/web/src/app/login/login-page.tsx @@ -2,7 +2,6 @@ import { Button } from "@bytesend/ui/src/button"; import { Input } from "@bytesend/ui/src/input"; -import Image from "next/image"; import { useState, useEffect } from "react"; import { ClientSafeProvider, LiteralUnion, signIn } from "next-auth/react"; import { BuiltInProviderType } from "next-auth/providers/index"; @@ -10,6 +9,7 @@ import Spinner from "@bytesend/ui/src/spinner"; import Link from "next/link"; import { useSearchParams as useNextSearchParams } from "next/navigation"; import { FaDiscord, FaEnvelope, FaGithub, FaGoogle } from "react-icons/fa6"; +import { BrandMark } from "~/lib/brand"; const SESSION_EMAIL_KEY = "bytesend_login_email"; @@ -216,13 +216,7 @@ export default function LoginPage({ {/* Logo & heading */}
- ByteSend +

diff --git a/apps/web/src/components/AppSideBar.tsx b/apps/web/src/components/AppSideBar.tsx index b5729dc..9ffe5a0 100644 --- a/apps/web/src/components/AppSideBar.tsx +++ b/apps/web/src/components/AppSideBar.tsx @@ -13,7 +13,6 @@ import { Volume2, BookOpenText, BookOpenIcon, - BarChart3, LogOutIcon, MoreVerticalIcon, UsersIcon, @@ -26,6 +25,7 @@ import { PlusIcon, ScrollText, UserIcon, + ArrowLeft, } from "lucide-react"; import { FaBook } from "react-icons/fa"; import { SiDiscord } from "react-icons/si"; @@ -65,6 +65,8 @@ import { } from "@bytesend/ui/src/dropdown-menu"; import { FeedbackDialog } from "./FeedbackDialog"; import { env } from "~/env"; +import { getAdminNavGroups, isActiveAdminPath } from "~/app/(dashboard)/admin/_components/admin-nav"; +import { BrandIcon } from "~/lib/brand"; // General items const generalItems = [ @@ -74,9 +76,9 @@ const generalItems = [ icon: Mail, }, { - title: "Analytics", + title: "Overview", url: "/dashboard", - icon: BarChart3, + icon: HouseIcon, }, { title: "Domains", @@ -135,6 +137,8 @@ export function AppSidebar() { const { currentTeam, teams, setCurrentTeam } = useTeam(); const pathname = usePathname(); + const inAdmin = pathname?.startsWith("/admin") ?? false; + const adminGroups = inAdmin ? getAdminNavGroups(Boolean(session?.user?.isAdmin)) : []; return ( @@ -158,13 +162,7 @@ export function AppSidebar() { className="h-full w-full object-cover" /> ) : ( - ByteSend + )}

@@ -199,13 +197,7 @@ export function AppSidebar() { className="h-full w-full object-cover" /> ) : ( - {team.name} + )}
{team.name} @@ -227,6 +219,48 @@ export function AppSidebar() { + {inAdmin ? ( + <> + + + + + + + + Back to dashboard + + + + + + + {adminGroups.map((group, index) => ( + + {group.label ? ( + + {group.label} + + ) : null} + + + {group.items.map((item) => ( + + + + + {item.label} + + + + ))} + + + + ))} + + ) : ( + <> General @@ -280,6 +314,8 @@ export function AppSidebar() { + + )} diff --git a/apps/web/src/components/FullScreenLoading.tsx b/apps/web/src/components/FullScreenLoading.tsx index f784038..64aed6c 100644 --- a/apps/web/src/components/FullScreenLoading.tsx +++ b/apps/web/src/components/FullScreenLoading.tsx @@ -1,18 +1,12 @@ import { useTheme } from "@bytesend/ui"; -import Image from "next/image"; +import { BrandMark } from "~/lib/brand"; export const FullScreenLoading = () => { const { resolvedTheme } = useTheme(); return (
- ByteSend +

Loading...

diff --git a/apps/web/src/components/auth/ProfileSetup.tsx b/apps/web/src/components/auth/ProfileSetup.tsx index 0b2dd2e..ea167c8 100644 --- a/apps/web/src/components/auth/ProfileSetup.tsx +++ b/apps/web/src/components/auth/ProfileSetup.tsx @@ -7,8 +7,8 @@ import { Input } from "@bytesend/ui/src/input"; import { Label } from "@bytesend/ui/src/label"; import { Avatar, AvatarFallback, AvatarImage } from "@bytesend/ui/src/avatar"; import Spinner from "@bytesend/ui/src/spinner"; -import Image from "next/image"; import { api } from "~/trpc/react"; +import { BrandMark } from "~/lib/brand"; export function ProfileSetup() { const { data: session, update } = useSession(); @@ -52,13 +52,7 @@ export function ProfileSetup() { {/* Header */}
- ByteSend +

Set up your profile

diff --git a/apps/web/src/components/marketing/CallToAction.tsx b/apps/web/src/components/marketing/CallToAction.tsx index 32881ad..cd43072 100644 --- a/apps/web/src/components/marketing/CallToAction.tsx +++ b/apps/web/src/components/marketing/CallToAction.tsx @@ -15,7 +15,7 @@ export function CallToAction() {

Start sending today.

- Create a free account in seconds and send 12,500 transactional emails a month, free, for as long as you like. + Create a free account in seconds and send 5,000 emails a month, free, for as long as you like.

diff --git a/apps/web/src/components/marketing/Comparison.tsx b/apps/web/src/components/marketing/Comparison.tsx index d32bf96..b6c678f 100644 --- a/apps/web/src/components/marketing/Comparison.tsx +++ b/apps/web/src/components/marketing/Comparison.tsx @@ -8,7 +8,7 @@ import { Button } from "@bytesend/ui/src/button"; const COMPARISON_CHECKED = "October 2026"; const comparisonRows: { feature: string; bs: string | boolean; resend: string | boolean; sendgrid: string | boolean; postmark: string | boolean; ses: string | boolean }[] = [ - { feature: "Free tier", bs: "12,500/mo", resend: "3,000/mo (100/day)", sendgrid: "60-day trial", postmark: "100/mo", ses: "Pay-per-use" }, + { feature: "Free tier", bs: "5,000/mo (200/day)", resend: "3,000/mo (100/day)", sendgrid: "60-day trial", postmark: "100/mo", ses: "Pay-per-use" }, { feature: "Marketing campaigns", bs: true, resend: true, sendgrid: true, postmark: "Broadcast API", ses: false }, { feature: "Visual email editor", bs: true, resend: true, sendgrid: true, postmark: false, ses: false }, { feature: "Self-hostable", bs: true, resend: false, sendgrid: false, postmark: false, ses: false }, diff --git a/apps/web/src/components/marketing/Hero.tsx b/apps/web/src/components/marketing/Hero.tsx index b5e73ec..a15b0d9 100644 --- a/apps/web/src/components/marketing/Hero.tsx +++ b/apps/web/src/components/marketing/Hero.tsx @@ -15,13 +15,13 @@ export function Hero() {
New - Spam protection, region moves and a new look in v0.4 + A new dashboard, DNS monitoring and team alerts in v0.7 @@ -50,7 +50,7 @@ export function Hero() {

- No credit card · 12,500 emails a month free · Open source + No credit card · 5,000 emails a month free · Open source

diff --git a/apps/web/src/components/marketing/PricingCalculator.tsx b/apps/web/src/components/marketing/PricingCalculator.tsx index c95cf0f..546edc8 100644 --- a/apps/web/src/components/marketing/PricingCalculator.tsx +++ b/apps/web/src/components/marketing/PricingCalculator.tsx @@ -1,7 +1,7 @@ "use client"; import React from "react"; -import { PLANS } from "@bytesend/lib"; +import { PLANS, SOLD_PAID_PLANS, type SoldPaidPlan } from "@bytesend/lib"; type SliderProps = { label: string; @@ -81,10 +81,7 @@ function Slider({ } export function PricingCalculator() { - type PaidPlanKey = "HOBBY" | "LITE" | "BASIC"; - - const planOptions: PaidPlanKey[] = ["HOBBY", "LITE", "BASIC"]; - const [selectedPlan, setSelectedPlan] = React.useState("LITE"); + const [selectedPlan, setSelectedPlan] = React.useState("BASIC"); const [marketing, setMarketing] = React.useState(25000); const [transactional, setTransactional] = React.useState(25000); @@ -109,13 +106,13 @@ export function PricingCalculator() { const estimatedTotal = baseMonthly + marketingOverageCost + transactionalOverageCost; const formatRatePerThousand = (value: number) => - `CA$${(value * 1000).toFixed(2)}/1,000`; + `$${(value * 1000).toFixed(2)}/1,000`; return (
- {planOptions.map((planKey) => { + {SOLD_PAID_PLANS.map((planKey) => { const planLabel = PLANS[planKey].displayName; const isSelected = selectedPlan === planKey; return ( @@ -180,28 +177,28 @@ export function PricingCalculator() {
Plan base
-
CA${baseMonthly.toFixed(2)}
+
${baseMonthly.toFixed(2)}
{plan.displayName} monthly
Marketing overage
-
CA${marketingOverageCost.toFixed(2)}
+
${marketingOverageCost.toFixed(2)}
{Math.round(marketingOverage).toLocaleString()} estimated overage emails
Transactional overage
-
CA${transactionalOverageCost.toFixed(2)}
+
${transactionalOverageCost.toFixed(2)}
{Math.round(transactionalOverage).toLocaleString()} estimated overage emails
Estimated Total
-
CA${estimatedTotal.toFixed(2)}
+
${estimatedTotal.toFixed(2)}
{totalEmails <= included ? "Within included monthly volume" diff --git a/apps/web/src/components/marketing/PricingSection.tsx b/apps/web/src/components/marketing/PricingSection.tsx index 84b281b..b04f4d7 100644 --- a/apps/web/src/components/marketing/PricingSection.tsx +++ b/apps/web/src/components/marketing/PricingSection.tsx @@ -16,7 +16,7 @@ export function Pricing() { Simple pricing that grows with you

- Start free with 12,500 transactional emails a month. Estimate a paid plan for your + Start free with 5,000 emails a month. Estimate a paid plan for your transactional and marketing volume below, then pick it in the dashboard when you're ready.

diff --git a/apps/web/src/components/marketing/SiteFooter.tsx b/apps/web/src/components/marketing/SiteFooter.tsx index 31b9464..12d2921 100644 --- a/apps/web/src/components/marketing/SiteFooter.tsx +++ b/apps/web/src/components/marketing/SiteFooter.tsx @@ -1,8 +1,8 @@ -import Image from "next/image"; import Link from "next/link"; import { FaDiscord, FaGithub, FaXTwitter } from "react-icons/fa6"; import { SiBluesky } from "react-icons/si"; import { env } from "~/env"; +import { BrandMark } from "~/lib/brand"; const isCloud = env.NEXT_PUBLIC_IS_CLOUD; @@ -14,7 +14,7 @@ export function SiteFooter() { {/* Left: brand + links */}
- ByteSend + ByteSend