Files
zeekay 10e6fec4c0 debrand: the brand token is INSIGHTS_, and a wrong one stops the container
The rule table mapped HOG_ -> FN_ ahead of any POSTHOG rule, so POSTHOG_FOO
split into POST + HOG_ and came out POSTFN_FOO. Nothing sets that. The live
pods set INSIGHTS_SKIP_MIGRATION_CHECKS, which bin/migrate-check reads on the
container entrypoint, so the misspelling does not degrade a feature -- it runs
migrate --check against a database whose history this tree does not share and
the container never starts.

Both replacements are measured against the shipped tree rather than chosen:
every HOG_ name with a counterpart there is spelled INSIGHTS_ (HOG_QL ->
INSIGHTS_QL, HOG_FUNCTION_TEMPLATES -> INSIGHTS_FUNCTION_TEMPLATES, 12 of 12
determinate cases), and FN_ appears in it nowhere. Upstream carries 95 HOG_
tokens and zero FN_ ones, so repairing FN_ back out is exactly the inverse of
the bad rule and cannot collide with an upstream name.

The rule is fixed for the next convergence, and the tree it already produced is
repaired in the same commit -- the codemod is idempotent against its own output,
so it cannot undo this itself.
2026-08-01 17:42:28 -07:00

2.5 KiB

Hedgebox dummy app

This app represents our Hedgebox product simulation for demo data purposes.

Background

We've had a demo data generator simulating a product called Hedgebox (like Dropbox for mascots) for a while now. It creates realistic event data with user profiles, behaviors, timezones, even includes features like a Marius Tech Tips sponsorship landing page and an A/B test on the signup flow.

However, the generator hasn't been able to create session recording data, as that's a hard nut to crack store. Session recordings need an actual app with actual user interactions to capture. Hedgebox never had one - until now.

This dummy app brings Hedgebox to life as a working Next.js app that can be used to generate real session recordings for demos and testing.

What's Inside

A fully functional (fake) demo app with:

  • Login/signup flows
  • File management interface
  • Pricing page
  • Marius Tech Tips landing page
  • Insights integration for tracking and session recording

Setup

  1. Install dependencies:
npm install
  1. Set up Insights environment variables:

The app automatically fetches the Insights API key from your local database at build/dev time. You can configure the database connection and team ID using these environment variables:

NEXT_PUBLIC_INSIGHTS_HOST # Insights host (default: http://localhost:8010)
NEXT_PUBLIC_INSIGHTS_KEY  # Insights API key, fetched automatically on `npm run dev`
DEMO_TEAM_ID             # Team ID to fetch token from (default: latest team)

Note: The API key is automatically fetched and written to .env.local when you run npm run dev or npm run build. The script will skip fetching if .env.local already exists (to avoid unnecessary database queries on every run).

To manually fetch the key or force a re-fetch, run:

# Fetch if .env.local doesn't exist or doesn't have key NEXT_PUBLIC_INSIGHTS_KEY
npm run fetch-insights-key
# Force re-fetch even if NEXT_PUBLIC_INSIGHTS_KEY set in .env.local
FORCE_FETCH_KEY=1 npm run fetch-insights-key

Alternatively, you can manually create a .env.local file with the NEXT_* vars above.

  1. Run the development server:
npm run dev

The app will be available at http://localhost:3000.

Generating session recordings

The app is instrumented as long as npm run dev has NEXT_PUBLIC_INSIGHTS_KEY set. Just interact normally and recordings will be captured in your Insights instance.