Skip to content

Commit fe9e907

Browse files
committed
feat: Complete Tour Reservation System MVP with enhanced validation and repository pattern
- Enhanced reservation form with multi-step validation - Integrated repository pattern for data persistence - Added toast notifications with sonner package - Updated PaymentSummary component for new data structure - Extended tour repository with ExtendedTourData interface - Implemented in-memory storage for testing - Added GitHub MCP integration documentation and scripts - Updated progress tracking to reflect 100% completion - All tests passing and build successful Closes: Tour Reservation System MVP milestone
1 parent 0c7217a commit fe9e907

14 files changed

Lines changed: 794 additions & 172 deletions

File tree

.env.backup

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Supabase Configuration
2+
3+
NEXT_PUBLIC_SUPABASE_URL=https://waiuluclvrdfkjnelssg.supabase.co
4+
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6IndhaXVsdWNsdnJkZmtqbmVsc3NnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTU5OTE1NDIsImV4cCI6MjA3MTU2NzU0Mn0.97nMCiANVEHvZDXWCkHvc22d-l1pcwcG3nswf9Vjfeo
5+
6+
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6IndhaXVsdWNsdnJkZmtqbmVsc3NnIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTc1NTk5MTU0MiwiZXhwIjoyMDcxNTY3NTQyfQ.GgXQRCCReqUmted3PgszruJUgXmD3erucYy9pwiwcOM
7+
8+
# GraphQL Configuration
9+
GRAPHQL_ENDPOINT=/api/graphql
10+
11+
# Authentication
12+
NEXTAUTH_URL=http://localhost:3000
13+
NEXTAUTH_SECRET=your_nextauth_secret
14+
15+
# Stripe Configuration (for future use)
16+
STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key
17+
STRIPE_SECRET_KEY=your_stripe_secret_key
18+
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
19+
20+
# App Configuration
21+
NEXT_PUBLIC_APP_URL=http://localhost:3000
22+
NEXT_PUBLIC_APP_NAME=Avent Properties
23+
24+
25+
# Connect to Supabase via connection pooling
26+
DATABASE_URL="postgresql://postgres.waiuluclvrdfkjnelssg:4jZ.Bfe@nMrUU4z@aws-1-us-east-1.pooler.supabase.com:6543/postgres?pgbouncer=true"
27+
28+
# Direct connection to the database. Used for migrations
29+
DIRECT_URL="postgresql://postgres.waiuluclvrdfkjnelssg:4jZ.Bfe@nMrUU4z@aws-1-us-east-1.pooler.supabase.com:5432/postgres"
30+
31+
32+
# Email Configuration (for future use)
33+
SMTP_HOST=your_smtp_host
34+
SMTP_PORT=587
35+
SMTP_USER=your_smtp_user
36+
SMTP_PASS=your_smtp_password

.env.example

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Avent Properties Environment Configuration
2+
# Copy this file to .env.local and fill in your actual values
3+
4+
# =============================================================================
5+
# PUBLIC VARIABLES (exposed to browser)
6+
# =============================================================================
7+
8+
# App Configuration
9+
NEXT_PUBLIC_APP_URL=http://localhost:3000
10+
NEXT_PUBLIC_APP_NAME=Avent Properties
11+
NEXT_PUBLIC_SITE_NAME=Avent Properties
12+
13+
# Supabase Configuration (Public)
14+
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url_here
15+
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key_here
16+
17+
# GraphQL Configuration
18+
GRAPHQL_ENDPOINT=/api/graphql
19+
20+
# =============================================================================
21+
# SERVER-ONLY VARIABLES (not exposed to browser)
22+
# =============================================================================
23+
24+
# Supabase Configuration (Private)
25+
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key_here
26+
27+
# Database Configuration
28+
DATABASE_URL=postgresql://username:password@localhost:5432/database_name
29+
DIRECT_URL=postgresql://username:password@localhost:5432/database_name
30+
31+
# Authentication
32+
NEXTAUTH_URL=http://localhost:3000
33+
NEXTAUTH_SECRET=your_nextauth_secret_here
34+
35+
# GitHub MCP Integration
36+
GITHUB_PAT=your_github_personal_access_token_here
37+
GITHUB_TOOLSETS=context,repos,issues,pull_requests,actions
38+
39+
# Stripe Configuration (for future use)
40+
STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key_here
41+
STRIPE_SECRET_KEY=your_stripe_secret_key_here
42+
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret_here
43+
44+
# Email Configuration (for future use)
45+
SMTP_HOST=your_smtp_host_here
46+
SMTP_PORT=587
47+
SMTP_USER=your_smtp_user_here
48+
SMTP_PASS=your_smtp_password_here
49+
50+
# Vercel Deployment (for future use)
51+
VERCEL_TOKEN=your_vercel_token_here
52+
VERCEL_ORG_ID=your_org_id_here
53+
VERCEL_PROJECT_ID=your_project_id_here
54+
55+
# =============================================================================
56+
# DEVELOPMENT OVERRIDES
57+
# =============================================================================
58+
59+
# Local development overrides (put in .env.local)
60+
# NODE_NO_WARNINGS=1
61+
# DATABASE_URL=postgresql://localhost:5432/avent_properties_dev
62+
# GITHUB_PAT=ghp_your_actual_token_here
63+
64+
# =============================================================================
65+
# NOTES
66+
# =============================================================================
67+
68+
# 1. Copy this file to .env.local
69+
# 2. Replace all 'your_*_here' values with actual values
70+
# 3. .env.local is gitignored and contains your personal tokens
71+
# 4. .env contains shared/default values (can be committed)
72+
# 5. Never commit actual API keys or tokens

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ yarn-error.log*
3232
.pnpm-debug.log*
3333

3434
# env files (can opt-in for committing if needed)
35-
.env*
35+
# Environment files
36+
.env
37+
.env.local
38+
.env.development.local
39+
.env.test.local
40+
.env.production.local
3641

3742
# vercel
3843
.vercel

app/layout.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Playfair_Display, Inter } from "next/font/google"
44
import "./globals.css"
55
import { PerformanceMonitor } from "@/components/ui/performance-monitor"
66
import { FavoritesProvider } from "@/hooks/favorites-context"
7+
import { Toaster } from "sonner"
78

89
const playfair = Playfair_Display({
910
subsets: ["latin"],
@@ -36,6 +37,12 @@ export default function RootLayout({
3637
{children}
3738
</FavoritesProvider>
3839
<PerformanceMonitor />
40+
<Toaster
41+
position="top-right"
42+
richColors
43+
closeButton
44+
duration={4000}
45+
/>
3946
</body>
4047
</html>
4148
)

components/payment-summary.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import { Plane, Hotel, Car, Utensils, Camera, Shield } from "lucide-react"
44

55
interface PaymentSummaryProps {
66
tourPackage: "basic" | "premium" | "luxury"
7-
propertyTitle: string
8-
tourDate: string
7+
selectedProperty: string
8+
tourDate: Date | undefined
99
tourTime: string
1010
guests: number
1111
}
1212

13-
export function PaymentSummary({ tourPackage, propertyTitle, tourDate, tourTime, guests }: PaymentSummaryProps) {
13+
export function PaymentSummary({ tourPackage, selectedProperty, tourDate, tourTime, guests }: PaymentSummaryProps) {
1414
const packages = {
1515
basic: {
1616
name: "Essential Tour",
@@ -63,6 +63,16 @@ export function PaymentSummary({ tourPackage, propertyTitle, tourDate, tourTime,
6363
return <Shield className="h-4 w-4 text-gold" />
6464
}
6565

66+
const formatDate = (date: Date | undefined) => {
67+
if (!date) return "TBD"
68+
return date.toLocaleDateString("en-US", {
69+
weekday: "long",
70+
year: "numeric",
71+
month: "long",
72+
day: "numeric",
73+
})
74+
}
75+
6676
return (
6777
<div className="space-y-6">
6878
{/* Booking Summary */}
@@ -71,11 +81,11 @@ export function PaymentSummary({ tourPackage, propertyTitle, tourDate, tourTime,
7181
<div className="space-y-3">
7282
<div className="flex justify-between">
7383
<span className="text-luxury text-muted-foreground">Property</span>
74-
<span className="text-luxury text-foreground font-medium">{propertyTitle}</span>
84+
<span className="text-luxury text-foreground font-medium">{selectedProperty}</span>
7585
</div>
7686
<div className="flex justify-between">
7787
<span className="text-luxury text-muted-foreground">Date</span>
78-
<span className="text-luxury text-foreground font-medium">{tourDate}</span>
88+
<span className="text-luxury text-foreground font-medium">{formatDate(tourDate)}</span>
7989
</div>
8090
<div className="flex justify-between">
8191
<span className="text-luxury text-muted-foreground">Time</span>

0 commit comments

Comments
 (0)