Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/sahat/hackathon-starter
/ functions
Functions
92 in github.com/sahat/hackathon-starter
⨍
Functions
92
◇
Types & classes
0
↓ 21 callers
Function
revokeProviderTokens
(providerName, tokenData)
config/token-revocation.js:130
↓ 13 callers
Function
isInManifest
(id)
test/tools/fixture-helpers.js:55
↓ 13 callers
Function
registerTestInManifest
(testFile)
test/tools/fixture-helpers.js:40
↓ 12 callers
Function
generateState
()
config/passport.js:30
↓ 11 callers
Function
authError2Flash
* Helper function to handle OAuth errors with provider-specific messages. * Returns true if error was handled, false otherwise.
config/passport.js:167
↓ 11 callers
Function
handleAuthLogin
* Helper function that contains the shared post-profile OAuth logic * (supports OAuth 1.0a and OAuth 2.0 providers). * Returns User (new or updated)
config/passport.js:83
↓ 7 callers
Function
revokeAllProviderTokens
(tokens)
config/token-revocation.js:143
↓ 6 callers
Function
sendSSE
* Helper: Send SSE event to client * @param {Object} res - Express response object * @param {string} eventType - Type of SSE event (chat, status, ra
controllers/ai-agent.js:177
↓ 5 callers
Function
getCheckpointer
* Initialize MongoDB checkpointer for persistent sessions. * * Session cleanup strategy: * - Authenticated users: Data cleaned up on account deleti
controllers/ai-agent.js:109
↓ 4 callers
Function
checkList
(deduped)
test/tools/simple-link-image-check.js:188
↓ 4 callers
Function
dedupeList
(list)
test/tools/simple-link-image-check.js:178
↓ 4 callers
Function
keyFor
(method, url, body)
test/tools/fixture-helpers.js:25
↓ 4 callers
Function
makeURL
(baseURL, params)
controllers/api.js:381
↓ 3 callers
Function
createCacheKey
(text, modelName, prefix)
controllers/ai.js:84
↓ 3 callers
Function
gotoGithubWithRateLimitRetry
(sharedPage, request)
test/e2e-nokey/github-api.e2e.test.js:19
↓ 3 callers
Function
isSafeRedirect
(url)
app.js:165
↓ 3 callers
Function
saveOAuth2UserTokens
* Common function to handle OAuth2 token processing and saving user data. * * This function is to handle various scenarios that we would run into wh
config/passport.js:203
↓ 3 callers
Function
setupRagCollection
* Initialize the MongoDB collection for RAG
controllers/ai.js:182
↓ 2 callers
Function
callGroqApi
(apiRequestBody, apiKey)
controllers/ai.js:596
↓ 2 callers
Function
cleanupTestFiles
()
test/e2e/rag.e2e.test.js:91
↓ 2 callers
Function
configureVectorIndex
* Configure or update the vector index dimensions based on our embedding results * Do this only once. If you change your embedding model to a differe
controllers/ai.js:217
↓ 2 callers
Function
createCachedEmbeddings
(baseEmbeddings, modelName)
controllers/ai.js:94
↓ 2 callers
Function
createCollectionForVectorSearch
(db, collectionName, indexes)
controllers/ai.js:152
↓ 2 callers
Function
extractQpmFromLog
()
test/e2e/llm-classifier.e2e.test.js:17
↓ 2 callers
Function
fetchAndCacheTraktImage
(imageUrl)
controllers/api.js:1272
↓ 2 callers
Function
fetchJson
(url, fetchOptions, label)
controllers/api.js:41
↓ 2 callers
Function
getPayPalAccessToken
()
controllers/api.js:918
↓ 2 callers
Function
initializeEmbeddingCaches
(mongoUri)
controllers/ai.js:58
↓ 2 callers
Function
normalizeUrl
(u)
test/tools/simple-link-image-check.js:54
↓ 2 callers
Function
prepareRagFolder
()
controllers/ai.js:43
↓ 2 callers
Function
revokeToken
(revokeURL, token, tokenTypeHint, config, tokenSecret)
config/token-revocation.js:43
↓ 2 callers
Function
scanMarkdown
()
test/tools/simple-link-image-check.js:161
↓ 2 callers
Function
scanViews
()
test/tools/simple-link-image-check.js:114
↓ 2 callers
Function
sendTwoFactorEmail
* Helper to send a 2FA code email. * The success flash message is customizable so callers can distinguish * between first send and resend.
controllers/user.js:787
↓ 2 callers
Function
setVectorIndex
* Helper function to update or set a vector index in MongoDB Atlas with a new index definition
controllers/ai.js:199
↓ 1 callers
Function
captureContentLength
(req, res, next)
config/morgan.js:98
↓ 1 callers
Function
checkUrl
(initialUrl, timeout = TIMEOUT)
test/tools/simple-link-image-check.js:70
↓ 1 callers
Function
createAIAgent
* Create the Customer Service Agent using createAgent with built-in middleware
controllers/ai-agent.js:608
↓ 1 callers
Function
createClassifierLLMRequestBody
(inputText, model, systemPrompt)
controllers/ai.js:644
↓ 1 callers
Function
createImageDataUrl
(file)
controllers/ai.js:719
↓ 1 callers
Function
createImageUploader
()
controllers/ai.js:700
↓ 1 callers
Function
createVisionLLMRequestBody
(dataUrl, model)
controllers/ai.js:615
↓ 1 callers
Function
extractAIMessages
* Helper: Extract AI chat messages from model_request node
controllers/ai-agent.js:185
↓ 1 callers
Function
extractClassifierResponse
(content)
controllers/ai.js:654
↓ 1 callers
Function
extractStatus
* Helper: Extract status from graph node updates
controllers/ai-agent.js:202
↓ 1 callers
Function
extractUrlsFromHtmlLike
(text)
test/tools/simple-link-image-check.js:29
↓ 1 callers
Function
extractUrlsFromMarkdown
(md)
test/tools/simple-link-image-check.js:42
↓ 1 callers
Function
extractVisionAnalysis
(data)
controllers/ai.js:636
↓ 1 callers
Function
fetchMovieDetails
(slug, watchers)
controllers/api.js:1369
↓ 1 callers
Function
fetchTraktTrendingMovies
(limit)
controllers/api.js:1343
↓ 1 callers
Function
fetchTraktUserHistory
(traktToken, limit)
controllers/api.js:1330
↓ 1 callers
Function
fetchTraktUserProfile
(traktToken)
controllers/api.js:1316
↓ 1 callers
Function
generateDefaultPublicKey
()
controllers/webauthn.js:5
↓ 1 callers
Function
generateOAuth1Header
(method, url, consumerKey, consumerSecret, token, tokenSecret)
config/token-revocation.js:4
↓ 1 callers
Function
getArtistInfo
()
controllers/api.js:314
↓ 1 callers
Function
getArtistTopAlbums
()
controllers/api.js:336
↓ 1 callers
Function
getArtistTopTracks
()
controllers/api.js:324
↓ 1 callers
Function
getFollowers
(userID)
controllers/api.js:608
↓ 1 callers
Function
getMarkdownChecks
()
test/tools/simple-link-image-check.js:258
↓ 1 callers
Function
getMorganFormat
()
config/morgan.js:91
↓ 1 callers
Function
getOwnedGames
()
controllers/api.js:444
↓ 1 callers
Function
getPageExtract
(title)
controllers/api.js:1634
↓ 1 callers
Function
getPageImage
(title)
controllers/api.js:1650
↓ 1 callers
Function
getPageSections
(title)
controllers/api.js:1619
↓ 1 callers
Function
getPlayerAchievements
()
controllers/api.js:388
↓ 1 callers
Function
getPlayerSummaries
()
controllers/api.js:427
↓ 1 callers
Function
getStreams
(gameID)
controllers/api.js:621
↓ 1 callers
Function
getTumblrAuthHeader
(url, method)
controllers/api.js:81
↓ 1 callers
Function
getTumblrAuthHeader
(url, method)
config/passport.js:605
↓ 1 callers
Function
getUser
(userID)
controllers/api.js:595
↓ 1 callers
Function
getUserByLogin
(loginID)
controllers/api.js:635
↓ 1 callers
Function
getViewsChecks
()
test/tools/simple-link-image-check.js:251
↓ 1 callers
Function
hashBody
(body)
test/tools/fixture-helpers.js:7
↓ 1 callers
Function
installServerApiFixtures
({ mode = process.env.API_MODE } = {})
test/tools/server-fetch-fixtures.js:30
↓ 1 callers
Function
installServerAxiosFixtures
({ mode = process.env.API_MODE } = {})
test/tools/server-axios-fixtures.js:33
↓ 1 callers
Function
normalizeTextForCaching
(text)
controllers/ai.js:77
↓ 1 callers
Function
promptGuardMiddleware
()
controllers/ai-agent.js:33
↓ 1 callers
Function
run
()
test/tools/simple-link-image-check.js:210
↓ 1 callers
Function
searchWikipedia
(term)
controllers/api.js:1601
↓ 1 callers
Function
sendContactEmail
()
controllers/contact.js:90
↓ 1 callers
Function
sendPasswordlessLoginLinkIfUserExists
* Helper to send a passwordless login link if a user is trying to create an account * but we already have an account for that email address. * This
controllers/user.js:165
↓ 1 callers
Function
sendPasswordlessSignupLink
* Helper to send a passwordless signup link for new users.
controllers/user.js:201
↓ 1 callers
Function
setupApp
(controller)
test/contact.test.js:13
↓ 1 callers
Function
traktUrlToFilename
(url)
controllers/api.js:1262
↓ 1 callers
Function
validateReCAPTCHA
(token)
controllers/contact.js:4
↓ 1 callers
Function
writeMinimalPdf
* Create a minimal PDF file with ExampleCorp test data * * Note: This minimal PDF structure will trigger a "Warning: Indexing all PDF objects" * me
test/e2e/rag.e2e.test.js:25
Function
formatDate
(isoString)
controllers/api.js:1241
Function
get
(name)
test/morgan.test.js:35
Function
getHeader
(name)
test/morgan.test.js:32
Function
removeSessionByUserId
* Removes all valid sessions for a given user * @param {string} userId * @returns {Promise}
models/Session.js:14
Function
setHeader
(name, value)
test/morgan.test.js:38
Function
stop
()
test/tools/start-with-memory-db.js:25