Skip to content

Repository files navigation

Forever Ašanin — Next.js on Vercel

Complete wedding + baptism website with personalized guest links, Supabase, and Resend email.


Stack

Layer Service Cost
Hosting + API Vercel Free
Database Supabase Cloud Free
Email Resend Free (3k/month)
Domain foreverasanin.com Already owned

Project Structure

foreverasanin/
├── pages/
│   ├── index.js          ← Main website (exact original design)
│   ├── [slug].js         ← Personalized guest page (e.g. /mueller)
│   ├── 404.js            ← Branded 404
│   └── api/
│       ├── rsvp.js       ← RSVP handler (Flow A + B)
│       ├── guest/[slug]  ← Guest data lookup
│       └── send-invites  ← Victoria's one-click email blast
├── lib/
│   ├── supabase.js       ← Supabase client
│   └── email.js          ← Resend email templates
├── styles/
│   └── globals.css
├── supabase-schema.sql   ← Run this in Supabase SQL editor
└── .env.local.example    ← Copy to .env.local and fill in

Setup Guide

Step 1 — Supabase (Database)

  1. Go to supabase.com → Create account → New project
  2. Choose region: Europe (Frankfurt) — closest to Belgrade
  3. Wait for project to spin up (~2 min)
  4. Go to SQL Editor → paste contents of supabase-schema.sql → Run
  5. Go to Project Settings → API → copy:
    • Project URLNEXT_PUBLIC_SUPABASE_URL
    • anon public key → NEXT_PUBLIC_SUPABASE_ANON_KEY
    • service_role key → SUPABASE_SERVICE_ROLE_KEY

Step 2 — Resend (Email)

  1. Go to resend.com → Create account
  2. Go to Domains → Add foreverasanin.com
  3. Add the DNS records they show you (usually 3 TXT records)
  4. Wait for verification (usually ~5 min)
  5. Go to API Keys → Create key → copy it → RESEND_API_KEY

Step 3 — Vercel (Hosting)

  1. Push this project to GitHub
  2. Go to vercel.com → Import repository
  3. Go to Settings → Environment Variables → add all from .env.local.example:
    NEXT_PUBLIC_SUPABASE_URL
    NEXT_PUBLIC_SUPABASE_ANON_KEY
    SUPABASE_SERVICE_ROLE_KEY
    RESEND_API_KEY
    NEXT_PUBLIC_BASE_URL=https://foreverasanin.com
    ADMIN_SECRET=choose-a-long-random-string
    
  4. Go to Domains → add foreverasanin.com → update DNS at your registrar

Step 4 — Import VIP Guest List (Victoria's list)

Prepare a CSV with these columns:

slug,vorname,nachname,email,tisch,personen,kinder,menu,hotel,transfer,sprache
mueller,Hans,Müller,hans@mueller.de,4,2 Personen,Keine,Standard,Nein ich habe eine Unterkunft,Nicht nötig komme selbst,de
clemencon,Jelena,Clémençon,jelena@example.com,7,4 Personen,2 Kinder,Vegetarisch,Nein ich habe eine Unterkunft,Shuttle vom Hotel,de

Import via: Supabase → Table Editor → guests → Import CSV

Then set vip = true for all imported rows:

UPDATE guests SET vip = true WHERE vip IS false;

Step 5 — Send VIP Invites (Victoria's one-click blast)

Once all guests are imported and verified, trigger the email blast:

curl -X POST https://foreverasanin.com/api/send-invites \
  -H "Content-Type: application/json" \
  -d '{"secret": "your-ADMIN_SECRET-here"}'

Or build a simple admin page button that calls this endpoint.


How the Two Flows Work

Flow A — VIP Guest (receives link before visiting)

  1. Victoria imports guest list → Supabase
  2. Victoria triggers /api/send-invites
  3. Guest receives email with link foreverasanin.com/clemencon
  4. Guest opens link → personal page with pre-filled data
  5. Guest confirms/adjusts → submits → confirmation email sent

Flow B — Self-Registration (finds site independently)

  1. Guest visits foreverasanin.com
  2. Fills RSVP form from scratch → submits
  3. Slug auto-generated: e.g. foreverasanin.com/hans-mueller-a7x2
  4. Saved to Supabase, confirmation email sent with personal link
  5. Guest can return anytime via their link

Local Development

# Install dependencies
npm install

# Copy env file and fill in your keys
cp .env.local.example .env.local

# Run dev server
npm run dev
# → http://localhost:3000

Next Features (when ready)

  • Gallery — Supabase Storage + lightbox
  • Guestbook — text/photo entries in Supabase
  • Apple Wallet — Walletly API integration
  • Live Mode — activate on July 12th, show seating plan
  • Admin dashboard/admin page for Victoria to see all RSVPs

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages