A beautiful, conversational chat app that captures user information and saves it to Supabase before redirecting to the MarriedMore Calculator.
- 💬 Conversational UI with smooth animations
- 🎁 Permission-based data collection for reminders & gift ideas
- 📅 Date pickers for birthdays and anniversaries
- 🏷️ Multi-select with custom options for hobbies
- 💕 Love language selection
- 💾 Saves responses to Supabase
- 🔗 Redirects to calculator after completion
- 📱 Fully responsive
npm install-
Create a new project at supabase.com
-
Create the
chat_responsestable in Supabase SQL Editor:
CREATE TABLE chat_responses (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
consent TEXT,
first_name TEXT NOT NULL,
email TEXT NOT NULL,
wedding_date TEXT,
date_of_birth TEXT,
partner_first_name TEXT,
partner_date_of_birth TEXT,
partner_fav_color TEXT,
partner_hobbies TEXT,
partner_love_language TEXT,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Enable Row Level Security (optional but recommended)
ALTER TABLE chat_responses ENABLE ROW LEVEL SECURITY;
-- Create a policy to allow inserts
CREATE POLICY "Allow anonymous inserts" ON chat_responses
FOR INSERT WITH CHECK (true);- Get your API credentials from Project Settings > API
Create a .env.local file in the root directory:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
npm run devOpen http://localhost:3000 to see the chat!
- Permission Request - Asks consent to store data for reminders
- First Name - User's name
- Email - For sending reminders
- Wedding Date - Anniversary date
- Date of Birth - User's birthday
- Partner's Name - Spouse/partner's first name
- Partner's Birthday - Partner's date of birth
- Favorite Color - Partner's favorite color
- Hobbies - Multi-select with custom options
- Love Language - Partner's primary love language
├── app/
│ ├── api/chat/route.ts # API endpoint to save to Supabase
│ ├── globals.css # Global styles & animations
│ ├── layout.tsx # Root layout
│ └── page.tsx # Home page
├── components/
│ └── Chat.tsx # Main chat component
├── lib/
│ └── supabase.ts # Supabase client
└── README.md
Edit the chatFlow array in components/Chat.tsx to customize the questions.
Update the CALCULATOR_URL constant in components/Chat.tsx:
const CALCULATOR_URL = 'your-calculator-url';Update the HOBBY_OPTIONS array in components/Chat.tsx.
Update the LOVE_LANGUAGES array in components/Chat.tsx.
- Next.js 14 - React framework
- Tailwind CSS - Styling
- Framer Motion - Animations
- Supabase - Database
MIT