Skip to content

feat:merch page - #48

Merged
Krish-2118 merged 19 commits into
mainfrom
development
Oct 20, 2026
Merged

Krish-2118 merged 19 commits into
mainfrom
development

Conversation

@Krish-2118

Copy link
Copy Markdown
Collaborator

No description provided.

meenamrutha03 and others added 19 commits October 18, 2026 10:13
Fix Netlify deploy error by adding ImageKit environment variables
Sync development branch with main
Created a separate route for merch page
Replace the in-experience #/merch store view (cart, bag panel and cart
pill) with a standalone /merch page. Each piece (T-shirt, zipper,
hoodie, four colourways each) has a BOOK NOW button that opens the
organisers' external order form; the site keeps no cart and stores no
orders.

- src/config/merch.ts holds the pieces, colours, prices and the order
  form URL (still empty: BOOK NOW shows "BOOKING OPENS SOON" until set)
- MERCH_STORE_OPEN is now true; /merch shows the store, and the
  "dropping soon" teaser comes back if the switch is turned off
- MERCH links and old #/merch bookmarks go to /merch, which is always
  listed in the sitemap
- remove MerchView, BagPanel, CartPill, PRODUCTS and the bag state

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add OPEN_REGISTRATIONS_IN_DEV and REGISTRATIONS_LIVE to
src/config/launch.ts. REGISTRATIONS_LIVE is REGISTRATIONS_OPEN, or true
under `next dev` while OPEN_REGISTRATIONS_IN_DEV is on, so the
registration flow can be developed and tested locally while the live
site still shows "opening soon".

The proxy auth gate, /register, the REGISTER buttons and the
/api/register + /api/upload gate now read REGISTRATIONS_LIVE.
`next build` / `next start` always run with NODE_ENV=production, so the
override can never open a deployment; REGISTRATIONS_OPEN stays the only
production switch (and still drives the sitemap).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every registration now gets its own 6-character referral code,
generated by the database. A new optional "Referral code" field on the
registration form credits whoever shared it. The registrant's own code
is shown on their pass with a COPY CODE button.

Database (supabase/schema.sql section 14; run
supabase/manual/add_referrals.sql on existing projects):
- registrations.referral_code (unique, NOT NULL, set by the
  trg_assign_referral_code trigger, so a code sent with the insert is
  ignored) and referred_by (the referrer's registration, never itself)
- existing registrations are backfilled with codes
- referral_leaderboard view: confirmed referrals ranked, pending shown
  apart, rejected never counted, rejected referrers left out; staff
  only through RLS (security_invoker), not readable by anon

API:
- /api/register validates the optional code and refuses unknown codes
  or codes of rejected registrations
- new GET /api/admin/referrals (admin + registration team): paged
  (30 per page) and searchable by name, email, college, code or
  registration ID

Admin dashboard: new LEADERBOARD tab for admins and the registration
team, and a Referral Code column in the CSV export.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- src/app/not-found.tsx: an on-brand 404 ("This page drifted out of
  orbit") with BACK TO HOME / EXPLORE EVENTS and quick links to the
  four event worlds, merch and registration; marked noindex, follow
- ErrorFallback (the error boundary screen) now has TRY AGAIN, RELOAD
  PAGE and a link home
- both share the new ErrorScreen full-screen shell

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change the fee from ₹1200 to ₹999 everywhere it is set:
- REGISTRATION_FEE (payment step, UPI pay link amount, Terms page)
- REGISTRATION_FEE_INR (the amount /api/register records)
- enforce_registration_insert() in supabase/schema.sql, which forces
  every new registration's amount

Run supabase/manual/registration_fee_999.sql on the live database to
update the trigger. Existing registrations keep the amount they were
created with.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bring in upstream development (PRs #39-#45): the /merch2 orbit store,
Curtain updates, footer credits, the session route no longer returning
tokens in its JSON body (the client reads the auth cookies instead),
Supabase/ImageKit guards for builds without credentials, and
`next build --webpack`.

Fix what the upstream merge left broken or what clashed with main:
- layout.tsx: development had two <html> roots after a bad conflict
  resolution; keep one with suppressHydrationWarning and <Analytics />
- imagekit.ts: development had two getImageKit() definitions (the first
  unclosed); keep the one that throws a clear error on missing config
- data.ts: restore PRODUCTS, Product and inr, which useMerchV.ts
  (/merch2) imports; the /merch store itself uses src/config/merch.ts
- move ALLOWED_EVENT_CATEGORIES and AllowedEventCategory to
  src/lib/events.ts: development un-exported them from the admin events
  route (route files may only export handlers), which broke the import
  in /api/admin/events/order

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Set REGISTRATIONS_OPEN to true and remove the localhost-only override
(OPEN_REGISTRATIONS_IN_DEV / REGISTRATIONS_LIVE): the proxy auth gate,
/register, the REGISTER buttons and the /api/register + /api/upload
gate all read REGISTRATIONS_OPEN again, the same way in every
environment.

/register now sends signed-out visitors to Google sign-in and opens the
registration form after login, and it leaves the sitemap now that it
is no longer a public teaser page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix: resolve syntax and export errors, update merch orbit view and as…
Bring in upstream development PR #46: the reworked /merch2 orbit view
with its product images (merch-images.json), the /merch2 description,
and eslint ignores for scripts/ and designer-handoff/.

PR #46 also fixed the layout.tsx, imagekit.ts and admin events route
breakage that the previous merge had already fixed here:
- layout.tsx: both sides now match
- imagekit.ts: take development's getImageKit()
- api/admin/events/route.ts: keep main's version, which imports
  ALLOWED_EVENT_CATEGORIES from src/lib/events.ts (shared with
  /api/admin/events/order) instead of exporting it from the route file

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
code fixes and merch page and referral system
@vercel

vercel Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
project-spacex Ready Ready Preview Oct 20, 2026 4:08pm UTC

@Krish-2118
Krish-2118 merged commit 640310c into main Oct 20, 2026
3 checks passed

This branch was successfully deployed

2 active deployments
Preview – project-spacex — 086da549 Deployed Oct 20, 2026 by vercel[bot]
Production – project-spacex — 086da549 Deployed Oct 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants