Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

97 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Bower πŸ’

AI-powered wedding planning assistant that automates vendor discovery and outreach for couples planning weddings in New South Wales, Australia.

🎯 What We're Building

An intelligent wedding planning platform that:

  • Multi-Step Form Intake: Professional questionnaire to gather wedding requirements
  • Smart Vendor Matching: Automatically finds venues, photographers, caterers based on your preferences
  • Automated Outreach: Sends personalized emails to vendors on your behalf
  • Response Dashboard: Aggregates vendor responses for easy comparison
  • Edit Anytime: Update your wedding details whenever needed

πŸš€ Tech Stack

  • Frontend: Next.js 15 (App Router), TypeScript, Tailwind CSS
  • Backend: Next.js API Routes, Prisma ORM
  • Database: PostgreSQL (Supabase)
  • Authentication: Supabase Auth (@supabase/ssr) - email/password, Google OAuth, magic links, password reset
  • AI: Claude (Anthropic SDK) for vendor email generation and matching
  • Email: Resend API (batch sending, webhook delivery tracking)
  • Rate Limiting: Upstash Redis (with in-memory dev fallback)
  • Error Monitoring: Sentry (@sentry/nextjs v10)
  • Hosting: Vercel
  • Testing: Vitest (121 unit tests) + Playwright (16 E2E tests)
  • Linting: ESLint + Prettier + auto-formatting

πŸ“‹ Project Status

Current Phase: Production Ready βœ…

Completed Features:

  • βœ… Authentication (Supabase Auth β€” email/password, Google OAuth, magic links, password reset)
  • βœ… User Interface (Header, user menu, dark mode, login/logout)
  • βœ… Multi-step form questionnaire (TypeForm-style UI)
  • βœ… Edit wedding details (update anytime from dashboard)
  • βœ… AI-powered vendor matching (88+ vendors across 5 regions)
  • βœ… Email outreach system (generate & send personalized emails with retry logic)
  • βœ… Dashboard (empty state, wedding summary, response tracking)
  • βœ… Vendor database (Newcastle, Hunter Valley, Sydney, Blue Mountains, South Coast)
  • βœ… Resend webhook tracking (delivery, open, bounce events)
  • βœ… Rate limiting (Upstash Redis with in-memory dev fallback)
  • βœ… Error monitoring (Sentry with per-page error boundaries)
  • βœ… Security headers (HSTS, X-Frame-Options, CSP, Referrer-Policy)
  • βœ… Input validation (server-side date/budget/email validation, prompt injection protection)
  • βœ… Testing suite (121 unit tests + 16 E2E tests)
  • βœ… Production deployment (Vercel + Supabase)

πŸ› οΈ Setup Instructions

Prerequisites

  • Node.js 20+
  • PostgreSQL (local or cloud)
  • Claude API key (Anthropic)

Installation

  1. Clone and install dependencies

    npm install
  2. Set up environment variables

    cp .env.example .env.local

    Edit .env.local and add:

    • DATABASE_URL: Your PostgreSQL connection string (Supabase)
    • ANTHROPIC_API_KEY: Your Claude API key
    • NEXT_PUBLIC_SUPABASE_URL: Your Supabase project URL
    • NEXT_PUBLIC_SUPABASE_ANON_KEY: Your Supabase anon key
    • RESEND_API_KEY: Your Resend API key (for email)
    • EMAIL_FROM: Your verified sender email
    • RESEND_WEBHOOK_SECRET: Your Resend webhook signing secret
    • UPSTASH_REDIS_REST_URL: Upstash Redis URL (optional in dev)
    • UPSTASH_REDIS_REST_TOKEN: Upstash Redis token (optional in dev)
    • NEXT_PUBLIC_SENTRY_DSN: Sentry DSN (optional in dev)
    • SENTRY_ORG: Sentry organization slug
    • SENTRY_PROJECT: Sentry project name
    • SENTRY_AUTH_TOKEN: Sentry auth token for source maps
  3. Set up database

    npm run db:push
  4. Seed vendor data

    npm run db:seed:all-vendors

    Or seed individual regions:

    npm run db:seed:newcastle
    npm run db:seed:hunter-valley
    npm run db:seed:sydney
    npm run db:seed:blue-mountains
    npm run db:seed:south-coast
  5. Run development server

    npm run dev
  6. Open http://localhost:3000

πŸ“ Project Structure

wedding-plan/
β”œβ”€β”€ app/                       # Next.js 15 App Router
β”‚   β”œβ”€β”€ api/                  # API routes
β”‚   β”‚   β”œβ”€β”€ auth/            # Auth sync & logout
β”‚   β”‚   β”œβ”€β”€ chat/            # Claude AI chat
β”‚   β”‚   β”œβ”€β”€ outreach/        # Email generation & sending
β”‚   β”‚   β”œβ”€β”€ vendors/         # Vendor matching
β”‚   β”‚   β”œβ”€β”€ webhooks/resend/ # Resend delivery webhooks
β”‚   β”‚   └── wedding/         # Wedding CRUD
β”‚   β”œβ”€β”€ auth/                # Login, signup, reset-password, update-password
β”‚   β”œβ”€β”€ dashboard/           # User dashboard pages
β”‚   β”œβ”€β”€ questionnaire/       # 5-step form
β”‚   β”œβ”€β”€ outreach/            # Email preview & sending
β”‚   β”œβ”€β”€ vendors/             # Vendor browsing
β”‚   β”œβ”€β”€ global-error.tsx     # Global Sentry error boundary
β”‚   └── */error.tsx          # Per-route error boundaries (auth, dashboard, chat, questionnaire, outreach)
β”œβ”€β”€ components/              # React components
β”œβ”€β”€ lib/                     # Core utilities
β”‚   β”œβ”€β”€ supabase/           # Supabase Auth clients
β”‚   β”œβ”€β”€ email/              # Resend integration + email generation
β”‚   β”œβ”€β”€ auth-helpers.ts     # Auth utilities + redirect validation
β”‚   β”œβ”€β”€ claude.ts           # Claude API
β”‚   β”œβ”€β”€ env-validation.ts   # Environment variable validation
β”‚   β”œβ”€β”€ input-validation.ts # Input sanitization + prompt injection protection
β”‚   β”œβ”€β”€ rate-limit.ts       # Upstash Redis rate limiting
β”‚   β”œβ”€β”€ retry.ts            # Exponential backoff retry utility
β”‚   β”œβ”€β”€ vendor-matching.ts  # Matching algorithm
β”‚   └── prisma.ts           # Database client
β”œβ”€β”€ prisma/
β”‚   └── schema.prisma       # Database schema
β”œβ”€β”€ scripts/                 # Database seeding (5 regions)
β”œβ”€β”€ e2e/                     # Playwright E2E tests
β”œβ”€β”€ test/                    # Vitest unit tests
β”‚   β”œβ”€β”€ lib/                # Utility tests (input-validation, retry, rate-limit, etc.)
β”‚   β”œβ”€β”€ api/                # API route logic tests
β”‚   └── components/         # Component tests
β”œβ”€β”€ instrumentation*.ts     # Sentry instrumentation
β”œβ”€β”€ sentry.*.config.ts      # Sentry server/edge config
└── playwright.config.ts    # Playwright E2E config

🎨 Features

βœ… Implemented

Authentication & User Management:

  • Supabase Auth (email/password, Google OAuth, magic links)
  • Password reset flow (request + update pages)
  • User menu with avatar/initials
  • Login/logout UI with dropdown
  • Session management across pages
  • Open redirect protection

Wedding Planning Flow:

  • 5-step form questionnaire (Date, Location, Guests, Budget, Style)
  • Edit wedding details anytime
  • Server-side input validation (past dates, budget floors, guest count clamping)
  • Dashboard empty state with clear CTAs
  • Wedding summary card on dashboard
  • AI-powered vendor matching

Vendor Database:

  • 17 Newcastle vendors
  • 28 Hunter Valley vendors
  • 17 Sydney vendors
  • 12 Blue Mountains vendors
  • 14 South Coast vendors
  • Total: 88+ vendors across 5 regions

Email Outreach:

  • Vendor selection UI with checkboxes
  • AI-powered personalized email generation (with retry logic)
  • Batch email sending via Resend API (with retry logic)
  • Email preview & editing before sending
  • Email validation before sending
  • Only creates outreach records for successful sends

Dashboard & Tracking:

  • Outreach statistics (contacted, delivered, opened, responded)
  • Resend webhook integration (delivery, open, bounce, complaint tracking)
  • Response tracking table
  • Manual response entry
  • Individual vendor detail pages

Reliability & Security:

  • Upstash Redis rate limiting (with in-memory dev fallback)
  • Sentry error monitoring (client, server, edge)
  • Per-page error boundaries (auth, dashboard, chat, questionnaire, outreach)
  • Global error boundary
  • Retry with exponential backoff (Claude API, Resend API)
  • Security headers (HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy)
  • Input sanitization and prompt injection protection

Quality & Testing:

  • 121 unit tests (Vitest + React Testing Library)
  • 16 E2E tests (Playwright β€” homepage, auth, navigation, security headers)
  • ESLint + Prettier with auto-formatting
  • TypeScript strict mode
  • Production deployment (Vercel + Supabase)

πŸ“… Planned

  • Loading states (loading.tsx for key routes)
  • Content Security Policy header
  • Quote comparison tools
  • Budget tracker
  • Guest list management

πŸ§ͺ Using the App

New User Flow:

  1. Visit the site - See beautiful landing page
  2. Sign in - Click "Sign In" in header, use Google or email/password
  3. Dashboard redirect - See empty state: "We need details about your special day"
  4. Complete questionnaire - Click "Complete Wedding Details"
    • 5 steps with visual progress bar
    • Large, easy-to-click buttons
    • Smooth animations between steps
    • Data saves automatically at the end
  5. View dashboard - See wedding summary with your details
  6. Browse vendors - View AI-matched vendors for your preferences
  7. Select vendors - Choose who to contact (checkboxes)
  8. Generate emails - AI creates personalized messages
  9. Send outreach - Batch send via Resend API
  10. Track responses - Dashboard shows delivery, open, response status

Edit Wedding Details:

  1. Go to Dashboard
  2. Click "Edit Details" button (next to "Your Wedding")
  3. Form pre-fills with current selections (highlighted)
  4. Update any answers
  5. Saves automatically on completion

πŸ“– Documentation

Essential:

Comprehensive Documentation:

🎯 Launch Status

Status: βœ… Production Ready (March 2026)

Live URL: wedding-plan-v2.vercel.app

Coverage:

  • Newcastle, NSW - 17 vendors
  • Hunter Valley, NSW - 28 vendors
  • Sydney, NSW - 17 vendors
  • Blue Mountains, NSW - 12 vendors
  • South Coast, NSW - 14 vendors
  • Total: 88+ vendors across 5 regions

πŸ§ͺ Testing

# Run unit tests
npm test

# Run tests with coverage
npm run test:coverage

# Run E2E tests (starts dev server automatically)
npm run test:e2e

# Run E2E tests with UI
npm run test:e2e:ui

# Lint code
npm run lint

Test Coverage (137 total tests):

  • βœ… 121 unit tests (Vitest) β€” input validation, retry logic, rate limiting, env validation, auth helpers, vendor matching, API route logic
  • βœ… 16 E2E tests (Playwright) β€” homepage, auth pages, navigation redirects, security headers
  • βœ… Component tests (VendorCard)
  • βœ… API logic tests (webhook events, wedding data transformations, email generation)

πŸš€ Development Workflow

# Start dev server
npm run dev

# Lint and fix
npm run lint:fix

# Format code
npm run format

# Run tests
npm test

# Build for production
npm run build

# Start production server
npm start

πŸ“Š Database Commands

# Generate Prisma Client
npm run db:generate

# Push schema to database
npm run db:push

# Open Prisma Studio
npm run db:studio

# Seed all vendors (5 regions)
npm run db:seed:all-vendors

# Seed individual regions
npm run db:seed:newcastle
npm run db:seed:hunter-valley
npm run db:seed:sydney
npm run db:seed:blue-mountains
npm run db:seed:south-coast

# Test database connection
npm run db:test

🀝 Contributing

This is currently a solo project. Contributions welcome after MVP launch.

πŸ“„ License

Private - Not yet open source

πŸ† Recent Improvements (March 2026)

Reliability & Security:

  • Password reset flow β€” full reset-password and update-password pages
  • Silent email failure fix β€” only tracks successfully sent emails
  • Upstash Redis rate limiting β€” persistent across serverless cold starts (in-memory dev fallback)
  • Sentry error monitoring β€” client, server, and edge runtime with per-page error boundaries
  • Security headers β€” HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy
  • Input validation β€” server-side date/budget/guest validation, email format checking, prompt injection protection
  • Retry logic β€” exponential backoff with jitter for Claude API and Resend API calls
  • Resend webhooks β€” automatic delivery, open, bounce, and complaint tracking

Content:

  • Vendor expansion β€” 3 new regions (Sydney 17, Blue Mountains 12, South Coast 14) = 88+ total vendors
  • All questionnaire locations covered β€” every location option now has matching vendors

Testing:

  • 121 unit tests (Vitest) β€” input validation, retry, rate limiting, env validation, auth helpers, vendor matching, API logic
  • 16 E2E tests (Playwright) β€” homepage, auth pages, navigation redirects, security headers
  • Total: 137 tests, all passing

Built with care for couples planning their dream wedding in Australia

About

AI-powered wedding vendor outreach platform with automated email generation, smart matching, and response tracking

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages