Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/brendansudol/punchlines-ai
/ functions
Functions
110 in github.com/brendansudol/punchlines-ai
⨍
Functions
110
◇
Types & classes
6
↓ 59 callers
Function
cn
(...inputs: ClassValue[])
lib/utils.ts:4
↓ 8 callers
Function
toDateTime
(secs: number)
lib/supabase-admin.ts:18
↓ 7 callers
Function
errorResponse
(reason: SuggestResponse.Error['reason'], status = 500)
app/api/generate-punchlines/route.ts:111
↓ 6 callers
Function
errorResponse
(reason: string, status = 500)
app/api/save-punchline/route.ts:58
↓ 5 callers
Function
fetchPost
(url: string, data?: { [key: string]: any })
lib/utils.ts:8
↓ 5 callers
Function
getURL
()
lib/utils.ts:18
↓ 3 callers
Function
errorResponse
(reason: string, status = 500)
app/api/create-portal-session/route.ts:30
↓ 3 callers
Function
errorResponse
(reason: string, status = 500)
app/api/create-checkout-session/route.ts:29
↓ 3 callers
Function
getSubscription
()
lib/supabase-server.ts:33
↓ 3 callers
Function
getUser
()
lib/supabase-server.ts:22
↓ 3 callers
Function
isLoaded
(value: AsyncValue<any>)
lib/async.ts:36
↓ 3 callers
Function
usePay
(hasSubscription: boolean = false)
hooks/usePay.ts:6
↓ 2 callers
Function
asyncLoaded
(value: V)
lib/async.ts:20
↓ 2 callers
Function
asyncNotStarted
()
lib/async.ts:12
↓ 2 callers
Function
createOrRetrieveCustomer
({ uuid, email }: { uuid: string; email?: string; })
lib/supabase-admin.ts:80
↓ 2 callers
Function
getFonts
()
app/p/[id]/components/share.tsx:175
↓ 2 callers
Function
getIp
(req: NextRequest)
lib/rate-limit.ts:15
↓ 2 callers
Function
getRandomExamples
(count: number = 4)
lib/data.ts:46
↓ 2 callers
Function
manageSubscriptionStatusChange
( subscriptionId: string, customerId: string, createAction = false )
lib/supabase-admin.ts:136
↓ 2 callers
Function
toFullJoke
(prompt: string | undefined, punchline: string)
app/(home)/components/ResultsSuccess.tsx:199
↓ 2 callers
Function
useSupabase
()
components/SupabaseProvider.tsx:53
↓ 1 callers
Function
addPunchlinesToDb
({ userId, setup, results }: { userId: string | undefined; setup: string; results: string[]; })
lib/supabase-admin.ts:24
↓ 1 callers
Function
asyncLoading
()
lib/async.ts:16
↓ 1 callers
Function
copyBillingDetailsToCustomer
( uuid: string, payment_method: Stripe.PaymentMethod )
lib/supabase-admin.ts:116
↓ 1 callers
Function
formatDate
(dateString: string | undefined)
app/account/page.tsx:55
↓ 1 callers
Function
formatPrompt
(prompt: string)
app/api/generate-punchlines/route.ts:138
↓ 1 callers
Function
getErrorMessage
(reason: SuggestResponse.Error['reason'])
app/(home)/components/ResultsError.tsx:38
↓ 1 callers
Function
getLookupKey
(identifier: string)
lib/rate-limit.ts:7
↓ 1 callers
Function
getSession
()
lib/supabase-server.ts:11
↓ 1 callers
Function
getSessionCreateParams
( customer: string, priceId: string = process.env.STRIPE_PRICE_ID ?? '', mode: 'payment' | 'subscription
app/api/create-checkout-session/route.ts:33
↓ 1 callers
Function
getStripe
()
lib/stripe.ts:5
↓ 1 callers
Function
getUserDetails
()
app/api/generate-punchlines/route.ts:115
↓ 1 callers
Function
getUserJokes
()
lib/supabase-server.ts:49
↓ 1 callers
Function
handleCheckRemaining
()
app/(home)/components/MainContent.tsx:84
↓ 1 callers
Function
handleCopy
(joke: string)
app/(home)/components/ResultsSuccess.tsx:80
↓ 1 callers
Function
handleSave
(idx: number)
app/(home)/components/ResultsSuccess.tsx:36
↓ 1 callers
Function
isLoading
(value: AsyncValue<any>)
lib/async.ts:32
↓ 1 callers
Function
isNotStarted
(value: AsyncValue<any>)
lib/async.ts:28
↓ 1 callers
Function
makeTweetUrl
(joke: string)
app/(home)/components/ResultsSuccess.tsx:203
↓ 1 callers
Function
maybeAddPeriod
(str: string)
app/api/generate-punchlines/route.ts:142
↓ 1 callers
Function
sleep
(ms: number)
app/api/generate-punchlines/route.ts:148
↓ 1 callers
Function
upsertPriceRecord
(price: Stripe.Price)
lib/supabase-admin.ts:60
↓ 1 callers
Function
upsertProductRecord
(product: Stripe.Product)
lib/supabase-admin.ts:45
↓ 1 callers
Function
useCustomerPortal
()
hooks/useCustomerPortal.ts:5
↓ 1 callers
Function
useSignOut
()
hooks/useSignOut.ts:5
Function
AccountPage
()
app/account/page.tsx:9
Function
AlertDialogFooter
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>)
components/ui/alert-dialog.tsx:62
Function
AlertDialogHeader
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>)
components/ui/alert-dialog.tsx:48
Function
AuthNav
()
components/AuthNav.tsx:7
Function
Badge
({ className, variant, ...props }: BadgeProps)
components/ui/badge.tsx:30
Function
Container
({ children }: PropsWithChildren)
components/Container.tsx:3
Function
DialogFooter
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>)
components/ui/dialog.tsx:69
Function
DialogHeader
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>)
components/ui/dialog.tsx:55
Function
DropdownMenuShortcut
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>)
components/ui/dropdown-menu.tsx:171
Function
Footer
()
components/Footer.tsx:10
Function
GET
(request: NextRequest)
app/auth/callback/route.ts:7
Function
GlobalError
({ reset }: { error: Error & { digest?: string }; reset: () => void; })
app/global-error.tsx:6
Function
Header
({ showDescription = false }: Props)
components/Header.tsx:8
Function
HomePage
()
app/(home)/page.tsx:8
Function
Image
({ params: { id } }: { params: { id: string }; })
app/p/[id]/twitter-image.tsx:11
Function
Image
({ params: { id } }: { params: { id: string }; })
app/p/[id]/opengraph-image.tsx:11
Function
Loading
()
app/loading.tsx:3
Function
Loading
()
app/(home)/components/Loading.tsx:3
Function
Logo
()
components/Logo.tsx:4
Function
MagicLinkForm
()
app/sign-in/components/MagicLinkForm.tsx:21
Function
MainContent
({ examples: initialExamples, isSignedIn, hasSubscription }: { examples: string[]; isSignedIn: boole
app/(home)/components/MainContent.tsx:25
Function
NotFound
()
app/not-found.tsx:4
Function
POST
(req: NextRequest)
app/api/generate-punchlines/route.ts:24
Function
POST
(req: Request)
app/api/create-portal-session/route.ts:9
Function
POST
(req: NextRequest)
app/api/save-punchline/route.ts:6
Function
POST
(req: Request)
app/api/create-checkout-session/route.ts:10
Function
POST
(req: NextRequest)
app/api/check-remaining/route.ts:10
Function
POST
(req: Request)
app/api/webhooks/route.ts:21
Function
Pagination
({ className, ...props }: React.ComponentProps<"nav">)
components/ui/pagination.tsx:7
Function
PaginationEllipsis
({ className, ...props }: React.ComponentProps<"span">)
components/ui/pagination.tsx:94
Function
PaginationLink
({ className, isActive, size = "icon", ...props }: PaginationLinkProps)
components/ui/pagination.tsx:41
Function
PaginationNext
({ className, ...props }: React.ComponentProps<typeof PaginationLink>)
components/ui/pagination.tsx:79
Function
PaginationPrevious
({ className, ...props }: React.ComponentProps<typeof PaginationLink>)
components/ui/pagination.tsx:63
Function
PromptInput
({ value, onChange, onSubmit }: { value: string; onChange: (value: string) => void; onSubmit: () =
app/(home)/components/PromptInput.tsx:5
Function
PunchlinePage
({ params: { id } }: Props)
app/p/[id]/page.tsx:27
Function
RemainingInfo
({ remaining, isSignedIn, hasSubscription, onPay }: { remaining: number | null | undefined; isSign
app/(home)/components/RemainingInfo.tsx:6
Function
ResultsError
({ value, onUpgrade }: { value: SuggestResponse.Error; onUpgrade: () => void; })
app/(home)/components/ResultsError.tsx:6
Function
ResultsSuccess
({ value, isSignedIn, showTyping, onTypingDone, onClear, onResubmit }: { value: SuggestResponse.
app/(home)/components/ResultsSuccess.tsx:18
Function
RootLayout
({ children }: PropsWithChildren)
app/layout.tsx:30
Function
SavedJokesPage
()
app/saved/page.tsx:9
Function
ShareFallback
()
app/p/[id]/components/share.tsx:141
Function
ShareImage
({ joke }: { joke: Joke | null })
app/p/[id]/components/share.tsx:6
Function
ShareJoke
({ setup, punchline }: { setup: string; punchline: string })
app/p/[id]/components/share.tsx:16
Function
SignInPage
()
app/sign-in/page.tsx:6
Function
Skeleton
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>)
components/ui/skeleton.tsx:3
Function
SubscribeButton
()
app/account/components/SubscribeButton.tsx:6
Function
SupabaseProvider
({ children }: PropsWithChildren)
components/SupabaseProvider.tsx:23
Function
Toaster
({ ...props }: ToasterProps)
components/ui/sonner.tsx:8
Function
UpdateSubscriptionButton
()
app/account/components/UpdateSubscriptionButton.tsx:6
Function
UserDropdown
({ user, hasSubscription }: { user: User; hasSubscription: boolean; })
components/UserDropdown.tsx:19
Function
ZeroState
({ examples, onClickExample, onRefreshExamples }: { examples: string[]; onClickExample: (text: strin
app/(home)/components/ZeroState.tsx:6
Function
asyncFailedLoading
(error: Error)
lib/async.ts:24
Function
generateMetadata
( { params: { id } }: Props, parent: ResolvingMetadata )
app/p/[id]/page.tsx:15
Function
getAsyncLoadedValue
(value: AsyncValue<V>)
lib/async.ts:46
Function
handleClearResults
()
app/(home)/components/MainContent.tsx:71
next →
1–100 of 110, ranked by callers