Spaces:
Running
Running
responsive, medata and end results
Browse files- app/api/[questId]/score/route.ts +5 -5
- app/api/bulk-delete/route.ts +8 -0
- app/layout.tsx +26 -3
- app/results/layout.tsx +26 -0
- app/results/page.tsx +3 -35
- components/button/button.tsx +2 -1
- components/no-ssr.tsx +31 -0
- components/results/index.tsx +85 -0
- data/dev.db +0 -0
- package-lock.json +91 -53
- package.json +3 -2
- prisma/schema.prisma +1 -1
- public/banner.png +0 -0
app/api/[questId]/score/route.ts
CHANGED
@@ -26,11 +26,11 @@ export async function POST(request: NextRequest, { params }: { params: { questId
|
|
26 |
}
|
27 |
|
28 |
// even if the answer is wrong, we delete the quest, not needed anymore
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
|
35 |
if (quest.prompt_id_correct !== promptId) {
|
36 |
return Response.json({
|
|
|
26 |
}
|
27 |
|
28 |
// even if the answer is wrong, we delete the quest, not needed anymore
|
29 |
+
await prisma.quest.delete({
|
30 |
+
where: {
|
31 |
+
id: questId
|
32 |
+
}
|
33 |
+
})
|
34 |
|
35 |
if (quest.prompt_id_correct !== promptId) {
|
36 |
return Response.json({
|
app/api/bulk-delete/route.ts
CHANGED
@@ -4,6 +4,14 @@ import { PrismaClient } from '@prisma/client'
|
|
4 |
const prisma = new PrismaClient()
|
5 |
|
6 |
export async function DELETE(request: NextRequest) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
const total = await prisma.quest.deleteMany({
|
8 |
where: {
|
9 |
created_at: {
|
|
|
4 |
const prisma = new PrismaClient()
|
5 |
|
6 |
export async function DELETE(request: NextRequest) {
|
7 |
+
const { headers } = request
|
8 |
+
|
9 |
+
if (headers.get("x-hf-token") !== process.env.HF_TOKEN) {
|
10 |
+
return Response.json({
|
11 |
+
message: "Wrong castle fam :^)"
|
12 |
+
}, { status: 401 });
|
13 |
+
}
|
14 |
+
|
15 |
const total = await prisma.quest.deleteMany({
|
16 |
where: {
|
17 |
created_at: {
|
app/layout.tsx
CHANGED
@@ -7,8 +7,31 @@ import Providers from "@/components/react-query/providers";
|
|
7 |
import "@/assets/css/globals.css";
|
8 |
|
9 |
export const metadata: Metadata = {
|
10 |
-
title: "
|
11 |
-
description:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
};
|
13 |
|
14 |
const inter = Inter({
|
@@ -27,7 +50,7 @@ export default function RootLayout({
|
|
27 |
return (
|
28 |
<html lang="en" className={`${inter.variable}`}>
|
29 |
<body>
|
30 |
-
<div className="
|
31 |
<Providers>{children}</Providers>
|
32 |
</div>
|
33 |
<div id="background__noisy" />
|
|
|
7 |
import "@/assets/css/globals.css";
|
8 |
|
9 |
export const metadata: Metadata = {
|
10 |
+
title: "Guess the Image: which one is the good one?",
|
11 |
+
description: `
|
12 |
+
1 prompt, 3 images, 1 good one. Can you guess which one is the good one? 🔎
|
13 |
+
`,
|
14 |
+
metadataBase: new URL(
|
15 |
+
"https://huggingface.co/spaces/enzostvs/guess-the-image"
|
16 |
+
),
|
17 |
+
openGraph: {
|
18 |
+
type: "website",
|
19 |
+
url: "https://huggingface.co/spaces/enzostvs/guess-the-image",
|
20 |
+
title: "Guess the Image: which one is the good one?",
|
21 |
+
description: `
|
22 |
+
1 prompt, 3 images, 1 good one. Can you guess which one is the good one? 🔎
|
23 |
+
`,
|
24 |
+
images: "/banner.png",
|
25 |
+
},
|
26 |
+
twitter: {
|
27 |
+
site: "https://huggingface.co/spaces/enzostvs/guess-the-image",
|
28 |
+
card: "summary_large_image",
|
29 |
+
images: "/banner.png",
|
30 |
+
title: "Guess the Image: which one is the good one?",
|
31 |
+
description: `
|
32 |
+
1 prompt, 3 images, 1 good one. Can you guess which one is the good one? 🔎
|
33 |
+
`,
|
34 |
+
},
|
35 |
};
|
36 |
|
37 |
const inter = Inter({
|
|
|
50 |
return (
|
51 |
<html lang="en" className={`${inter.variable}`}>
|
52 |
<body>
|
53 |
+
<div className="h-screen overflow-auto">
|
54 |
<Providers>{children}</Providers>
|
55 |
</div>
|
56 |
<div id="background__noisy" />
|
app/results/layout.tsx
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { LayoutScore } from "@/components/quizz/layout-score";
|
2 |
+
|
3 |
+
export default function RootLayout({
|
4 |
+
children,
|
5 |
+
}: {
|
6 |
+
children: React.ReactNode;
|
7 |
+
}) {
|
8 |
+
return (
|
9 |
+
<div className="min-h-screen relative">
|
10 |
+
<header>
|
11 |
+
<div className="flex items-center justify-center md:justify-between px-6 py-5 container mx-auto">
|
12 |
+
<p className="text-center text-xl font-extrabold bg-clip-text text-transparent bg-gradient-to-b from-white to-white/80 relative">
|
13 |
+
Which image is the{" "}
|
14 |
+
<span className="bg-gradient-to-tr from-green to-cyan bg-clip-text">
|
15 |
+
good
|
16 |
+
</span>{" "}
|
17 |
+
one?
|
18 |
+
</p>
|
19 |
+
<LayoutScore className="hidden md:block" />
|
20 |
+
</div>
|
21 |
+
<div className="bg-gradient-to-r from-transparent via-white/70 to-transparent w-full h-[1px] opacity-20" />
|
22 |
+
</header>
|
23 |
+
{children}
|
24 |
+
</div>
|
25 |
+
);
|
26 |
+
}
|
app/results/page.tsx
CHANGED
@@ -4,44 +4,12 @@ import Image from "next/image";
|
|
4 |
import { Button } from "@/components/button/button";
|
5 |
import SparklingEffect from "@/assets/images/sparkles.svg";
|
6 |
import SparklingEffect2 from "@/assets/images/sparkles-2.svg";
|
|
|
7 |
|
8 |
export default function Home() {
|
9 |
return (
|
10 |
-
<div
|
11 |
-
<
|
12 |
-
<h1 className="text-center text-5xl md:text-7xl font-extrabold bg-clip-text text-transparent bg-gradient-to-b from-white to-white/80 relative">
|
13 |
-
<Image
|
14 |
-
src={SparklingEffect}
|
15 |
-
width={30}
|
16 |
-
height={50}
|
17 |
-
alt="Sparkling effect"
|
18 |
-
className="absolute top-8 left-0 -translate-x-[calc(100%+1rem)]"
|
19 |
-
/>
|
20 |
-
Here is your <br />
|
21 |
-
<span className="bg-gradient-to-tr from-green to-cyan bg-clip-text">
|
22 |
-
results
|
23 |
-
</span>{" "}
|
24 |
-
<Image
|
25 |
-
src={SparklingEffect2}
|
26 |
-
width={30}
|
27 |
-
height={50}
|
28 |
-
alt="Sparkling effect"
|
29 |
-
className="absolute -top-6 right-0 translate-x-[calc(100%+1rem)]"
|
30 |
-
/>
|
31 |
-
</h1>
|
32 |
-
<h2 className="text-white text-xl md:text-2xl text-center font-light">
|
33 |
-
Congrats!
|
34 |
-
</h2>
|
35 |
-
<div className="w-full mx-auto flex items-center gap-6">
|
36 |
-
<Button theme="primary" className="mx-auto">
|
37 |
-
Share on LinkedIn
|
38 |
-
</Button>
|
39 |
-
<Button theme="primary" className="mx-auto">
|
40 |
-
Share on X
|
41 |
-
</Button>
|
42 |
-
</div>
|
43 |
-
<div className="absolute top-1/2 left-1/2 will-transform -translate-x-1/2 -translate-y-1/2 bg-gradient-to-br from-green to-cyan blur-[120px] md:blur-[140px] w-full h-full max-h-[250px] rounded-full z-[-1] opacity-40"></div>
|
44 |
-
</div>
|
45 |
</div>
|
46 |
);
|
47 |
}
|
|
|
4 |
import { Button } from "@/components/button/button";
|
5 |
import SparklingEffect from "@/assets/images/sparkles.svg";
|
6 |
import SparklingEffect2 from "@/assets/images/sparkles-2.svg";
|
7 |
+
import { Results } from "@/components/results";
|
8 |
|
9 |
export default function Home() {
|
10 |
return (
|
11 |
+
<div>
|
12 |
+
<Results />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
</div>
|
14 |
);
|
15 |
}
|
components/button/button.tsx
CHANGED
@@ -5,7 +5,7 @@ interface Props {
|
|
5 |
children: React.ReactNode;
|
6 |
disabled?: boolean;
|
7 |
className?: string;
|
8 |
-
theme?: "primary";
|
9 |
onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
|
10 |
}
|
11 |
export const Button: React.FC<Props> = ({
|
@@ -22,6 +22,7 @@ export const Button: React.FC<Props> = ({
|
|
22 |
`font-action px-6 w-full sm:w-auto py-3 sm:px-7 sm:py-4 text-sm sm:text-base uppercase font-semibold flex items-center justify-center gap-2.5 transition-all duration-200 tracking-widest ${className}`,
|
23 |
{
|
24 |
"bg-white text-[#0F110F] hover:-translate-y-1": theme === "primary",
|
|
|
25 |
disabled,
|
26 |
}
|
27 |
)}
|
|
|
5 |
children: React.ReactNode;
|
6 |
disabled?: boolean;
|
7 |
className?: string;
|
8 |
+
theme?: "primary" | "linkedin" | "x";
|
9 |
onClick?: (e: MouseEvent<HTMLButtonElement>) => void;
|
10 |
}
|
11 |
export const Button: React.FC<Props> = ({
|
|
|
22 |
`font-action px-6 w-full sm:w-auto py-3 sm:px-7 sm:py-4 text-sm sm:text-base uppercase font-semibold flex items-center justify-center gap-2.5 transition-all duration-200 tracking-widest ${className}`,
|
23 |
{
|
24 |
"bg-white text-[#0F110F] hover:-translate-y-1": theme === "primary",
|
25 |
+
"bg-[#0077b5] text-white hover:-translate-y-1": theme === "linkedin",
|
26 |
disabled,
|
27 |
}
|
28 |
)}
|
components/no-ssr.tsx
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use client";
|
2 |
+
import { useEffect, useLayoutEffect, useState } from "react";
|
3 |
+
import PropTypes from "prop-types";
|
4 |
+
|
5 |
+
const useEnhancedEffect =
|
6 |
+
typeof window !== "undefined" && process.env.NODE_ENV !== "test"
|
7 |
+
? useLayoutEffect
|
8 |
+
: useEffect;
|
9 |
+
|
10 |
+
const NoSSR = ({
|
11 |
+
children,
|
12 |
+
defer = false,
|
13 |
+
fallback = null,
|
14 |
+
}: {
|
15 |
+
children: React.ReactNode;
|
16 |
+
defer?: boolean;
|
17 |
+
fallback?: React.ReactNode;
|
18 |
+
}) => {
|
19 |
+
const [isMounted, setMountedState] = useState(false);
|
20 |
+
|
21 |
+
useEnhancedEffect(() => {
|
22 |
+
if (!defer) setMountedState(true);
|
23 |
+
}, [defer]);
|
24 |
+
|
25 |
+
useEffect(() => {
|
26 |
+
if (defer) setMountedState(true);
|
27 |
+
}, [defer]);
|
28 |
+
|
29 |
+
return isMounted ? children : fallback;
|
30 |
+
};
|
31 |
+
export default NoSSR;
|
components/results/index.tsx
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"use client";
|
2 |
+
import { redirect } from "next/navigation";
|
3 |
+
import { FaXTwitter, FaLinkedin } from "react-icons/fa6";
|
4 |
+
import Image from "next/image";
|
5 |
+
import { LinkedinShareButton, TwitterShareButton } from "react-share";
|
6 |
+
|
7 |
+
import { useQuizz } from "@/components/quizz/hooks/useQuizz";
|
8 |
+
import { Button } from "@/components/button/button";
|
9 |
+
import SparklingEffect from "@/assets/images/sparkles.svg";
|
10 |
+
import SparklingEffect2 from "@/assets/images/sparkles-2.svg";
|
11 |
+
import NoSSR from "@/components/no-ssr";
|
12 |
+
|
13 |
+
export const Results = () => {
|
14 |
+
const { score } = useQuizz();
|
15 |
+
|
16 |
+
if (!score || score === 0) {
|
17 |
+
redirect("/");
|
18 |
+
return null;
|
19 |
+
}
|
20 |
+
|
21 |
+
return (
|
22 |
+
<div className="w-full min-h-[calc(100vh-69px)] mx-auto max-w-4xl relative flex items-center justify-center">
|
23 |
+
<div className="relative grid grid-cols-1 gap-8 py-12 px-6">
|
24 |
+
<h1 className="text-center text-5xl md:text-7xl font-extrabold bg-clip-text text-transparent bg-gradient-to-b from-white to-white/80 relative">
|
25 |
+
<Image
|
26 |
+
src={SparklingEffect}
|
27 |
+
width={30}
|
28 |
+
height={50}
|
29 |
+
alt="Sparkling effect"
|
30 |
+
className="absolute top-8 left-0"
|
31 |
+
/>
|
32 |
+
Congrats! <br />
|
33 |
+
You{" "}
|
34 |
+
<span className="bg-gradient-to-tr from-green to-cyan bg-clip-text">
|
35 |
+
killed
|
36 |
+
</span>{" "}
|
37 |
+
it!
|
38 |
+
<Image
|
39 |
+
src={SparklingEffect2}
|
40 |
+
width={30}
|
41 |
+
height={50}
|
42 |
+
alt="Sparkling effect"
|
43 |
+
className="absolute -top-6 right-0"
|
44 |
+
/>
|
45 |
+
</h1>
|
46 |
+
<h2 className="text-white text-xl md:text-2xl text-center font-light">
|
47 |
+
You obtained{" "}
|
48 |
+
<span className="bg-gradient-to-tr from-green to-cyan bg-clip-text font-bold text-transparent">
|
49 |
+
10 points
|
50 |
+
</span>{" "}
|
51 |
+
🎉
|
52 |
+
<br />
|
53 |
+
Share your score with your friends and challenge them!
|
54 |
+
</h2>
|
55 |
+
<NoSSR>
|
56 |
+
<div className="w-full mx-auto flex items-center justify-center gap-6">
|
57 |
+
<LinkedinShareButton
|
58 |
+
title={`Guess the Image: I got ${score} points! Will you beat me? 🤗`}
|
59 |
+
summary={`Guess the Image: I got ${score} points! Will you beat me? 🤗`}
|
60 |
+
source="linkedin-button"
|
61 |
+
url="https://huggingface.co/spaces/enzostvs/guess-the-image"
|
62 |
+
>
|
63 |
+
<Button theme="linkedin">
|
64 |
+
Share on
|
65 |
+
<FaLinkedin className="text-xl" />
|
66 |
+
</Button>
|
67 |
+
</LinkedinShareButton>
|
68 |
+
<TwitterShareButton
|
69 |
+
title={`Guess the Image: I got ${score} points! Will you beat me? 🤗`}
|
70 |
+
url="https://huggingface.co/spaces/enzostvs/guess-the-image"
|
71 |
+
hashtags={["ai", "quizz", "huggingface"]}
|
72 |
+
related={["enzostvs"]}
|
73 |
+
>
|
74 |
+
<Button theme="primary">
|
75 |
+
Share on
|
76 |
+
<FaXTwitter className="text-xl" />
|
77 |
+
</Button>
|
78 |
+
</TwitterShareButton>
|
79 |
+
</div>
|
80 |
+
</NoSSR>
|
81 |
+
<div className="absolute top-1/2 left-1/2 will-transform -translate-x-1/2 -translate-y-1/2 bg-gradient-to-br from-green to-cyan blur-[120px] md:blur-[140px] w-full h-full max-h-[250px] rounded-full z-[-1] opacity-40"></div>
|
82 |
+
</div>
|
83 |
+
</div>
|
84 |
+
);
|
85 |
+
};
|
data/dev.db
CHANGED
Binary files a/data/dev.db and b/data/dev.db differ
|
|
package-lock.json
CHANGED
@@ -13,13 +13,14 @@
|
|
13 |
"@tanstack/react-query": "^4.32.6",
|
14 |
"classnames": "^2.3.2",
|
15 |
"install": "^0.13.0",
|
16 |
-
"next": "
|
17 |
"npm": "^10.2.4",
|
18 |
"prisma": "^5.6.0",
|
19 |
"react": "^18",
|
20 |
"react-confetti": "^6.1.0",
|
21 |
"react-dom": "^18",
|
22 |
"react-icons": "^4.12.0",
|
|
|
23 |
"react-use": "^17.4.0"
|
24 |
},
|
25 |
"devDependencies": {
|
@@ -28,7 +29,7 @@
|
|
28 |
"@types/react-dom": "^18",
|
29 |
"autoprefixer": "^10.0.1",
|
30 |
"eslint": "^8",
|
31 |
-
"eslint-config-next": "
|
32 |
"postcss": "^8",
|
33 |
"tailwindcss": "^3.3.0",
|
34 |
"typescript": "^5"
|
@@ -215,23 +216,23 @@
|
|
215 |
}
|
216 |
},
|
217 |
"node_modules/@next/env": {
|
218 |
-
"version": "
|
219 |
-
"resolved": "https://registry.npmjs.org/@next/env/-/env-
|
220 |
-
"integrity": "sha512-
|
221 |
},
|
222 |
"node_modules/@next/eslint-plugin-next": {
|
223 |
-
"version": "
|
224 |
-
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-
|
225 |
-
"integrity": "sha512-
|
226 |
"dev": true,
|
227 |
"dependencies": {
|
228 |
"glob": "7.1.7"
|
229 |
}
|
230 |
},
|
231 |
"node_modules/@next/swc-darwin-arm64": {
|
232 |
-
"version": "
|
233 |
-
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-
|
234 |
-
"integrity": "sha512-
|
235 |
"cpu": [
|
236 |
"arm64"
|
237 |
],
|
@@ -244,9 +245,9 @@
|
|
244 |
}
|
245 |
},
|
246 |
"node_modules/@next/swc-darwin-x64": {
|
247 |
-
"version": "
|
248 |
-
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-
|
249 |
-
"integrity": "sha512-
|
250 |
"cpu": [
|
251 |
"x64"
|
252 |
],
|
@@ -259,9 +260,9 @@
|
|
259 |
}
|
260 |
},
|
261 |
"node_modules/@next/swc-linux-arm64-gnu": {
|
262 |
-
"version": "
|
263 |
-
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-
|
264 |
-
"integrity": "sha512-
|
265 |
"cpu": [
|
266 |
"arm64"
|
267 |
],
|
@@ -274,9 +275,9 @@
|
|
274 |
}
|
275 |
},
|
276 |
"node_modules/@next/swc-linux-arm64-musl": {
|
277 |
-
"version": "
|
278 |
-
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-
|
279 |
-
"integrity": "sha512-
|
280 |
"cpu": [
|
281 |
"arm64"
|
282 |
],
|
@@ -289,9 +290,9 @@
|
|
289 |
}
|
290 |
},
|
291 |
"node_modules/@next/swc-linux-x64-gnu": {
|
292 |
-
"version": "
|
293 |
-
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-
|
294 |
-
"integrity": "sha512-
|
295 |
"cpu": [
|
296 |
"x64"
|
297 |
],
|
@@ -304,9 +305,9 @@
|
|
304 |
}
|
305 |
},
|
306 |
"node_modules/@next/swc-linux-x64-musl": {
|
307 |
-
"version": "
|
308 |
-
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-
|
309 |
-
"integrity": "sha512-
|
310 |
"cpu": [
|
311 |
"x64"
|
312 |
],
|
@@ -319,9 +320,9 @@
|
|
319 |
}
|
320 |
},
|
321 |
"node_modules/@next/swc-win32-arm64-msvc": {
|
322 |
-
"version": "
|
323 |
-
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-
|
324 |
-
"integrity": "sha512-
|
325 |
"cpu": [
|
326 |
"arm64"
|
327 |
],
|
@@ -334,9 +335,9 @@
|
|
334 |
}
|
335 |
},
|
336 |
"node_modules/@next/swc-win32-ia32-msvc": {
|
337 |
-
"version": "
|
338 |
-
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-
|
339 |
-
"integrity": "sha512-
|
340 |
"cpu": [
|
341 |
"ia32"
|
342 |
],
|
@@ -349,9 +350,9 @@
|
|
349 |
}
|
350 |
},
|
351 |
"node_modules/@next/swc-win32-x64-msvc": {
|
352 |
-
"version": "
|
353 |
-
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-
|
354 |
-
"integrity": "sha512-
|
355 |
"cpu": [
|
356 |
"x64"
|
357 |
],
|
@@ -1574,12 +1575,12 @@
|
|
1574 |
}
|
1575 |
},
|
1576 |
"node_modules/eslint-config-next": {
|
1577 |
-
"version": "
|
1578 |
-
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-
|
1579 |
-
"integrity": "sha512-
|
1580 |
"dev": true,
|
1581 |
"dependencies": {
|
1582 |
-
"@next/eslint-plugin-next": "
|
1583 |
"@rushstack/eslint-patch": "^1.3.3",
|
1584 |
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0",
|
1585 |
"eslint-import-resolver-node": "^0.3.6",
|
@@ -2872,6 +2873,27 @@
|
|
2872 |
"json5": "lib/cli.js"
|
2873 |
}
|
2874 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2875 |
"node_modules/jsx-ast-utils": {
|
2876 |
"version": "3.3.5",
|
2877 |
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz",
|
@@ -3094,11 +3116,11 @@
|
|
3094 |
"dev": true
|
3095 |
},
|
3096 |
"node_modules/next": {
|
3097 |
-
"version": "
|
3098 |
-
"resolved": "https://registry.npmjs.org/next/-/next-
|
3099 |
-
"integrity": "sha512-
|
3100 |
"dependencies": {
|
3101 |
-
"@next/env": "
|
3102 |
"@swc/helpers": "0.5.2",
|
3103 |
"busboy": "1.6.0",
|
3104 |
"caniuse-lite": "^1.0.30001406",
|
@@ -3110,18 +3132,18 @@
|
|
3110 |
"next": "dist/bin/next"
|
3111 |
},
|
3112 |
"engines": {
|
3113 |
-
"node": ">=
|
3114 |
},
|
3115 |
"optionalDependencies": {
|
3116 |
-
"@next/swc-darwin-arm64": "
|
3117 |
-
"@next/swc-darwin-x64": "
|
3118 |
-
"@next/swc-linux-arm64-gnu": "
|
3119 |
-
"@next/swc-linux-arm64-musl": "
|
3120 |
-
"@next/swc-linux-x64-gnu": "
|
3121 |
-
"@next/swc-linux-x64-musl": "
|
3122 |
-
"@next/swc-win32-arm64-msvc": "
|
3123 |
-
"@next/swc-win32-ia32-msvc": "
|
3124 |
-
"@next/swc-win32-x64-msvc": "
|
3125 |
},
|
3126 |
"peerDependencies": {
|
3127 |
"@opentelemetry/api": "^1.1.0",
|
@@ -6424,6 +6446,22 @@
|
|
6424 |
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
|
6425 |
"dev": true
|
6426 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6427 |
"node_modules/react-universal-interface": {
|
6428 |
"version": "0.6.2",
|
6429 |
"resolved": "https://registry.npmjs.org/react-universal-interface/-/react-universal-interface-0.6.2.tgz",
|
|
|
13 |
"@tanstack/react-query": "^4.32.6",
|
14 |
"classnames": "^2.3.2",
|
15 |
"install": "^0.13.0",
|
16 |
+
"next": "13.5.6",
|
17 |
"npm": "^10.2.4",
|
18 |
"prisma": "^5.6.0",
|
19 |
"react": "^18",
|
20 |
"react-confetti": "^6.1.0",
|
21 |
"react-dom": "^18",
|
22 |
"react-icons": "^4.12.0",
|
23 |
+
"react-share": "^4.4.1",
|
24 |
"react-use": "^17.4.0"
|
25 |
},
|
26 |
"devDependencies": {
|
|
|
29 |
"@types/react-dom": "^18",
|
30 |
"autoprefixer": "^10.0.1",
|
31 |
"eslint": "^8",
|
32 |
+
"eslint-config-next": "13.5.6",
|
33 |
"postcss": "^8",
|
34 |
"tailwindcss": "^3.3.0",
|
35 |
"typescript": "^5"
|
|
|
216 |
}
|
217 |
},
|
218 |
"node_modules/@next/env": {
|
219 |
+
"version": "13.5.6",
|
220 |
+
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.6.tgz",
|
221 |
+
"integrity": "sha512-Yac/bV5sBGkkEXmAX5FWPS9Mmo2rthrOPRQQNfycJPkjUAUclomCPH7QFVCDQ4Mp2k2K1SSM6m0zrxYrOwtFQw=="
|
222 |
},
|
223 |
"node_modules/@next/eslint-plugin-next": {
|
224 |
+
"version": "13.5.6",
|
225 |
+
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-13.5.6.tgz",
|
226 |
+
"integrity": "sha512-ng7pU/DDsxPgT6ZPvuprxrkeew3XaRf4LAT4FabaEO/hAbvVx4P7wqnqdbTdDn1kgTvsI4tpIgT4Awn/m0bGbg==",
|
227 |
"dev": true,
|
228 |
"dependencies": {
|
229 |
"glob": "7.1.7"
|
230 |
}
|
231 |
},
|
232 |
"node_modules/@next/swc-darwin-arm64": {
|
233 |
+
"version": "13.5.6",
|
234 |
+
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.5.6.tgz",
|
235 |
+
"integrity": "sha512-5nvXMzKtZfvcu4BhtV0KH1oGv4XEW+B+jOfmBdpFI3C7FrB/MfujRpWYSBBO64+qbW8pkZiSyQv9eiwnn5VIQA==",
|
236 |
"cpu": [
|
237 |
"arm64"
|
238 |
],
|
|
|
245 |
}
|
246 |
},
|
247 |
"node_modules/@next/swc-darwin-x64": {
|
248 |
+
"version": "13.5.6",
|
249 |
+
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.5.6.tgz",
|
250 |
+
"integrity": "sha512-6cgBfxg98oOCSr4BckWjLLgiVwlL3vlLj8hXg2b+nDgm4bC/qVXXLfpLB9FHdoDu4057hzywbxKvmYGmi7yUzA==",
|
251 |
"cpu": [
|
252 |
"x64"
|
253 |
],
|
|
|
260 |
}
|
261 |
},
|
262 |
"node_modules/@next/swc-linux-arm64-gnu": {
|
263 |
+
"version": "13.5.6",
|
264 |
+
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.5.6.tgz",
|
265 |
+
"integrity": "sha512-txagBbj1e1w47YQjcKgSU4rRVQ7uF29YpnlHV5xuVUsgCUf2FmyfJ3CPjZUvpIeXCJAoMCFAoGnbtX86BK7+sg==",
|
266 |
"cpu": [
|
267 |
"arm64"
|
268 |
],
|
|
|
275 |
}
|
276 |
},
|
277 |
"node_modules/@next/swc-linux-arm64-musl": {
|
278 |
+
"version": "13.5.6",
|
279 |
+
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.5.6.tgz",
|
280 |
+
"integrity": "sha512-cGd+H8amifT86ZldVJtAKDxUqeFyLWW+v2NlBULnLAdWsiuuN8TuhVBt8ZNpCqcAuoruoSWynvMWixTFcroq+Q==",
|
281 |
"cpu": [
|
282 |
"arm64"
|
283 |
],
|
|
|
290 |
}
|
291 |
},
|
292 |
"node_modules/@next/swc-linux-x64-gnu": {
|
293 |
+
"version": "13.5.6",
|
294 |
+
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.5.6.tgz",
|
295 |
+
"integrity": "sha512-Mc2b4xiIWKXIhBy2NBTwOxGD3nHLmq4keFk+d4/WL5fMsB8XdJRdtUlL87SqVCTSaf1BRuQQf1HvXZcy+rq3Nw==",
|
296 |
"cpu": [
|
297 |
"x64"
|
298 |
],
|
|
|
305 |
}
|
306 |
},
|
307 |
"node_modules/@next/swc-linux-x64-musl": {
|
308 |
+
"version": "13.5.6",
|
309 |
+
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.5.6.tgz",
|
310 |
+
"integrity": "sha512-CFHvP9Qz98NruJiUnCe61O6GveKKHpJLloXbDSWRhqhkJdZD2zU5hG+gtVJR//tyW897izuHpM6Gtf6+sNgJPQ==",
|
311 |
"cpu": [
|
312 |
"x64"
|
313 |
],
|
|
|
320 |
}
|
321 |
},
|
322 |
"node_modules/@next/swc-win32-arm64-msvc": {
|
323 |
+
"version": "13.5.6",
|
324 |
+
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.5.6.tgz",
|
325 |
+
"integrity": "sha512-aFv1ejfkbS7PUa1qVPwzDHjQWQtknzAZWGTKYIAaS4NMtBlk3VyA6AYn593pqNanlicewqyl2jUhQAaFV/qXsg==",
|
326 |
"cpu": [
|
327 |
"arm64"
|
328 |
],
|
|
|
335 |
}
|
336 |
},
|
337 |
"node_modules/@next/swc-win32-ia32-msvc": {
|
338 |
+
"version": "13.5.6",
|
339 |
+
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.5.6.tgz",
|
340 |
+
"integrity": "sha512-XqqpHgEIlBHvzwG8sp/JXMFkLAfGLqkbVsyN+/Ih1mR8INb6YCc2x/Mbwi6hsAgUnqQztz8cvEbHJUbSl7RHDg==",
|
341 |
"cpu": [
|
342 |
"ia32"
|
343 |
],
|
|
|
350 |
}
|
351 |
},
|
352 |
"node_modules/@next/swc-win32-x64-msvc": {
|
353 |
+
"version": "13.5.6",
|
354 |
+
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.5.6.tgz",
|
355 |
+
"integrity": "sha512-Cqfe1YmOS7k+5mGu92nl5ULkzpKuxJrP3+4AEuPmrpFZ3BHxTY3TnHmU1On3bFmFFs6FbTcdF58CCUProGpIGQ==",
|
356 |
"cpu": [
|
357 |
"x64"
|
358 |
],
|
|
|
1575 |
}
|
1576 |
},
|
1577 |
"node_modules/eslint-config-next": {
|
1578 |
+
"version": "13.5.6",
|
1579 |
+
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-13.5.6.tgz",
|
1580 |
+
"integrity": "sha512-o8pQsUHTo9aHqJ2YiZDym5gQAMRf7O2HndHo/JZeY7TDD+W4hk6Ma8Vw54RHiBeb7OWWO5dPirQB+Is/aVQ7Kg==",
|
1581 |
"dev": true,
|
1582 |
"dependencies": {
|
1583 |
+
"@next/eslint-plugin-next": "13.5.6",
|
1584 |
"@rushstack/eslint-patch": "^1.3.3",
|
1585 |
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0",
|
1586 |
"eslint-import-resolver-node": "^0.3.6",
|
|
|
2873 |
"json5": "lib/cli.js"
|
2874 |
}
|
2875 |
},
|
2876 |
+
"node_modules/jsonp": {
|
2877 |
+
"version": "0.2.1",
|
2878 |
+
"resolved": "https://registry.npmjs.org/jsonp/-/jsonp-0.2.1.tgz",
|
2879 |
+
"integrity": "sha512-pfog5gdDxPdV4eP7Kg87M8/bHgshlZ5pybl+yKxAnCZ5O7lCIn7Ixydj03wOlnDQesky2BPyA91SQ+5Y/mNwzw==",
|
2880 |
+
"dependencies": {
|
2881 |
+
"debug": "^2.1.3"
|
2882 |
+
}
|
2883 |
+
},
|
2884 |
+
"node_modules/jsonp/node_modules/debug": {
|
2885 |
+
"version": "2.6.9",
|
2886 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
2887 |
+
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
2888 |
+
"dependencies": {
|
2889 |
+
"ms": "2.0.0"
|
2890 |
+
}
|
2891 |
+
},
|
2892 |
+
"node_modules/jsonp/node_modules/ms": {
|
2893 |
+
"version": "2.0.0",
|
2894 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
2895 |
+
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
2896 |
+
},
|
2897 |
"node_modules/jsx-ast-utils": {
|
2898 |
"version": "3.3.5",
|
2899 |
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz",
|
|
|
3116 |
"dev": true
|
3117 |
},
|
3118 |
"node_modules/next": {
|
3119 |
+
"version": "13.5.6",
|
3120 |
+
"resolved": "https://registry.npmjs.org/next/-/next-13.5.6.tgz",
|
3121 |
+
"integrity": "sha512-Y2wTcTbO4WwEsVb4A8VSnOsG1I9ok+h74q0ZdxkwM3EODqrs4pasq7O0iUxbcS9VtWMicG7f3+HAj0r1+NtKSw==",
|
3122 |
"dependencies": {
|
3123 |
+
"@next/env": "13.5.6",
|
3124 |
"@swc/helpers": "0.5.2",
|
3125 |
"busboy": "1.6.0",
|
3126 |
"caniuse-lite": "^1.0.30001406",
|
|
|
3132 |
"next": "dist/bin/next"
|
3133 |
},
|
3134 |
"engines": {
|
3135 |
+
"node": ">=16.14.0"
|
3136 |
},
|
3137 |
"optionalDependencies": {
|
3138 |
+
"@next/swc-darwin-arm64": "13.5.6",
|
3139 |
+
"@next/swc-darwin-x64": "13.5.6",
|
3140 |
+
"@next/swc-linux-arm64-gnu": "13.5.6",
|
3141 |
+
"@next/swc-linux-arm64-musl": "13.5.6",
|
3142 |
+
"@next/swc-linux-x64-gnu": "13.5.6",
|
3143 |
+
"@next/swc-linux-x64-musl": "13.5.6",
|
3144 |
+
"@next/swc-win32-arm64-msvc": "13.5.6",
|
3145 |
+
"@next/swc-win32-ia32-msvc": "13.5.6",
|
3146 |
+
"@next/swc-win32-x64-msvc": "13.5.6"
|
3147 |
},
|
3148 |
"peerDependencies": {
|
3149 |
"@opentelemetry/api": "^1.1.0",
|
|
|
6446 |
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
|
6447 |
"dev": true
|
6448 |
},
|
6449 |
+
"node_modules/react-share": {
|
6450 |
+
"version": "4.4.1",
|
6451 |
+
"resolved": "https://registry.npmjs.org/react-share/-/react-share-4.4.1.tgz",
|
6452 |
+
"integrity": "sha512-AJ9m9RiJssqvYg7MoJUc9J0D7b/liWrsfQ99ndKc5vJ4oVHHd4Fy87jBlKEQPibT40oYA3AQ/a9/oQY6/yaigw==",
|
6453 |
+
"dependencies": {
|
6454 |
+
"classnames": "^2.3.2",
|
6455 |
+
"jsonp": "^0.2.1"
|
6456 |
+
},
|
6457 |
+
"engines": {
|
6458 |
+
"node": ">=6.9.0",
|
6459 |
+
"npm": ">=5.0.0"
|
6460 |
+
},
|
6461 |
+
"peerDependencies": {
|
6462 |
+
"react": "^16.3.0 || ^17 || ^18"
|
6463 |
+
}
|
6464 |
+
},
|
6465 |
"node_modules/react-universal-interface": {
|
6466 |
"version": "0.6.2",
|
6467 |
"resolved": "https://registry.npmjs.org/react-universal-interface/-/react-universal-interface-0.6.2.tgz",
|
package.json
CHANGED
@@ -14,13 +14,14 @@
|
|
14 |
"@tanstack/react-query": "^4.32.6",
|
15 |
"classnames": "^2.3.2",
|
16 |
"install": "^0.13.0",
|
17 |
-
"next": "
|
18 |
"npm": "^10.2.4",
|
19 |
"prisma": "^5.6.0",
|
20 |
"react": "^18",
|
21 |
"react-confetti": "^6.1.0",
|
22 |
"react-dom": "^18",
|
23 |
"react-icons": "^4.12.0",
|
|
|
24 |
"react-use": "^17.4.0"
|
25 |
},
|
26 |
"devDependencies": {
|
@@ -29,7 +30,7 @@
|
|
29 |
"@types/react-dom": "^18",
|
30 |
"autoprefixer": "^10.0.1",
|
31 |
"eslint": "^8",
|
32 |
-
"eslint-config-next": "
|
33 |
"postcss": "^8",
|
34 |
"tailwindcss": "^3.3.0",
|
35 |
"typescript": "^5"
|
|
|
14 |
"@tanstack/react-query": "^4.32.6",
|
15 |
"classnames": "^2.3.2",
|
16 |
"install": "^0.13.0",
|
17 |
+
"next": "13.5.6",
|
18 |
"npm": "^10.2.4",
|
19 |
"prisma": "^5.6.0",
|
20 |
"react": "^18",
|
21 |
"react-confetti": "^6.1.0",
|
22 |
"react-dom": "^18",
|
23 |
"react-icons": "^4.12.0",
|
24 |
+
"react-share": "^4.4.1",
|
25 |
"react-use": "^17.4.0"
|
26 |
},
|
27 |
"devDependencies": {
|
|
|
30 |
"@types/react-dom": "^18",
|
31 |
"autoprefixer": "^10.0.1",
|
32 |
"eslint": "^8",
|
33 |
+
"eslint-config-next": "13.5.6",
|
34 |
"postcss": "^8",
|
35 |
"tailwindcss": "^3.3.0",
|
36 |
"typescript": "^5"
|
prisma/schema.prisma
CHANGED
@@ -4,7 +4,7 @@ generator client {
|
|
4 |
|
5 |
datasource db {
|
6 |
provider = "sqlite"
|
7 |
-
url = "file
|
8 |
}
|
9 |
|
10 |
model Prompt {
|
|
|
4 |
|
5 |
datasource db {
|
6 |
provider = "sqlite"
|
7 |
+
url = "file://data/dev.db"
|
8 |
}
|
9 |
|
10 |
model Prompt {
|
public/banner.png
ADDED
![]() |