From 20a28a15330e5f9eb73ab36d4df04fe4425fcc1d Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Sat, 6 Jan 2024 18:04:00 +0100 Subject: [PATCH] Website: sentry checkout --- package.json | 3 + .../src/components/sentry/SentryCheckout.jsx | 123 +++++ website/src/pages/sentry.mdx | 462 +++++++++--------- website/src/pages/sentry/docs.mdx | 2 + 4 files changed, 372 insertions(+), 218 deletions(-) create mode 100644 website/src/components/sentry/SentryCheckout.jsx diff --git a/package.json b/package.json index 4c9aea7fd..9fdfdf030 100644 --- a/package.json +++ b/package.json @@ -14,5 +14,8 @@ "eslint-config-prettier": "^8.8.0", "eslint-plugin-import": "^2.27.5", "prettier": "^2.8.8" + }, + "dependencies": { + "@headlessui/react": "^1.7.17" } } diff --git a/website/src/components/sentry/SentryCheckout.jsx b/website/src/components/sentry/SentryCheckout.jsx new file mode 100644 index 000000000..d6b336b85 --- /dev/null +++ b/website/src/components/sentry/SentryCheckout.jsx @@ -0,0 +1,123 @@ +import { Fragment, useRef, useState } from 'react' +import { Dialog, Switch, Transition } from '@headlessui/react'; +import { ArrowPathIcon } from '@heroicons/react/24/outline' + +function classNames(...classes) { + return classes.filter(Boolean).join(' ') +} + +export default function SentryCheckout({ open, setOpen, price, linkSingle, linkSubscription }) { + const [renewalEnabled, setRenewalEnabled] = useState(false); + const cancelButtonRef = useRef(null); + + return ( + + + +
+ + +
+
+ + +
+
+
+
+
+ + Enable yearly license renewal? + +
+
+ Do you want to enable automatic license renewal every year? You can + cancel it anytime. +
+
+ Without license renewal, you will stop receiving updates after 1 + year. +
+
+ + + + + Automatic license renewal{' '} + (every year) + + + {renewalEnabled ? ( +
+ {price}€ per year, cancel anytime, unlimited updates +
+ ) : ( +
+ {price}€, one-time payment,{" "} + + {" "}no updates after 1 year + +
+ )} +
+
+
+
+ + +
+
+
+
+
+
+
+ ) +} diff --git a/website/src/pages/sentry.mdx b/website/src/pages/sentry.mdx index f25c033dd..e6fbc5b62 100644 --- a/website/src/pages/sentry.mdx +++ b/website/src/pages/sentry.mdx @@ -4,238 +4,264 @@ import Image from 'next/image'; import Breadcrumbs from '../components/Breadcrumbs'; import { CheckIcon } from '@heroicons/react/20/solid' import { NextSeo } from 'next-seo'; +import SentryCheckout from '../components/sentry/SentryCheckout'; +import { useState } from 'react'; -export const features = [ - { - name: 'Exception tracking.', - description: 'Add exception tracking to AWS Lambda handlers like SQS, EventBridge, S3 handlers, and more.', - icon: BugAntIcon, - }, - { - name: 'Cold start tracking.', - description: 'Track cold starts and Bref startup duration in Sentry performance tracing.', - icon: ClockIcon, - }, - { - name: 'Lambda handler performance tracking.', - description: 'Trace the performance of event-driven PHP Lambda handlers (SQS, EventBridge, etc.).', - icon: CodeBracketSquareIcon, - }, - { - name: 'AWS SDK tracking.', - description: 'Measure AWS SDK calls in performance tracing to troubleshoot performance issues.', - icon: FingerPrintIcon, - }, -] + -
-
-
- -

- Sentry integration for AWS Lambda -

-
- Advanced Sentry integration for PHP applications running on AWS Lambda. Track cold starts, event-driven invocations, and more. -
- -
-
-
-
- Sentry integration for AWS Lambda - -
-
-
- {features.map((feature) => ( -
-
-
- {' '} -
{feature.description}
-
- ))} -
-
-
+export function Sentry() { + const [openCheckout, setOpenCheckout] = useState(false); + const [checkoutPrice, setCheckoutPrice] = useState(''); + const [checkoutLinkSingle, setCheckoutLinkSingle] = useState(''); + const [checkoutLinkSubscription, setCheckoutLinkSubscription] = useState(''); + function classNames(...classes) { + return classes.filter(Boolean).join(' ') + } -export const tiers = [ - { - name: 'Single project', - id: 'single-license', - href: '#', - price: '€99', - features: [ - 'Single project', - 'Unlimited users', - 'Composer package & documentation', - 'Free updates for one year', - 'Optional yearly license renewals', - ], - featured: false, - }, - { - name: 'Unlimited', - id: 'unlimited-license', - href: '#', - price: '€299', - features: [ - 'Unlimited projects', - 'Unlimited users', - 'Composer package & documentation', - 'Free updates for one year', - 'Optional yearly license renewals', - 'Email support', - ], - featured: true, - }, -]; + function doOpenCheckout(price, linkSingle, linkSubscription) { + setOpenCheckout(true); + setCheckoutPrice(price); + setCheckoutLinkSingle(linkSingle); + setCheckoutLinkSubscription(linkSubscription); + } -export function classNames(...classes) { - return classes.filter(Boolean).join(' ') -} + const tiers = [ + { + name: 'Single project', + id: 'single-license', + linkSingle: 'https://bref.lemonsqueezy.com/checkout/buy/cfb8de93-1f0e-41fa-868b-4fa3ab68fea0', + linkSubscription: 'https://bref.lemonsqueezy.com/checkout/buy/0f4f58f4-4449-4fb9-89d6-c22b9fc41691', + price: '99', + features: [ + 'Single project', + 'Unlimited users', + 'Composer package & documentation', + 'Free updates for one year', + 'Optional yearly license renewals', + ], + featured: false, + }, + { + name: 'Unlimited', + id: 'unlimited-license', + linkSingle: 'https://bref.lemonsqueezy.com/checkout/buy/e9d8ed0f-f0af-44e3-9718-742ac90e1e51', + linkSubscription: 'https://bref.lemonsqueezy.com/checkout/buy/0792799d-c2e8-402a-96d4-409bf4a6f04d', + price: '299', + features: [ + 'Unlimited projects', + 'Unlimited users', + 'Composer package & documentation', + 'Free updates for one year', + 'Optional yearly license renewals', + 'Email support', + ], + featured: true, + }, + ]; -
- + const features = [ + { + name: 'Exception tracking.', + description: 'Add exception tracking to AWS Lambda handlers like SQS, EventBridge, S3 handlers, and more.', + icon: BugAntIcon, + }, + { + name: 'Cold start tracking.', + description: 'Track cold starts and Bref startup duration in Sentry performance tracing.', + icon: ClockIcon, + }, + { + name: 'Lambda handler performance tracking.', + description: 'Trace the performance of event-driven PHP Lambda handlers (SQS, EventBridge, etc.).', + icon: CodeBracketSquareIcon, + }, + { + name: 'AWS SDK tracking.', + description: 'Measure AWS SDK calls in performance tracing to troubleshoot performance issues.', + icon: FingerPrintIcon, + }, + ]; + const faqs = [ + { + question: 'Where can I learn more about each feature?', + answer: 'You can find more information about each feature in the documentation.', + }, + { + question: 'What is a considered a "project"?', + answer: 'You can use a single project license on a single "service" or "application" (for example a Laravel or a Symfony project), regardless if you deploy it in multiple environments (like "dev", "staging", "production"…) or if you deploy multiple AWS Lambda functions in that application. However, if you deploy multiple applications, multiple services, or deploy the same application for multiple customers (aka multi-tenant), you need an "Unlimited" license (or a license for each application).', + }, + { + question: 'Do I get invoices?', + answer: 'Yes, you will receive an invoice by email after your purchase.', + }, + { + question: 'What is the refund policy?', + answer: '7-days, full refund, no questions asked.', + }, + { + question: 'Can I use an unlimited license for all of my client projects?', + answer: 'Not exactly. An unlimited license provides you unlimited access to Nova for all of your projects, but it doesn\'t mean your client is also allowed to use your license. Your clients will need their own license to use Nova for their projects.', + }, + { + question: 'Are there any bulk pricing options?', + answer: 'That is possible, please get in touch.', + }, + ]; -export const faqs = [ - { - question: 'Where can I learn more about each feature?', - answer: 'You can find more information about each feature in the documentation.', - }, - { - question: 'What is a considered a "project"?', - answer: 'You can use a single project license on a single "service" or "application" (for example a Laravel or a Symfony project), regardless if you deploy it in multiple environments (like "dev", "staging", "production"…) or if you deploy multiple AWS Lambda functions in that application. However, if you deploy multiple applications, multiple services, or deploy the same application for multiple customers (aka multi-tenant), you need an "Unlimited" license (or a license for each application).', - }, - { - question: 'Do I get invoices?', - answer: 'Yes, you will receive an invoice by email after your purchase.', - }, - { - question: 'What is the refund policy?', - answer: '7-days, full refund, no questions asked.', - }, - { - question: 'Can I use an unlimited license for all of my client projects?', - answer: 'Not exactly. An unlimited license provides you unlimited access to Nova for all of your projects, but it doesn\'t mean your client is also allowed to use your license. Your clients will need their own license to use Nova for their projects.', - }, - { - question: 'Are there any bulk pricing options?', - answer: 'That is possible, please get in touch.', - }, -] + return ( +
+ -
-
-
-
-

Frequently asked questions

-
- Can’t find the answer you’re looking for? Reach out via email. +
+
+
+ +

+ Sentry integration for AWS Lambda +

+
+ Advanced Sentry integration for PHP applications running on AWS Lambda. Track cold starts, event-driven invocations, and more. +
+ +
+
+
+
+ Sentry integration for AWS Lambda + +
+
+
+ {features.map((feature) => ( +
+
+
+ {' '} +
{feature.description}
+
+ ))} +
-
-
- {faqs.map((faq) => ( -
-
{faq.question}
-
+ +
+
+
+
+ Invoices and receipts available for easy company reimbursement. +
+
+ +
+
+
+
+

Frequently asked questions

+
+ Can’t find the answer you’re looking for? Reach out via email. +
+
+
+
+ {faqs.map((faq) => ( +
+
{faq.question}
+
+
+ ))} +
+
+
+
-
-
+ ) +} diff --git a/website/src/pages/sentry/docs.mdx b/website/src/pages/sentry/docs.mdx index 865059d35..4df69118b 100644 --- a/website/src/pages/sentry/docs.mdx +++ b/website/src/pages/sentry/docs.mdx @@ -14,6 +14,8 @@ This package provides an advanced integration between Bref applications and [Sen - Capture exceptions and trace event handlers using the [function runtime](/docs/runtimes/function) (like EventBridge, SQS, S3…) - Trace AWS SDK calls in performance tracing +Check out the documentation below for screenshots and more details. + ## Installation Before getting started, make sure you have set up Sentry in your application ([documentation for PHP](https://docs.sentry.io/platforms/php/), [for Laravel](https://docs.sentry.io/platforms/php/guides/laravel/) or [for Symfony](https://docs.sentry.io/platforms/php/symfony/)).