Initial commit: baseline snapshot before UI/UX refactor
Captures the existing lovelope.app codebase (Next.js App Router, custom Tailwind components, Prisma) as a rollback point prior to adopting shadcn/ui and a mobile-first redesign. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Please do not edit this file manually
|
||||
# It should be added in your version-control system (i.e. Git)
|
||||
provider = "sqlite"
|
||||
@@ -0,0 +1,64 @@
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "sqlite"
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
model Proposal {
|
||||
id String @id @default(cuid())
|
||||
slug String @unique
|
||||
manageToken String @unique
|
||||
senderName String
|
||||
recipientName String
|
||||
title String
|
||||
message String
|
||||
theme String @default("sunset")
|
||||
gradientFrom String?
|
||||
gradientVia String?
|
||||
gradientTo String?
|
||||
gifUrl String?
|
||||
evasiveNo Boolean @default(false)
|
||||
status String @default("draft")
|
||||
expiresAt DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
activities ActivityOption[]
|
||||
response Response?
|
||||
}
|
||||
|
||||
model ActivityOption {
|
||||
id String @id @default(cuid())
|
||||
proposalId String
|
||||
proposal Proposal @relation(fields: [proposalId], references: [id], onDelete: Cascade)
|
||||
title String
|
||||
description String?
|
||||
emoji String @default("🎉")
|
||||
order Int @default(0)
|
||||
slots TimeSlot[]
|
||||
responses Response[] @relation("SelectedActivity")
|
||||
}
|
||||
|
||||
model TimeSlot {
|
||||
id String @id @default(cuid())
|
||||
activityOptionId String
|
||||
activity ActivityOption @relation(fields: [activityOptionId], references: [id], onDelete: Cascade)
|
||||
label String
|
||||
startsAt String?
|
||||
responses Response[] @relation("SelectedSlot")
|
||||
}
|
||||
|
||||
model Response {
|
||||
id String @id @default(cuid())
|
||||
proposalId String @unique
|
||||
proposal Proposal @relation(fields: [proposalId], references: [id], onDelete: Cascade)
|
||||
selectedActivityId String?
|
||||
selectedActivity ActivityOption? @relation("SelectedActivity", fields: [selectedActivityId], references: [id])
|
||||
selectedTimeSlotId String?
|
||||
selectedTimeSlot TimeSlot? @relation("SelectedSlot", fields: [selectedTimeSlotId], references: [id])
|
||||
answer String
|
||||
note String?
|
||||
respondedAt DateTime @default(now())
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
import { nanoid } from 'nanoid';
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
async function main() {
|
||||
const proposal = await prisma.proposal.create({
|
||||
data: {
|
||||
slug: nanoid(10),
|
||||
manageToken: nanoid(20),
|
||||
senderName: 'Jordan',
|
||||
recipientName: 'Alex',
|
||||
title: 'Want to go on an adventure with me?',
|
||||
message: "Hey Alex! I've been thinking... life's too short not to do something spontaneous. I'd love to take you out, pick something below and let's make it happen!",
|
||||
theme: 'sunset',
|
||||
status: 'sent',
|
||||
activities: {
|
||||
create: [
|
||||
{
|
||||
title: 'Rooftop Dinner',
|
||||
description: 'A candlelit dinner with the city skyline as our backdrop.',
|
||||
emoji: '🍷',
|
||||
order: 0,
|
||||
slots: { create: [{ label: 'Saturday 7pm' }, { label: 'Sunday 7pm' }] },
|
||||
},
|
||||
{
|
||||
title: 'Beach Sunset Walk',
|
||||
description: 'Sand between our toes, waves crashing, and the perfect golden hour.',
|
||||
emoji: '🌅',
|
||||
order: 1,
|
||||
slots: { create: [{ label: 'Saturday afternoon' }] },
|
||||
},
|
||||
{
|
||||
title: 'Art Museum + Brunch',
|
||||
description: 'Coffee, pastries, and pretending we understand modern art.',
|
||||
emoji: '🎨',
|
||||
order: 2,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
console.log(`Seeded demo proposal: /p/${proposal.slug}`);
|
||||
}
|
||||
|
||||
main()
|
||||
.catch(console.error)
|
||||
.finally(() => prisma.$disconnect());
|
||||
Reference in New Issue
Block a user