Skip to content

Commit 9a071ac

Browse files
committed
init
1 parent 16683c5 commit 9a071ac

23 files changed

+1909
-130
lines changed

Diff for: app/api/array/route.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { vacationSchema } from "@/lib/schema";
2+
import { openai } from "@ai-sdk/openai";
3+
import { streamObject } from "ai";
4+
5+
export async function POST() {
6+
const result = await streamObject({
7+
schema: vacationSchema,
8+
output: "array",
9+
model: openai("gpt-4o-mini"),
10+
prompt: "Generate 8 vacation destinations",
11+
});
12+
13+
return result.toTextStreamResponse();
14+
}

Diff for: app/api/object/route.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { vacationSchemaObject } from "@/lib/schema";
2+
import { openai } from "@ai-sdk/openai";
3+
import { streamObject } from "ai";
4+
5+
export async function POST() {
6+
const result = await streamObject({
7+
schema: vacationSchemaObject,
8+
output: "object",
9+
model: openai("gpt-4o-mini"),
10+
prompt: "Generate 8 vacation destinations",
11+
});
12+
13+
return result.toTextStreamResponse();
14+
}

Diff for: app/globals.css

+72-10
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
--background-end-rgb: 255, 255, 255;
99
}
1010

11+
@font-face {
12+
font-family: "uncut sans";
13+
src: url("./uncut-sans.woff2") format("woff2");
14+
}
15+
16+
1117
@media (prefers-color-scheme: dark) {
1218
:root {
1319
--foreground-rgb: 255, 255, 255;
@@ -16,18 +22,74 @@
1622
}
1723
}
1824

19-
body {
20-
color: rgb(var(--foreground-rgb));
21-
background: linear-gradient(
22-
to bottom,
23-
transparent,
24-
rgb(var(--background-end-rgb))
25-
)
26-
rgb(var(--background-start-rgb));
27-
}
28-
2925
@layer utilities {
3026
.text-balance {
3127
text-wrap: balance;
3228
}
3329
}
30+
31+
@layer base {
32+
:root {
33+
--background: 0 0% 100%;
34+
--foreground: 0 0% 3.9%;
35+
--card: 0 0% 100%;
36+
--card-foreground: 0 0% 3.9%;
37+
--popover: 0 0% 100%;
38+
--popover-foreground: 0 0% 3.9%;
39+
--primary: 0 0% 9%;
40+
--primary-foreground: 0 0% 98%;
41+
--secondary: 0 0% 96.1%;
42+
--secondary-foreground: 0 0% 9%;
43+
--muted: 0 0% 96.1%;
44+
--muted-foreground: 0 0% 45.1%;
45+
--accent: 0 0% 96.1%;
46+
--accent-foreground: 0 0% 9%;
47+
--destructive: 0 84.2% 60.2%;
48+
--destructive-foreground: 0 0% 98%;
49+
--border: 0 0% 89.8%;
50+
--input: 0 0% 89.8%;
51+
--ring: 0 0% 3.9%;
52+
--chart-1: 12 76% 61%;
53+
--chart-2: 173 58% 39%;
54+
--chart-3: 197 37% 24%;
55+
--chart-4: 43 74% 66%;
56+
--chart-5: 27 87% 67%;
57+
--radius: 0.5rem;
58+
}
59+
.dark {
60+
--background: 0 0% 3.9%;
61+
--foreground: 0 0% 98%;
62+
--card: 0 0% 3.9%;
63+
--card-foreground: 0 0% 98%;
64+
--popover: 0 0% 3.9%;
65+
--popover-foreground: 0 0% 98%;
66+
--primary: 0 0% 98%;
67+
--primary-foreground: 0 0% 9%;
68+
--secondary: 0 0% 14.9%;
69+
--secondary-foreground: 0 0% 98%;
70+
--muted: 0 0% 14.9%;
71+
--muted-foreground: 0 0% 63.9%;
72+
--accent: 0 0% 14.9%;
73+
--accent-foreground: 0 0% 98%;
74+
--destructive: 0 62.8% 30.6%;
75+
--destructive-foreground: 0 0% 98%;
76+
--border: 0 0% 14.9%;
77+
--input: 0 0% 14.9%;
78+
--ring: 0 0% 83.1%;
79+
--chart-1: 220 70% 50%;
80+
--chart-2: 160 60% 45%;
81+
--chart-3: 30 80% 55%;
82+
--chart-4: 280 65% 60%;
83+
--chart-5: 340 75% 55%;
84+
}
85+
}
86+
87+
@layer base {
88+
* {
89+
@apply border-border;
90+
}
91+
body {
92+
@apply bg-background text-foreground;
93+
@apply bg-neutral-900
94+
}
95+
}

Diff for: app/page.tsx

+2-110
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,5 @@
1-
import Image from "next/image";
1+
import { SearchInterface } from "@/components/search-interface";
22

33
export default function Home() {
4-
return (
5-
<main className="flex min-h-screen flex-col items-center justify-between p-24">
6-
<div className="z-10 w-full max-w-5xl items-center justify-between font-mono text-sm lg:flex">
7-
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
8-
Get started by editing&nbsp;
9-
<code className="font-mono font-bold">app/page.tsx</code>
10-
</p>
11-
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:size-auto lg:bg-none">
12-
<a
13-
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
14-
href="https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
15-
target="_blank"
16-
rel="noopener noreferrer"
17-
>
18-
By{" "}
19-
<Image
20-
src="/vercel.svg"
21-
alt="Vercel Logo"
22-
className="dark:invert"
23-
width={100}
24-
height={24}
25-
priority
26-
/>
27-
</a>
28-
</div>
29-
</div>
30-
31-
<div className="relative z-[-1] flex place-items-center before:absolute before:h-[300px] before:w-full before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-full after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 sm:before:w-[480px] sm:after:w-[240px] before:lg:h-[360px]">
32-
<Image
33-
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
34-
src="/next.svg"
35-
alt="Next.js Logo"
36-
width={180}
37-
height={37}
38-
priority
39-
/>
40-
</div>
41-
42-
<div className="mb-32 grid text-center lg:mb-0 lg:w-full lg:max-w-5xl lg:grid-cols-4 lg:text-left">
43-
<a
44-
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
45-
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
46-
target="_blank"
47-
rel="noopener noreferrer"
48-
>
49-
<h2 className="mb-3 text-2xl font-semibold">
50-
Docs{" "}
51-
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
52-
-&gt;
53-
</span>
54-
</h2>
55-
<p className="m-0 max-w-[30ch] text-sm opacity-50">
56-
Find in-depth information about Next.js features and API.
57-
</p>
58-
</a>
59-
60-
<a
61-
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
62-
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
63-
target="_blank"
64-
rel="noopener noreferrer"
65-
>
66-
<h2 className="mb-3 text-2xl font-semibold">
67-
Learn{" "}
68-
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
69-
-&gt;
70-
</span>
71-
</h2>
72-
<p className="m-0 max-w-[30ch] text-sm opacity-50">
73-
Learn about Next.js in an interactive course with&nbsp;quizzes!
74-
</p>
75-
</a>
76-
77-
<a
78-
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
79-
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
80-
target="_blank"
81-
rel="noopener noreferrer"
82-
>
83-
<h2 className="mb-3 text-2xl font-semibold">
84-
Templates{" "}
85-
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
86-
-&gt;
87-
</span>
88-
</h2>
89-
<p className="m-0 max-w-[30ch] text-sm opacity-50">
90-
Explore starter templates for Next.js.
91-
</p>
92-
</a>
93-
94-
<a
95-
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
96-
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
97-
target="_blank"
98-
rel="noopener noreferrer"
99-
>
100-
<h2 className="mb-3 text-2xl font-semibold">
101-
Deploy{" "}
102-
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
103-
-&gt;
104-
</span>
105-
</h2>
106-
<p className="m-0 max-w-[30ch] text-balance text-sm opacity-50">
107-
Instantly deploy your Next.js site to a shareable URL with Vercel.
108-
</p>
109-
</a>
110-
</div>
111-
</main>
112-
);
4+
return <SearchInterface />;
1135
}

Diff for: app/uncut-sans.woff2

76.2 KB
Binary file not shown.

Diff for: components.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "default",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.ts",
8+
"css": "app/globals.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
19+
}
20+
}

Diff for: components/contact-card.tsx

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
"use client";
2+
3+
import React from "react";
4+
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
5+
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
6+
import { Mail, Phone, Briefcase } from "lucide-react";
7+
8+
interface ContactCardProps {
9+
name?: string;
10+
email?: string;
11+
phone?: string;
12+
title?: string;
13+
company?: string;
14+
}
15+
16+
export function ContactCard({
17+
name,
18+
email,
19+
phone,
20+
title,
21+
company,
22+
}: ContactCardProps) {
23+
return (
24+
<Card className="h-full">
25+
<CardHeader className="flex flex-row items-center gap-4 space-y-0">
26+
<Avatar className="h-14 w-14">
27+
<AvatarFallback>
28+
{name
29+
?.split(" ")
30+
.map((n) => n[0])
31+
.join("")
32+
.toUpperCase()}
33+
</AvatarFallback>
34+
</Avatar>
35+
<div>
36+
<CardTitle className="text-lg">{name}</CardTitle>
37+
<p className="text-sm text-muted-foreground">{title}</p>
38+
</div>
39+
</CardHeader>
40+
<CardContent className="grid gap-2">
41+
<div className="flex items-center gap-2">
42+
<Briefcase className="h-4 w-4 text-muted-foreground" />
43+
<span className="text-sm">{company}</span>
44+
</div>
45+
<div className="flex items-center gap-2">
46+
<Mail className="h-4 w-4 text-muted-foreground" />
47+
<span className="text-sm">{email}</span>
48+
</div>
49+
{phone && (
50+
<div className="flex items-center gap-2">
51+
<Phone className="h-4 w-4 text-muted-foreground" />
52+
<span className="text-sm">{phone}</span>
53+
</div>
54+
)}
55+
</CardContent>
56+
</Card>
57+
);
58+
}
59+

0 commit comments

Comments
 (0)