Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/WebDevSimplified/course-platform
/ functions
Functions
238 in github.com/WebDevSimplified/course-platform
⨍
Functions
238
◇
Types & classes
5
↓ 81 callers
Function
cn
(...inputs: ClassValue[])
src/lib/utils.ts:4
↓ 24 callers
Function
getCurrentUser
({ allData = false } = {})
src/services/clerk.ts:11
↓ 14 callers
Function
formatPrice
(amount: number, { showZeroAsNumber = false } = {})
src/lib/formatters.ts:11
↓ 13 callers
Function
formatPlural
( count: number, { singular, plural }: { singular: string; plural: string }, { includeCount = true } = {
src/lib/formatters.ts:1
↓ 8 callers
Function
formatNumber
( number: number, options?: Intl.NumberFormatOptions )
src/lib/formatters.ts:31
↓ 8 callers
Function
getGlobalTag
(tag: CACHE_TAG)
src/lib/dataCache.ts:11
↓ 8 callers
Function
getIdTag
(tag: CACHE_TAG, id: string)
src/lib/dataCache.ts:15
↓ 6 callers
Function
actionToast
({ actionData, ...props }: Omit<Toast, "title" | "description" | "variant"> & { actionData: { error: boo
src/hooks/use-toast.ts:189
↓ 6 callers
Function
getCourseIdTag
(id: string)
src/features/courses/db/cache/courses.ts:8
↓ 5 callers
Function
dispatch
(action: Action)
src/hooks/use-toast.ts:131
↓ 5 callers
Function
getCourseGlobalTag
()
src/features/courses/db/cache/courses.ts:4
↓ 5 callers
Function
getCourseSectionCourseTag
(courseId: string)
src/features/courseSections/db/cache.ts:12
↓ 5 callers
Function
getLessonCourseTag
(courseId: string)
src/features/lessons/db/cache/lessons.ts:12
↓ 5 callers
Function
getProductIdTag
(id: string)
src/features/products/db/cache.ts:8
↓ 4 callers
Function
getLessonIdTag
(id: string)
src/features/lessons/db/cache/lessons.ts:8
↓ 4 callers
Function
getProductGlobalTag
()
src/features/products/db/cache.ts:4
↓ 4 callers
Function
getUserCourseAccessUserTag
(userId: string)
src/features/courses/db/cache/userCourseAccess.ts:18
↓ 4 callers
Function
revalidateCourseSectionCache
({ id, courseId, }: { id: string courseId: string })
src/features/courseSections/db/cache.ts:16
↓ 4 callers
Function
revalidateLessonCache
({ id, courseId, }: { id: string courseId: string })
src/features/lessons/db/cache/lessons.ts:16
↓ 4 callers
Function
useFormField
()
src/components/ui/form.tsx:44
↓ 3 callers
Function
formatDate
(date: Date)
src/lib/formatters.ts:27
↓ 3 callers
Function
getCourseSectionGlobalTag
()
src/features/courseSections/db/cache.ts:4
↓ 3 callers
Function
getLessonGlobalTag
()
src/features/lessons/db/cache/lessons.ts:4
↓ 3 callers
Function
getPurchaseGlobalTag
()
src/features/purchases/db/cache.ts:4
↓ 3 callers
Function
getPurchaseUserTag
(userId: string)
src/features/purchases/db/cache.ts:12
↓ 3 callers
Function
getUserCoupon
()
src/lib/userCountryHeader.ts:22
↓ 3 callers
Function
getUserCourseAccessGlobalTag
()
src/features/courses/db/cache/userCourseAccess.ts:4
↓ 3 callers
Function
getUserLessonCompleteUserTag
(userId: string)
src/features/lessons/db/cache/userLessonComplete.ts:18
↓ 3 callers
Function
getUserTag
(tag: CACHE_TAG, userId: string)
src/lib/dataCache.ts:19
↓ 3 callers
Function
revalidateCourseCache
(id: string)
src/features/courses/db/cache/courses.ts:12
↓ 3 callers
Function
revalidateProductCache
(id: string)
src/features/products/db/cache.ts:12
↓ 3 callers
Function
revalidateUserCache
(id: string)
src/features/users/db/cache.ts:12
↓ 3 callers
Function
sumArray
(array: T[], func: (item: T) => number)
src/lib/sumArray.ts:1
↓ 2 callers
Function
addToRemoveQueue
(toastId: string)
src/hooks/use-toast.ts:56
↓ 2 callers
Function
canUpdateCourseSections
({ role, }: { role: UserRole | undefined })
src/features/courseSections/permissions/sections.ts:12
↓ 2 callers
Function
canUpdateLessons
({ role }: { role: UserRole | undefined })
src/features/lessons/permissions/lessons.ts:20
↓ 2 callers
Function
canUpdateUserLessonCompleteStatus
( user: { userId: string | undefined }, lessonId: string )
src/features/lessons/permissions/userLessonComplete.ts:15
↓ 2 callers
Function
getCourseTag
(tag: CACHE_TAG, courseId: string)
src/lib/dataCache.ts:23
↓ 2 callers
Function
getNewArray
(array: T[], activeId: string, overId: string)
src/components/SortableList.tsx:37
↓ 2 callers
Function
getNextCourseLessonOrder
(sectionId: string)
src/features/lessons/db/lessons.ts:6
↓ 2 callers
Function
getPurchaseIdTag
(id: string)
src/features/purchases/db/cache.ts:8
↓ 2 callers
Function
getUserGlobalTag
()
src/features/users/db/cache.ts:4
↓ 2 callers
Function
getUserIdTag
(id: string)
src/features/users/db/cache.ts:8
↓ 2 callers
Function
getUserLessonCompleteIdTag
({ lessonId, userId, }: { lessonId: string userId: string })
src/features/lessons/db/cache/userLessonComplete.ts:8
↓ 2 callers
Function
insertUser
(data: typeof UserTable.$inferInsert)
src/features/users/db/users.ts:6
↓ 2 callers
Function
mapCourse
( course: { name: string id: string courseSections: { name: string id: string
src/app/(consumer)/courses/[courseId]/layout.tsx:114
↓ 2 callers
Function
processStripeCheckout
(checkoutSession: Stripe.Checkout.Session)
src/app/api/webhooks/stripe/route.ts:52
↓ 2 callers
Function
revalidatePurchaseCache
({ id, userId, }: { id: string userId: string })
src/features/purchases/db/cache.ts:16
↓ 2 callers
Function
syncClerkUserMetadata
(user: { id: string clerkUserId: string role: UserRole })
src/services/clerk.ts:30
↓ 2 callers
Function
userOwnsProduct
({ userId, productId, }: { userId: string productId: string })
src/features/products/db/products.ts:12
↓ 1 callers
Function
addUserCourseAccess
( { userId, courseIds, }: { userId: string courseIds: string[] }, trx: Omit<typeof db,
src/features/courses/db/userCourseAcccess.ts:10
↓ 1 callers
Function
canAccessAdminPages
({ role }: { role: UserRole | undefined })
src/permissions/general.ts:3
↓ 1 callers
Function
canCreateCourseSections
({ role, }: { role: UserRole | undefined })
src/features/courseSections/permissions/sections.ts:4
↓ 1 callers
Function
canCreateCourses
({ role }: { role: UserRole | undefined })
src/features/courses/permissions/courses.ts:3
↓ 1 callers
Function
canCreateLessons
({ role }: { role: UserRole | undefined })
src/features/lessons/permissions/lessons.ts:16
↓ 1 callers
Function
canCreateProducts
({ role }: { role: UserRole | undefined })
src/features/products/permissions/products.ts:4
↓ 1 callers
Function
canDeleteCourseSections
({ role, }: { role: UserRole | undefined })
src/features/courseSections/permissions/sections.ts:20
↓ 1 callers
Function
canDeleteCourses
({ role }: { role: UserRole | undefined })
src/features/courses/permissions/courses.ts:11
↓ 1 callers
Function
canDeleteLessons
({ role }: { role: UserRole | undefined })
src/features/lessons/permissions/lessons.ts:24
↓ 1 callers
Function
canDeleteProducts
({ role }: { role: UserRole | undefined })
src/features/products/permissions/products.ts:12
↓ 1 callers
Function
canRefundPurchases
({ role }: { role: UserRole | undefined })
src/features/purchases/permissions/products.ts:3
↓ 1 callers
Function
canUpdateCourses
({ role }: { role: UserRole | undefined })
src/features/courses/permissions/courses.ts:7
↓ 1 callers
Function
canUpdateProducts
({ role }: { role: UserRole | undefined })
src/features/products/permissions/products.ts:8
↓ 1 callers
Function
canViewLesson
( { role, userId, }: { userId: string | undefined role: UserRole | undefined }, lesson
src/features/lessons/permissions/lessons.ts:28
↓ 1 callers
Function
deleteUser
({ clerkUserId }: { clerkUserId: string })
src/features/users/db/users.ts:38
↓ 1 callers
Function
dismiss
()
src/hooks/use-toast.ts:148
↓ 1 callers
Function
genId
()
src/hooks/use-toast.ts:20
↓ 1 callers
Function
getCompletedLessonIds
(userId: string)
src/app/(consumer)/courses/[courseId]/layout.tsx:102
↓ 1 callers
Function
getCourse
(id: string)
src/app/(consumer)/courses/[courseId]/page.tsx:27
↓ 1 callers
Function
getCourse
(id: string)
src/app/(consumer)/courses/[courseId]/layout.tsx:48
↓ 1 callers
Function
getCourse
(id: string)
src/app/admin/courses/[courseId]/edit/page.tsx:103
↓ 1 callers
Function
getCourseSectionIdTag
(id: string)
src/features/courseSections/db/cache.ts:8
↓ 1 callers
Function
getCourses
()
src/app/admin/products/[productId]/edit/page.tsx:35
↓ 1 callers
Function
getCourses
()
src/app/admin/products/new/page.tsx:18
↓ 1 callers
Function
getCourses
()
src/app/admin/courses/page.tsx:35
↓ 1 callers
Function
getIsLessonComplete
({ userId, lessonId, }: { userId: string lessonId: string })
src/app/(consumer)/courses/[courseId]/lessons/[lessonId]/page.tsx:292
↓ 1 callers
Function
getLesson
(id: string)
src/app/(consumer)/courses/[courseId]/lessons/[lessonId]/page.tsx:274
↓ 1 callers
Function
getNextCourseSectionOrder
(courseId: string)
src/features/courseSections/db/sections.ts:6
↓ 1 callers
Function
getPricingRows
( totalDetails: Stripe.Checkout.Session.TotalDetails | null, { total, subtotal, refund, }: {
src/app/(consumer)/purchases/[purchaseId]/page.tsx:174
↓ 1 callers
Function
getProduct
(id: string)
src/app/api/webhooks/stripe/route.ts:92
↓ 1 callers
Function
getProduct
(id: string)
src/app/admin/products/[productId]/edit/page.tsx:45
↓ 1 callers
Function
getProducts
()
src/app/admin/products/page.tsx:31
↓ 1 callers
Function
getPublicProduct
(id: string)
src/app/(consumer)/products/[productId]/page.tsx:194
↓ 1 callers
Function
getPublicProduct
(id: string)
src/app/(consumer)/products/[productId]/purchase/page.tsx:78
↓ 1 callers
Function
getPublicProduct
(id: string)
src/app/(consumer)/products/[productId]/purchase/success/page.tsx:46
↓ 1 callers
Function
getPublicProducts
()
src/app/(consumer)/page.tsx:23
↓ 1 callers
Function
getPurchase
({ userId, id }: { userId: string; id: string })
src/app/(consumer)/purchases/[purchaseId]/page.tsx:116
↓ 1 callers
Function
getPurchaseDetails
()
src/app/admin/page.tsx:83
↓ 1 callers
Function
getPurchases
(userId: string)
src/app/(consumer)/purchases/page.tsx:47
↓ 1 callers
Function
getPurchases
()
src/app/admin/sales/page.tsx:22
↓ 1 callers
Function
getReceiptUrl
(paymentIntent: Stripe.PaymentIntent | string | null)
src/app/(consumer)/purchases/[purchaseId]/page.tsx:163
↓ 1 callers
Function
getStatusIcon
(status: ProductStatus)
src/features/products/components/ProductTable.tsx:100
↓ 1 callers
Function
getStripeDetails
( stripeSessionId: string, pricePaidInCents: number, isRefunded: boolean )
src/app/(consumer)/purchases/[purchaseId]/page.tsx:132
↓ 1 callers
Function
getTotalCourseSections
()
src/app/admin/page.tsx:166
↓ 1 callers
Function
getTotalCourses
()
src/app/admin/page.tsx:132
↓ 1 callers
Function
getTotalLessons
()
src/app/admin/page.tsx:155
↓ 1 callers
Function
getTotalProducts
()
src/app/admin/page.tsx:144
↓ 1 callers
Function
getTotalStudents
()
src/app/admin/page.tsx:120
↓ 1 callers
Function
getUser
(id: string)
src/services/clerk.ts:43
↓ 1 callers
Function
getUser
(id: string)
src/app/api/webhooks/stripe/route.ts:108
next →
1–100 of 238, ranked by callers