The browser's `Subscribed` event is an intent signal: it misses renewals, is eaten by ad-blockers and never sees a refund. The Stripe webhook is the only place money is known for certain, so every invoice.paid (new / renewal / upgrade), one-off top-up and charge.refunded (negative) is now mirrored as OpenPanel's native `revenue` event, keyed by the user uuid the browser and the job events already use. Each event carries the acquisition channel read back from signup_attribution (utm_source > referrer host > direct) plus plan, interval, billing_reason and the Stripe id — so revenue is sliceable by where the buyer came from. Fire-and-forget: never touches the webhook path. The dashboard now `identify`s the signed-in user on every boot (OpenPanel keeps the profile in memory only) and clears it on sign-out, so pageviews and the server-side events share one profile. Also fixes GET /api/billing/invoices, which called the non-existent `database.SessionLocal` and 500'd for every user with a Stripe customer. Claude-Session: https://claude.ai/code/session_01GPZmS33ubmHxHEc84X7sQy |
||
|---|---|---|
| .. | ||
| public | ||
| seo | ||
| src | ||
| .gitignore | ||
| Dockerfile | ||
| eslint.config.js | ||
| index.html | ||
| nginx.conf | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| tailwind.config.js | ||
| vite-plugin-seo.js | ||
| vite.config.js | ||
React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.