Six site improvements picked from a "what could be better" review, plus a Jest test suite covering the two areas with the trickiest money-handling history in this project (early-bird pricing tranches, donation-leg accounting): - "Add to calendar" .ics download on event pages and in confirmation emails - sitemap.xml, robots.txt, and Open Graph/Twitter metadata for public pages - Sentry error monitoring (backend + frontend), a no-op until SENTRY_DSN is set - Nightly local pg_dump backups with a Site Settings tab to browse/trigger/download - Admin audit trail for refunds, donations, manual registrations, event and settings changes, and staff-initiated cancellations - Jest tests reproducing and guarding against the 1.8.0 tranche-pricing bug and the 1.4.2 donation-balance-inflation bug Wallet passes (Google/Apple) were scoped out of this round — Apple Wallet needs a paid Apple Developer account the project doesn't have yet, and the user preferred shipping both together later rather than Google alone now. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
18 lines
894 B
TypeScript
18 lines
894 B
TypeScript
// A no-op when NEXT_PUBLIC_SENTRY_DSN isn't set, so this is safe in every environment
|
|
// (dev, or a fresh deploy that hasn't configured Sentry yet). The dynamic import (rather
|
|
// than a top-level `import * as Sentry`) keeps the Sentry client SDK out of every visitor's
|
|
// bundle entirely when it's unconfigured — Next inlines NEXT_PUBLIC_* at build time, so an
|
|
// unset DSN lets the bundler dead-code-eliminate this whole block, import included.
|
|
if (process.env.NEXT_PUBLIC_SENTRY_DSN) {
|
|
const dsn = process.env.NEXT_PUBLIC_SENTRY_DSN;
|
|
import("@sentry/nextjs").then((Sentry) => {
|
|
Sentry.init({
|
|
dsn,
|
|
environment: process.env.NODE_ENV || "development",
|
|
// Small single-VM deployment, not high-traffic — start conservative and raise
|
|
// this once real usage is visible in Sentry, rather than sampling every request.
|
|
tracesSampleRate: 0.1,
|
|
});
|
|
});
|
|
}
|