diff --git a/app/not-found.tsx b/app/not-found.tsx
new file mode 100644
index 0000000..5defe82
--- /dev/null
+++ b/app/not-found.tsx
@@ -0,0 +1,36 @@
+import type { Metadata } from "next";
+import Link from "next/link";
+
+export const metadata: Metadata = {
+ title: "Page introuvable - WikiRush",
+ description: "Cette page n'existe pas.",
+};
+
+export default function NotFound() {
+ return (
+
+
+
+
404
+
Page introuvable
+
+ Cet article n'existe pas sur WikiRush.
+
+ Tu t'es peut-être perdu en chemin ?
+
+
+
+
+
←
+ Retour à l'accueil
+
+
+
+ );
+}
diff --git a/lib/generated/prisma/internal/class.ts b/lib/generated/prisma/internal/class.ts
index eadcbd7..6b3d3cc 100644
--- a/lib/generated/prisma/internal/class.ts
+++ b/lib/generated/prisma/internal/class.ts
@@ -20,7 +20,7 @@ const config: runtime.GetPrismaClientConfig = {
"clientVersion": "7.7.0",
"engineVersion": "75cbdc1eb7150937890ad5465d861175c6624711",
"activeProvider": "sqlite",
- "inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"../lib/generated/prisma\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n}\n\nmodel User {\n id String @id @default(cuid())\n name String\n email String @unique\n password String\n createdAt DateTime @default(now())\n games Game[]\n dailyResults DailyResult[]\n}\n\nmodel Game {\n id String @id @default(cuid())\n userId String\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n mode String // \"solo\" | \"multi\" | \"daily\" | \"blitz\"\n startArticle String\n targetArticle String\n path String // JSON array de titres\n clicks Int\n timeSeconds Float\n won Boolean @default(true)\n playedAt DateTime @default(now())\n\n @@index([userId])\n}\n\nmodel DailyPuzzle {\n id String @id @default(cuid())\n date String @unique // \"YYYY-MM-DD\"\n startArticle String\n targetArticle String\n results DailyResult[]\n}\n\nmodel DailyResult {\n id String @id @default(cuid())\n puzzleId String\n puzzle DailyPuzzle @relation(fields: [puzzleId], references: [id], onDelete: Cascade)\n userId String\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n path String // JSON\n clicks Int\n timeSeconds Float\n won Boolean\n playedAt DateTime @default(now())\n\n @@unique([puzzleId, userId])\n @@index([puzzleId])\n}\n",
+ "inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"../lib/generated/prisma\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n}\n\nmodel User {\n id String @id @default(uuid(7))\n name String\n email String @unique\n password String\n createdAt DateTime @default(now())\n games Game[]\n dailyResults DailyResult[]\n}\n\nmodel Game {\n id String @id @default(uuid(7))\n userId String\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n mode String // \"solo\" | \"multi\" | \"daily\" | \"blitz\"\n startArticle String\n targetArticle String\n path String // JSON array de titres\n clicks Int\n timeSeconds Float\n won Boolean @default(true)\n playedAt DateTime @default(now())\n\n @@index([userId])\n}\n\nmodel DailyPuzzle {\n id String @id @default(uuid(7))\n date String @unique // \"YYYY-MM-DD\"\n startArticle String\n targetArticle String\n results DailyResult[]\n}\n\nmodel DailyResult {\n id String @id @default(uuid(7))\n puzzleId String\n puzzle DailyPuzzle @relation(fields: [puzzleId], references: [id], onDelete: Cascade)\n userId String\n user User @relation(fields: [userId], references: [id], onDelete: Cascade)\n path String // JSON\n clicks Int\n timeSeconds Float\n won Boolean\n playedAt DateTime @default(now())\n\n @@unique([puzzleId, userId])\n @@index([puzzleId])\n}\n",
"runtimeDataModel": {
"models": {},
"enums": {},
diff --git a/lib/prisma.ts b/lib/prisma.ts
index 29d983e..d91d8bc 100644
--- a/lib/prisma.ts
+++ b/lib/prisma.ts
@@ -5,7 +5,7 @@ import { PrismaClient } from "./generated/prisma/client";
const globalForPrisma = globalThis as unknown as { prisma?: PrismaClient };
function createPrisma() {
- const adapter = new PrismaBetterSqlite3({ url: "./wikirace.db" });
+ const adapter = new PrismaBetterSqlite3({ url: "./wikirush.db" });
return new PrismaClient({ adapter });
}
diff --git a/prisma.config.ts b/prisma.config.ts
index cfa2f83..9bfb773 100644
--- a/prisma.config.ts
+++ b/prisma.config.ts
@@ -4,7 +4,7 @@ const config = {
path: "prisma/migrations",
},
datasource: {
- url: "file:./wikirace.db",
+ url: "file:./wikirush.db",
},
};
diff --git a/prisma/migrations/20260410132623_init/migration.sql b/prisma/migrations/20260410132623_init/migration.sql
deleted file mode 100644
index a33e961..0000000
--- a/prisma/migrations/20260410132623_init/migration.sql
+++ /dev/null
@@ -1,29 +0,0 @@
--- CreateTable
-CREATE TABLE "User" (
- "id" TEXT NOT NULL PRIMARY KEY,
- "name" TEXT NOT NULL,
- "email" TEXT NOT NULL,
- "password" TEXT NOT NULL,
- "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
-);
-
--- CreateTable
-CREATE TABLE "Game" (
- "id" TEXT NOT NULL PRIMARY KEY,
- "userId" TEXT NOT NULL,
- "mode" TEXT NOT NULL,
- "startArticle" TEXT NOT NULL,
- "targetArticle" TEXT NOT NULL,
- "path" TEXT NOT NULL,
- "clicks" INTEGER NOT NULL,
- "timeSeconds" REAL NOT NULL,
- "won" BOOLEAN NOT NULL DEFAULT true,
- "playedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
- CONSTRAINT "Game_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE
-);
-
--- CreateIndex
-CREATE UNIQUE INDEX "User_email_key" ON "User"("email");
-
--- CreateIndex
-CREATE INDEX "Game_userId_idx" ON "Game"("userId");
diff --git a/prisma/migrations/20260410193825_add_daily_blitz/migration.sql b/prisma/migrations/20260410204435_init/migration.sql
similarity index 54%
rename from prisma/migrations/20260410193825_add_daily_blitz/migration.sql
rename to prisma/migrations/20260410204435_init/migration.sql
index e22938c..cb0e8cd 100644
--- a/prisma/migrations/20260410193825_add_daily_blitz/migration.sql
+++ b/prisma/migrations/20260410204435_init/migration.sql
@@ -1,3 +1,27 @@
+-- CreateTable
+CREATE TABLE "User" (
+ "id" TEXT NOT NULL PRIMARY KEY,
+ "name" TEXT NOT NULL,
+ "email" TEXT NOT NULL,
+ "password" TEXT NOT NULL,
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
+);
+
+-- CreateTable
+CREATE TABLE "Game" (
+ "id" TEXT NOT NULL PRIMARY KEY,
+ "userId" TEXT NOT NULL,
+ "mode" TEXT NOT NULL,
+ "startArticle" TEXT NOT NULL,
+ "targetArticle" TEXT NOT NULL,
+ "path" TEXT NOT NULL,
+ "clicks" INTEGER NOT NULL,
+ "timeSeconds" REAL NOT NULL,
+ "won" BOOLEAN NOT NULL DEFAULT true,
+ "playedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ CONSTRAINT "Game_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE
+);
+
-- CreateTable
CREATE TABLE "DailyPuzzle" (
"id" TEXT NOT NULL PRIMARY KEY,
@@ -20,6 +44,12 @@ CREATE TABLE "DailyResult" (
CONSTRAINT "DailyResult_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);
+-- CreateIndex
+CREATE UNIQUE INDEX "User_email_key" ON "User"("email");
+
+-- CreateIndex
+CREATE INDEX "Game_userId_idx" ON "Game"("userId");
+
-- CreateIndex
CREATE UNIQUE INDEX "DailyPuzzle_date_key" ON "DailyPuzzle"("date");
diff --git a/prisma/schema.prisma b/prisma/schema.prisma
index c792f3f..bc5b462 100644
--- a/prisma/schema.prisma
+++ b/prisma/schema.prisma
@@ -7,36 +7,34 @@ datasource db {
provider = "sqlite"
}
-
-
model User {
- id String @id @default(cuid())
- name String
- email String @unique
- password String
- createdAt DateTime @default(now())
+ id String @id @default(uuid(7))
+ name String
+ email String @unique
+ password String
+ createdAt DateTime @default(now())
games Game[]
dailyResults DailyResult[]
}
model Game {
- id String @id @default(cuid())
- userId String
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
- mode String // "solo" | "multi" | "daily" | "blitz"
- startArticle String
+ id String @id @default(uuid(7))
+ userId String
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
+ mode String // "solo" | "multi" | "daily" | "blitz"
+ startArticle String
targetArticle String
- path String // JSON array de titres
- clicks Int
- timeSeconds Float
- won Boolean @default(true)
- playedAt DateTime @default(now())
+ path String // JSON array de titres
+ clicks Int
+ timeSeconds Float
+ won Boolean @default(true)
+ playedAt DateTime @default(now())
@@index([userId])
}
model DailyPuzzle {
- id String @id @default(cuid())
+ id String @id @default(uuid(7))
date String @unique // "YYYY-MM-DD"
startArticle String
targetArticle String
@@ -44,16 +42,16 @@ model DailyPuzzle {
}
model DailyResult {
- id String @id @default(cuid())
- puzzleId String
- puzzle DailyPuzzle @relation(fields: [puzzleId], references: [id], onDelete: Cascade)
- userId String
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
- path String // JSON
- clicks Int
- timeSeconds Float
- won Boolean
- playedAt DateTime @default(now())
+ id String @id @default(uuid(7))
+ puzzleId String
+ puzzle DailyPuzzle @relation(fields: [puzzleId], references: [id], onDelete: Cascade)
+ userId String
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
+ path String // JSON
+ clicks Int
+ timeSeconds Float
+ won Boolean
+ playedAt DateTime @default(now())
@@unique([puzzleId, userId])
@@index([puzzleId])
diff --git a/wikirace.db b/wikirace.db
deleted file mode 100644
index b23aee2..0000000
Binary files a/wikirace.db and /dev/null differ