From b53afcf20b62d47dac6431b0cb0caaf558a01550 Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Mon, 8 Apr 2024 15:08:09 -0400 Subject: [PATCH] Update README.md (#57) * Update README.md * remove pricing * add additional support to readme * update nextjs * remove unnecessary templates * update additional support message * update pricing messaging --- README.md | 93 ++++++++++++++-------- flutter/README.md | 1 - nextjs/.env.example | 3 +- nextjs/.env.local.example | 3 +- nextjs/README.md | 1 - nextjs/components/ui/Pricing/Pricing.tsx | 62 ++++++++------- supabase/README.md | 21 ----- supabase/functions/stripe_webhook/index.ts | 4 - 8 files changed, 96 insertions(+), 92 deletions(-) diff --git a/README.md b/README.md index c5e38b4..bcc7b55 100644 --- a/README.md +++ b/README.md @@ -1,61 +1,90 @@ # Production Boilerplate for Startups -**Community**: [Join Discord](https://discord.gg/8cUHbgAHXH) +[Join Discord Community](https://discord.gg/8cUHbgAHXH) + +[See Documentation](https://startup-template.gitbook.io/docs/) ## Getting Started -Choose Flutter or NextJS +To get started, choose which frontend you need and go from there: - [Choose Flutter](./flutter/README.md) if you plan to build or expand into cross-platform apps (e.g. Duolingo, Fitbit, Spotify, Tinder, etc.) -- [Choose NextJS](./nextjs/README.md) if SEO, page load speeds, and web-specific libraries are integral to your app (e.g. Shopify, Medium, etc.) +- [Choose NextJS](./nextjs/README.md) if SEO, page load speeds, and web-specific libraries are integral to your app (e.g. Shopify, Medium, Wix, etc.) Additionally, it's also possible to start with one-platform and move onto the next one depending on your needs. For example, start with Next.JS and then move to Flutter when a mobile app is needed. Both are configured to work straight out of the box. ## What's Included: -### Frontend ([Flutter](./flutter/README.md) or [NextJS](./nextjs/README.md)) +### Mobile / Desktop / Web App ([Flutter](./flutter/README.md)) + +- State Management ([riverpod](https://pub.dev/packages/riverpod)) +- Routing ([go_router](https://pub.dev/packages/go_router)) +- Payments with Stripe +- Authentication with Supabase +- 🚧 [Frontend Tests](https://github.com/devtodollars/flutter-supabase-production-template/issues/4) 🚧 +- 🚧 [Adjustable Theme](https://github.com/devtodollars/startup-boilerplate/issues/40) 🚧 + +### Landing Page / Web App ([NextJS](./nextjs/README.md)) + +- App Router +- Typescript +- Payments with Stripe +- Authentication with Supabase +- 🚧 [Landing Page Template](https://github.com/devtodollars/startup-boilerplate/issues/54) 🚧 ### Backend ([Supabase](./supabase/README.md)) -* Authentication - * Email + PW - * SSO (Google, Github, etc.) -* Fully configured for local development from day one -* 🚧 [backend tests](https://github.com/devtodollars/flutter-supabase-production-template/issues/16) 🚧 +- Authentication + - Email + PW + - SSO (Google, Github, etc.) +- Fully configured for local development from day one +- 🚧 [backend tests](https://github.com/devtodollars/flutter-supabase-production-template/issues/16) 🚧 ### Analytics ([Posthog](https://posthog.com/)) -* Unified analytics across frontend and backend based on `user_id` - * Frontend analytics comes pre-installed for iOS, Android, Web, and MacOS - * Backend analytics installed and linked to frontend analytics -* Basic events captured: - * `user signs in` - * `user signs up` - * `user deletes account` - * `user starts checkout` - * `user opens billing portal` - * `user completes checkout` +- Unified analytics across frontend and backend based on `user_id` + - Frontend analytics comes pre-installed for iOS, Android, Web, and MacOS + - Backend analytics installed and linked to frontend analytics +- Basic events captured: + - `user signs in` + - `user signs up` + - `user deletes account` + - `user starts checkout` + - `user opens billing portal` + - `user completes checkout` ### Payments ([Stripe](https://stripe.com/en-ca)) -* Stripe fully setup and works with one-time payments and subscriptions - * `stripe` table to store `stripe_customer_id` and current `active_products` - * Stripe webhook to sync user subscriptions from stripe to supabase - * Deno function to retrieve the billing portal url or a checkout session url which works with the `payments_screen` +- Stripe fully setup and works with one-time payments and subscriptions + - `stripe` table to store `stripe_customer_id` and current `active_products` + - Stripe webhook to sync user subscriptions from stripe to supabase + - Deno function to retrieve the billing portal url or a checkout session url which works with the `payments_screen` ### Release ([Github Actions](https://github.com/features/actions)) -* Script to `bumpversion.sh` following semantic versioning -* Deploys a web preview on Netlify for every PR -* Publishing pipeline to publish to Netlify and to publish supabase functions -* 🚧 [Workflow to create signed releases for Android and iOS](https://github.com/devtodollars/flutter-supabase-production-template/issues/22) 🚧 +- Script to `bumpversion.sh` following semantic versioning +- Deploys a web preview on Netlify for every PR +- Publishing pipeline to publish to Netlify and to publish supabase functions +- 🚧 [Automated Mobile Publishing](https://github.com/devtodollars/flutter-supabase-production-template/issues/22) 🚧 ### Emails ([Postmark](https://postmarkapp.com/)) -* Send transactional emails -* DNS setup to avoid spam folder (DKIM, DMARC, SPF in subdomain) -* Simplify email updates by using postmark templates +- Send transactional emails +- DNS setup to avoid spam folder (DKIM, DMARC, SPF in subdomain) +- Simplify email updates by using postmark templates + +### 🚧 [Blog / Docs](https://github.com/devtodollars/startup-boilerplate/issues/56) ([Nextra](https://nextra.site/)) 🚧 + +### 🚧 [Error Monitoring](https://github.com/devtodollars/flutter-supabase-production-template/issues/18) ([Sentry](https://sentry.io/welcome/)) 🚧 + +## Additional Support +Support me by purchasing premium support from yours truly :) -### 🚧 Error Monitoring ([Sentry](https://sentry.io/welcome/)) 🚧 -TODO: based on [demand](https://github.com/devtodollars/flutter-supabase-production-template/issues/18). +| Code + Docs (**$0**) | Premium Support (**$49**) | I'll Build Your MVP (**$5000~**) | +| ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | +| ✓ Code | ✓ 30 Min Setup Call | ✓ Completed MVP | +| ✓ Documentation | ✓ Premium Discord Support | ✓ Technical Co-founder | +| ✓ Discord Community | ✓ Weekly Office Hours | | +| ✓ Life-time Updates | | | +| [View Code](https://github.com/devtodollars/startup-boilerplate) | [Buy Now](https://flutter.devtodollars.com/payments?price=price_1P3MEnFttF99a1NCjNcCLLvA) | [Book a Call](https://usemotion.com/meet/ithinkwong/mvp-consulting?d=30) | diff --git a/flutter/README.md b/flutter/README.md index 162fa8c..672ab78 100644 --- a/flutter/README.md +++ b/flutter/README.md @@ -22,7 +22,6 @@ cd YOUR_APP_NAME cd flutter flutter run -d chrome --dart-define-from-file=env.json ``` -4. [Setup your own Supabase instance](../supabase) ## Stack diff --git a/nextjs/.env.example b/nextjs/.env.example index 8205f12..d56ff18 100644 --- a/nextjs/.env.example +++ b/nextjs/.env.example @@ -4,6 +4,5 @@ NEXT_PUBLIC_SITE_URL="http://localhost:3000" NEXT_PUBLIC_SUPABASE_URL="https://crnytzptlghehxsarjxm.supabase.co" NEXT_PUBLIC_SUPABASE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNybnl0enB0bGdoZWh4c2FyanhtIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDkyMjQxNjgsImV4cCI6MjAyNDgwMDE2OH0.UW1dHRt4hGF6uCdPXimxv0Ggwq5uJ1WoQuCZ1_ixmCU" -NEXT_PUBLIC_STRIPE_DOCS_PRICE_ID="price_1OovJ2FttF99a1NC1hbOKGdg" -NEXT_PUBLIC_STRIPE_DOCS_AND_SUPPORT_PRICE_ID="price_1OovHjFttF99a1NCrlGTo2ue" +NEXT_PUBLIC_STRIPE_PREMIUM_SUPPORT_PRICE_ID="price_1P3MEnFttF99a1NCjNcCLLvA" diff --git a/nextjs/.env.local.example b/nextjs/.env.local.example index 4906218..f21c04e 100644 --- a/nextjs/.env.local.example +++ b/nextjs/.env.local.example @@ -5,8 +5,7 @@ NEXT_PUBLIC_SUPABASE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJz NEXT_PUBLIC_SUPABASE_URL="http://127.0.0.1:54321" # stripe env variables -NEXT_PUBLIC_STRIPE_DOCS_PRICE_ID="price_1Oq6bXFttF99a1NCdZqHlQ8J" -NEXT_PUBLIC_STRIPE_DOCS_AND_SUPPORT_PRICE_ID="price_1OqIefFttF99a1NCezXvAtcM" +NEXT_PUBLIC_STRIPE_PREMIUM_SUPPORT_PRICE_ID="price_1P3MEnFttF99a1NCjNcCLLvA" # posthog env variables NEXT_PUBLIC_POSTHOG_HOST="https://app.posthog.com" diff --git a/nextjs/README.md b/nextjs/README.md index 3d1a8bf..724927d 100644 --- a/nextjs/README.md +++ b/nextjs/README.md @@ -25,7 +25,6 @@ cp .env.example .env npm install npm run dev ``` -5. [Setup your own Supabase instance](../supabase) ## Stack diff --git a/nextjs/components/ui/Pricing/Pricing.tsx b/nextjs/components/ui/Pricing/Pricing.tsx index 3cb4ec3..0a6285b 100644 --- a/nextjs/components/ui/Pricing/Pricing.tsx +++ b/nextjs/components/ui/Pricing/Pricing.tsx @@ -16,6 +16,7 @@ type Props = { type Price = { id: string; + ctaText: string; redirectURL?: string; emphasize?: boolean; description?: string; @@ -27,32 +28,37 @@ type Price = { const prices = [ { - id: process.env.NEXT_PUBLIC_STRIPE_DOCS_PRICE_ID!, - name: 'Docs', - features: ['✓ Private Documentation'], - cost: '$99' + name: 'Docs + Code', + features: [ + '✓ Code', + '✓ Documentation', + '✓ Life-time Updates', + '✓ Discord Community' + ], + cost: '$0', + redirectURL: 'https://github.com/devtodollars/startup-boilerplate', + ctaText: "View Code", }, { - id: process.env.NEXT_PUBLIC_STRIPE_DOCS_AND_SUPPORT_PRICE_ID!, - name: 'Docs + Support', + id: process.env.NEXT_PUBLIC_STRIPE_PREMIUM_SUPPORT_PRICE_ID!, + ctaText: "Buy Now", + name: 'Premium Support', features: [ - '✓ Private Documentation', - '✓ Discord – Text Support', - '✓ Discord – Weekly Office Hours', - '✓ 30 min Consulting ($50 value)' + '✓ 30 Min Setup Call', + '✓ Premium Discord Support', + '✓ Weekly Office Hours', ], - cost: '$129', - emphasize: true + cost: '$49', + emphasize: true, }, { name: "I'll Build Your MVP", + ctaText: "Book a Call", features: [ - '✓ Technical Co-founder', '✓ Completed MVP', - '✓ Landing Page', - '✓ Code Documentation' + '✓ Technical Co-founder', ], - cost: '$5000', + cost: '$5000~', redirectURL: 'https://usemotion.com/meet/ithinkwong/mvp-consulting?d=30' } ] as Price[]; @@ -80,6 +86,7 @@ export default function Pricing({ user }: Props) { } const supabase = createClient(); + console.log(price.id); const { data, error } = await supabase.functions.invoke('get_stripe_url', { body: { return_url: getURL(), @@ -137,19 +144,17 @@ export default function Pricing({ user }: Props) { Pricing Plans

- Free, open-source code,
- but paid documentation and support + Support me by purchasing premium support from yours truly :)

{intervals.includes('month') && ( @@ -158,11 +163,10 @@ export default function Pricing({ user }: Props) { @@ -216,7 +220,7 @@ export default function Pricing({ user }: Props) { onClick={() => handleClick(price)} className="block w-full py-2 mt-8 text-sm font-semibold text-center text-white rounded-md hover:bg-zinc-900" > - {subscription ? 'Manage' : 'Subscribe'} + {price.ctaText}
diff --git a/supabase/README.md b/supabase/README.md index 8e85dab..4d866c1 100644 --- a/supabase/README.md +++ b/supabase/README.md @@ -2,24 +2,3 @@ [Supabase](https://supabase.com) Backend configured with stripe integration, posthog analytics, and postmark transactional emails. -## Pricing - -Either spend *13+ hours* piecing together documentation from separate websites or support me and get started in **under 30 minutes** - -🎁 **Early Bird Special**: Use code `MARCH30` to get 50% OFF (Expires March 30th, 2024) - -| Docs (**$99**) | Docs + Support (**$129**) | I'll Build Your MVP (**$5000**) | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | -| ✓ Private Documentation | ✓ Private Documentation | ✓ Technical Co-founder | -| | ✓ Discord – Text Support | ✓ Completed MVP | -| | ✓ Discord – Weekly Office Hours | ✓ Landing Page | -| | ✓ 30 min Consulting ($50 value) | ✓ Code Documentation | -| [Buy Now](https://flutter.devtodollars.com/payments?price=price_1Oq6bXFttF99a1NCdZqHlQ8J) | [Buy Now](https://flutter.devtodollars.com/payments?price=price_1OqIefFttF99a1NCezXvAtcM) | [Book a Call](https://usemotion.com/meet/ithinkwong/mvp-consulting?d=30) | - -![Export-1712323268776](https://github.com/devtodollars/startup-boilerplate/assets/20890995/3f285eea-e0ee-43ca-8d1e-f6ac845e6319) - -## Documentation Preview -![Documentation Preview](https://framerusercontent.com/images/t2DoTrygMH9T2zmkLSLL4HbRwX4.png) - - - diff --git a/supabase/functions/stripe_webhook/index.ts b/supabase/functions/stripe_webhook/index.ts index 3f979a9..ebd418a 100644 --- a/supabase/functions/stripe_webhook/index.ts +++ b/supabase/functions/stripe_webhook/index.ts @@ -109,10 +109,6 @@ async function sendPurchaseEmail(products: string[], to: string) { let template = ""; if (product === "prod_PfRVCVqv8fBrxN") { template = "paid-docs-support"; - } else if (product === "prod_PfRUhnTnwtHLvw") { - template = "paid-docs"; - } else if (product === "prod_PfRXymhiBMCUZo") { - template = "paid-consulting"; } if (template) { await sendEmail({ to, template });