Every strategic read on the funnel so far has been inference: 94% of search clicks are brand queries, so the real acquisition channel is upstream of Google, but `users` stores no source at all and we cannot tell GitHub from YouTube from a directory listing, nor say which channel produced the few accounts that pay. Capture `document.referrer` + UTM on the first page load, keep it in localStorage (our own auth redirects destroy the referrer), and post it once the account exists. First touch wins, so arriving from GitHub and later returning via a search still attributes to GitHub. - New `signup_attribution` table rather than columns on `users`: the schema bootstrap is create_all, which adds missing tables but never ALTERs an existing one, so this lands on deploy with no migration. - Only recorded for accounts minutes old, so the 1196 existing users cannot be mislabelled with their next login. - ON CONFLICT DO NOTHING for two tabs finishing the same redirect; the client call is fire-and-forget and can never fail a sign-in. |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .gitignore | ||
| Dockerfile | ||
| eslint.config.js | ||
| index.html | ||
| nginx.conf | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| tailwind.config.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.