This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NEXT_PUBLIC_APIGATEWAY_ENDPOINT= | |
NEXT_PUBLIC_REGION= | |
NEXT_PUBLIC_USER_POOL_ID= | |
NEXT_PUBLIC_USER_POOL_CLIENT_ID= | |
NEXT_PUBLIC_AWS_ID= | |
NEXT_PUBLIC_AWS_SECRET= | |
NEXT_PUBLIC_PRODUCT_TABLE= | |
NEXT_PUBLIC_BUCKET= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// StepFunctionsProxy/handler.ts | |
import { StartExecutionCommand, SFNClient } from "@aws-sdk/client-sfn"; | |
const stepFunctions = new SFNClient({}); | |
export const handler = async (event: any) => { | |
console.log(JSON.stringify(event, null, 2)); | |
const orderString = JSON.parse(event.body); | |
console.log({ orderString }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// handler.ts | |
import { DynamoDBClient, PutItemCommand } from "@aws-sdk/client-dynamodb"; | |
import { ulid } from "ulid"; | |
const client = new DynamoDBClient({}); | |
export const handler = async ({ | |
order, | |
}: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// handler.ts | |
import { DynamoDBClient, UpdateItemCommand } from "@aws-sdk/client-dynamodb"; | |
const client = new DynamoDBClient({}); | |
export const handler = async ({ | |
item: { itemId, quantity }, | |
}: { | |
item: { itemId: string; quantity: number }; | |
}): Promise<void> => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { DynamoDBClient, PutItemCommand } from "@aws-sdk/client-dynamodb"; | |
import { PutObjectCommand, S3Client } from "@aws-sdk/client-s3"; | |
import { getSignedUrl } from "@aws-sdk/s3-request-presigner"; | |
import { ulid } from "ulid"; | |
const dynamoDBClient = new DynamoDBClient({}); | |
const s3Client = new S3Client({}); | |
export const handler = async (event: { | |
body: string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm i @aws-sdk/client-dynamodb @aws-sdk/util-dynamodb | |
// npm i -D @types/aws-lambda esbuild | |
import { DynamoDBClient, PutItemCommand } from "@aws-sdk/client-dynamodb"; | |
import { PostConfirmationConfirmSignUpTriggerEvent } from "aws-lambda"; | |
import { marshall } from "@aws-sdk/util-dynamodb"; | |
const client = new DynamoDBClient(); | |
exports.handler = async function ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Link from "next/link"; | |
import React from "react"; | |
const Credits = ({ credits }: { credits: number }) => { | |
return ( | |
<div className="absolute top-20 font-sans "> | |
Number of credits Available: | |
{" "} | |
{credits} | |
<div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://docs.stripe.com/testing#international-cards |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use client"; | |
import React from "react"; | |
import { useEffect, useState } from "react"; | |
import axios from "axios"; | |
import { Price } from "@/types"; | |
import { Button } from "./ui/button"; | |
import Link from "next/link"; | |
export default function Pricing({ clerkId }: { clerkId: string }) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/product | |
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/product | |
NEXT_CLERK_WEBHOOK_SECRET= | |
AWS_REGION= | |
AWS_ACCESS_KEY_ID= | |
AWS_SECRET_ACCESS_KEY= | |
AWS_S3_BUCKET_NAME= | |
STRIPE_SECRET_KEY=x | |
STRIPE_WEBHOOK_SECRET=x |
NewerOlder