Monitor a Bolt app
Find out when your Bolt app fails for the people using it: see the errors they hit and replays of their visits, and give your coding agent the evidence to fix it.
Where this stands: we haven't tested this setup end to end inside Bolt yet. The steps use Heystack's standard setups for the kinds of app Bolt builds. Where Bolt may get in the way, this page says so.
Which kind of Bolt app do you have?
Bolt builds JavaScript web apps. Most are React apps built with Vite that run in the visitor's browser; some are Next.js apps with code that runs on a server. Not sure? Ask Bolt: "Is this a Vite app or a Next.js app?"
| Your app | What Heystack sees today |
|---|---|
| Vite / React (runs in the browser) | Errors visitors hit, session replay, visits, bug reports, and, if you turn it on, the calls your pages make with how long each took |
| Next.js (browser and server) | All of the above, plus each request your server handles step by step, server errors, and AI calls made with the Vercel AI SDK |
| A Supabase backend (database, sign-in, server functions) | Not covered: Heystack has no Supabase connection, and Supabase server functions run somewhere Heystack's setup doesn't cover yet |
Set it up
-
Create an app and your keys. Sign in at console.heystack.dev and create an app (during early access, new accounts join a waitlist first). Under Settings › App › Connection & keys, choose New browser key and copy it: it starts with
hs_web_and is shown once. For a Next.js app you also need the server key (sk_live_…) from your app's Connect page. -
Ask Bolt to add Heystack. Paste the prompt for your kind of app into Bolt's chat.
For a Vite / React app:
Add Heystack monitoring to the browser side of this app. Follow the "Browser / web frontend" section of https://heystack.dev/heystack-setup.md. - Start Heystack once, in the app's client entry (src/main.tsx). - Read the key from VITE_HEYSTACK_WEB_KEY. It is a public, send-only Heystack browser key (hs_web_...). - Use the service name "my-bolt-app". - Never add a Heystack server key (sk_live_...) to this project.For a Next.js app:
Add Heystack monitoring to this Next.js app. Follow the Next.js section of https://heystack.dev/heystack-setup.md, with the service name "my-bolt-app". - The server key is read from HEYSTACK_API_KEY. Never put it in browser code or a NEXT_PUBLIC_ variable. - Also follow the "Browser / web frontend" section, reading the public browser key from NEXT_PUBLIC_HEYSTACK_WEB_KEY.If Bolt can't open the link, open heystack-setup.md yourself and paste the matching section into the chat.
-
Add the keys. Bolt projects can usually keep settings in a
.envfile. AddVITE_HEYSTACK_WEB_KEY=hs_web_…for a Vite app, orNEXT_PUBLIC_HEYSTACK_WEB_KEY=hs_web_…andHEYSTACK_API_KEY=sk_live_…for a Next.js app. The browser key is made to be public: it can only send data to Heystack, never read it. The server key is private: it must never appear in browser code, and a.envfile holding it must stay out of anything you share or push to GitHub. -
Turn on session replay (optional). In the console, open Settings › App › Data & privacy, turn on session replay and pick a sample rate. Nothing is recorded until you do. Errors are collected either way.
-
Publish and check. Publish your app and open it. Your app's Connect page in the console says First signal received when data arrives, usually within a minute. If the published site sends nothing while the preview works, the keys probably weren't set where your site is published. Add them in your host's settings too.
Good to know
- Hosting. Heystack's Next.js setup is built to work on any host, but we haven't tested it on every place Bolt can publish to. Step 5 is how you confirm it on yours. Server code set to run on the Edge runtime isn't recorded.
- Recording the calls your pages make. Browser request tracing is off by default. To turn it on, add "Turn on browser request tracing (tracing: true)" to the prompt. Heystack adds its own request header only to calls to your site's own address, so calls to Supabase and other services work as before.
- AI costs. In a Next.js app, AI calls made with the Vercel AI SDK appear in AI & Safety once its telemetry option is on for each call. See Find out why your AI app is slow or expensive. AI calls made from the browser don't appear there.
- Keep testing separate. If you don't want test visits mixed in with real ones, create a second Heystack app for testing and use its keys there.
Related
- Session Replay and Next.js for the details behind each setup.
- Give Cursor or Claude Code your production errors
- Quickstart for every other kind of app.