Skip to content

Commit

Permalink
Update README.md (#57)
Browse files Browse the repository at this point in the history
* Update README.md

* remove pricing

* add additional support to readme

* update nextjs

* remove unnecessary templates

* update additional support message

* update pricing messaging
  • Loading branch information
matthewwong525 authored Apr 8, 2024
1 parent 6fd9c30 commit b53afcf
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 92 deletions.
93 changes: 61 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -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) |
1 change: 0 additions & 1 deletion flutter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions nextjs/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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"

3 changes: 1 addition & 2 deletions nextjs/.env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion nextjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ cp .env.example .env
npm install
npm run dev
```
5. [Setup your own Supabase instance](../supabase)

## Stack

Expand Down
62 changes: 33 additions & 29 deletions nextjs/components/ui/Pricing/Pricing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type Props = {

type Price = {
id: string;
ctaText: string;
redirectURL?: string;
emphasize?: boolean;
description?: string;
Expand All @@ -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[];
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -137,19 +144,17 @@ export default function Pricing({ user }: Props) {
Pricing Plans
</h1>
<p className="max-w-2xl m-auto mt-5 text-xl text-zinc-200 sm:text-center sm:text-2xl">
<b>Free, open-source code</b>,<br />
but paid documentation and support
Support me by purchasing premium support from yours truly :)
</p>
<div className="relative self-center mt-6 bg-zinc-900 rounded-lg p-0.5 flex sm:mt-8 border border-zinc-800">
{intervals.includes('month') && (
<button
onClick={() => setBillingInterval('month')}
type="button"
className={`${
billingInterval === 'month'
? 'relative w-1/2 bg-zinc-700 border-zinc-800 shadow-sm text-white'
: 'ml-0.5 relative w-1/2 border border-transparent text-zinc-400'
} rounded-md m-1 py-2 text-sm font-medium whitespace-nowrap focus:outline-none focus:ring-2 focus:ring-pink-500 focus:ring-opacity-50 focus:z-10 sm:w-auto sm:px-8`}
className={`${billingInterval === 'month'
? 'relative w-1/2 bg-zinc-700 border-zinc-800 shadow-sm text-white'
: 'ml-0.5 relative w-1/2 border border-transparent text-zinc-400'
} rounded-md m-1 py-2 text-sm font-medium whitespace-nowrap focus:outline-none focus:ring-2 focus:ring-pink-500 focus:ring-opacity-50 focus:z-10 sm:w-auto sm:px-8`}
>
Monthly billing
</button>
Expand All @@ -158,11 +163,10 @@ export default function Pricing({ user }: Props) {
<button
onClick={() => setBillingInterval('year')}
type="button"
className={`${
billingInterval === 'year'
? 'relative w-1/2 bg-zinc-700 border-zinc-800 shadow-sm text-white'
: 'ml-0.5 relative w-1/2 border border-transparent text-zinc-400'
} rounded-md m-1 py-2 text-sm font-medium whitespace-nowrap focus:outline-none focus:ring-2 focus:ring-pink-500 focus:ring-opacity-50 focus:z-10 sm:w-auto sm:px-8`}
className={`${billingInterval === 'year'
? 'relative w-1/2 bg-zinc-700 border-zinc-800 shadow-sm text-white'
: 'ml-0.5 relative w-1/2 border border-transparent text-zinc-400'
} rounded-md m-1 py-2 text-sm font-medium whitespace-nowrap focus:outline-none focus:ring-2 focus:ring-pink-500 focus:ring-opacity-50 focus:z-10 sm:w-auto sm:px-8`}
>
Yearly billing
</button>
Expand Down Expand Up @@ -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}
</Button>
</div>
</div>
Expand Down
21 changes: 0 additions & 21 deletions supabase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)



4 changes: 0 additions & 4 deletions supabase/functions/stripe_webhook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit b53afcf

Please sign in to comment.