A small Next.js PWA that tracks gold prices and can send push notifications when the price changes significantly.
-
Generate VAPID keys:
npx web-push generate-vapid-keys --json
Copy the
publicKey
andprivateKey
values. -
Create a
.env.local
file based on.env.example
and set:NEXT_PUBLIC_VAPID_PUBLIC_KEY=<publicKey> VAPID_PRIVATE_KEY=<privateKey> EXCHANGE_RATE_API_KEY=<your-exchange-rate-api-key>
-
Install dependencies and run the dev server:
pnpm install pnpm dev
Visit http://localhost:3000
in your browser.
A pre-commit hook checks that the required environment variables are present in .env.local
.