Where events live in your codebase
Each user flow maps to a specific file or handler. The prompt finds and instruments all of them.
What if a flow lives in a completely separate service?
Run the prompt once per codebase that owns events. Use the same API key in all of them.
Same repo — different file or folder
Signup in auth/signup.tsx, invite in settings/team.tsx, features scattered across components — all in one repo.
Run the prompt once. It searches the whole repo and instruments every handler it finds.
Separate frontend repos — e.g. main app + admin portal
Your customer-facing app and your internal admin tool live in different codebases.
Open each repo separately in your AI assistant and run the product prompt in each one. Use the same API key in both.
Separate backend service — Node, Python, Go, Ruby…
Signup and account creation happen server-side in a dedicated API. The frontend only handles what users do after they're logged in.
Run the same product prompt on each repo separately. On the backend repo, the AI will detect there's no browser context and automatically instrument via HTTP calls instead of a script tag. Use the same API key in both.
Third-party identity provider — Okta, Auth0, SAML…
Auth is handled entirely by an external provider. Your app receives a session after the provider completes authentication.
You can't instrument the provider's code. Run the product prompt on your own app — the AI will find the OAuth callback handler (the point where your app gets the session) and instrument it there.
Same API key across all services. Use the same environment's API key everywhere so ThriveStack can join events from different services to the same user and account. See Environments and API Keys.