From a123482b891477c53c673bc76d2e570831924954 Mon Sep 17 00:00:00 2001 From: Pierre Ryssen Date: Tue, 3 Mar 2026 15:48:47 +0100 Subject: [PATCH 1/3] exemple: add a .env.exemple to create your own .env --- .env.example | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..42c21e5 --- /dev/null +++ b/.env.example @@ -0,0 +1,17 @@ +# Environment variables declared in this file are NOT automatically loaded by Prisma. +# Please add `import "dotenv/config";` to your `prisma.config.ts` file, or use the Prisma CLI with Bun +# to load environment variables from .env files: https://pris.ly/prisma-config-env-vars. + +# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. +# See the documentation for all the connection string options: https://pris.ly/d/connection-strings + +# The following `prisma+postgres` URL is similar to the URL produced by running a local Prisma Postgres +# server with the `prisma dev` CLI command, when not choosing any non-default ports or settings. The API key, unlike the +# one found in a remote Prisma Postgres URL, does not contain any sensitive information. + +DATABASE_URL="postgresql://wyview:wyview@localhost:5432/wyview" + +NEXT_PUBLIC_PASSWORD=Azerty123 +NEXTAUTH_SECRET=secret +NEXTAUTH_URL=http://localhost:3000 +AUTH_SECRET="openssl rand -base64 32" \ No newline at end of file From 272885279260211c9b0fbb9fd7ec3654d8358284 Mon Sep 17 00:00:00 2001 From: Pierre Ryssen Date: Tue, 3 Mar 2026 16:13:17 +0100 Subject: [PATCH 2/3] feat (page): add pages for the social media and the finance --- app/finances/page.tsx | 32 ++++++++++++ app/instagram/page.tsx | 32 ++++++++++++ app/tiktok/page.tsx | 32 ++++++++++++ app/twitch/page.tsx | 32 ++++++++++++ app/youtube/page.tsx | 32 ++++++++++++ .../20240101000000_init/migration.sql | 50 +++++++++++++++++++ 6 files changed, 210 insertions(+) create mode 100644 prisma/migrations/20240101000000_init/migration.sql diff --git a/app/finances/page.tsx b/app/finances/page.tsx index e69de29..881e66f 100644 --- a/app/finances/page.tsx +++ b/app/finances/page.tsx @@ -0,0 +1,32 @@ +import StatCard from "@/components/StatCard"; +import { DollarSign } from "lucide-react"; + +export default function FinancesPage() { + return ( +
+
+
+ +
+
+
Revenus
+

Finances

+
+
+ +
+ + + + +
+ +
+ +

+ AUCUNE DONNÉE FINANCIÈRE DISPONIBLE
POUR LE MOMENT +

+
+
+ ); +} diff --git a/app/instagram/page.tsx b/app/instagram/page.tsx index e69de29..5b42ca1 100644 --- a/app/instagram/page.tsx +++ b/app/instagram/page.tsx @@ -0,0 +1,32 @@ +import StatCard from "@/components/StatCard"; +import { Camera } from "lucide-react"; + +export default function InstagramPage() { + return ( +
+
+
+ +
+
+
Plateforme
+

Instagram

+
+
+ +
+ + + + +
+ +
+ +

+ CONNECTEZ VOTRE COMPTE INSTAGRAM
POUR AFFICHER VOS STATISTIQUES +

+
+
+ ); +} diff --git a/app/tiktok/page.tsx b/app/tiktok/page.tsx index e69de29..8e0d8b1 100644 --- a/app/tiktok/page.tsx +++ b/app/tiktok/page.tsx @@ -0,0 +1,32 @@ +import StatCard from "@/components/StatCard"; +import { Music2 } from "lucide-react"; + +export default function TikTokPage() { + return ( +
+
+
+ +
+
+
Plateforme
+

TikTok

+
+
+ +
+ + + + +
+ +
+ +

+ CONNECTEZ VOTRE COMPTE TIKTOK
POUR AFFICHER VOS STATISTIQUES +

+
+
+ ); +} diff --git a/app/twitch/page.tsx b/app/twitch/page.tsx index e69de29..f826bec 100644 --- a/app/twitch/page.tsx +++ b/app/twitch/page.tsx @@ -0,0 +1,32 @@ +import StatCard from "@/components/StatCard"; +import { TwitchIcon } from "lucide-react"; + +export default function TwitchPage() { + return ( +
+
+
+ +
+
+
Plateforme
+

Twitch

+
+
+ +
+ + + + +
+ +
+ +

+ CONNECTEZ VOTRE COMPTE TWITCH
POUR AFFICHER VOS STATISTIQUES +

+
+
+ ); +} diff --git a/app/youtube/page.tsx b/app/youtube/page.tsx index e69de29..e4d7f8d 100644 --- a/app/youtube/page.tsx +++ b/app/youtube/page.tsx @@ -0,0 +1,32 @@ +import StatCard from "@/components/StatCard"; +import { YoutubeIcon } from "lucide-react"; + +export default function YoutubePage() { + return ( +
+
+
+ +
+
+
Plateforme
+

YouTube

+
+
+ +
+ + + + +
+ +
+ +

+ CONNECTEZ VOTRE COMPTE YOUTUBE
POUR AFFICHER VOS STATISTIQUES +

+
+
+ ); +} diff --git a/prisma/migrations/20240101000000_init/migration.sql b/prisma/migrations/20240101000000_init/migration.sql new file mode 100644 index 0000000..f572fd0 --- /dev/null +++ b/prisma/migrations/20240101000000_init/migration.sql @@ -0,0 +1,50 @@ +Loaded Prisma config from prisma.config.ts. + +-- CreateSchema +CREATE SCHEMA IF NOT EXISTS "public"; + +-- CreateTable +CREATE TABLE "User" ( + "id" TEXT NOT NULL, + "email" TEXT NOT NULL, + "password" TEXT NOT NULL, + "name" TEXT, + "role" TEXT NOT NULL DEFAULT 'member', + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "User_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "TrackedAccount" ( + "id" TEXT NOT NULL, + "platform" TEXT NOT NULL, + "username" TEXT NOT NULL, + "accountId" TEXT NOT NULL, + "userId" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "TrackedAccount_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Snapshot" ( + "id" TEXT NOT NULL, + "accountId" TEXT NOT NULL, + "followers" INTEGER NOT NULL, + "views" INTEGER NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "Snapshot_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "User_email_key" ON "User"("email"); + +-- AddForeignKey +ALTER TABLE "TrackedAccount" ADD CONSTRAINT "TrackedAccount_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Snapshot" ADD CONSTRAINT "Snapshot_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "TrackedAccount"("id") ON DELETE CASCADE ON UPDATE CASCADE; + From 179cc6681335a7c6febcdaad169e77ff33e4881a Mon Sep 17 00:00:00 2001 From: Pierre Ryssen Date: Tue, 3 Mar 2026 16:19:03 +0100 Subject: [PATCH 3/3] refactor (migration): remove the prisma migration --- .../20240101000000_init/migration.sql | 50 ------------------- 1 file changed, 50 deletions(-) delete mode 100644 prisma/migrations/20240101000000_init/migration.sql diff --git a/prisma/migrations/20240101000000_init/migration.sql b/prisma/migrations/20240101000000_init/migration.sql deleted file mode 100644 index f572fd0..0000000 --- a/prisma/migrations/20240101000000_init/migration.sql +++ /dev/null @@ -1,50 +0,0 @@ -Loaded Prisma config from prisma.config.ts. - --- CreateSchema -CREATE SCHEMA IF NOT EXISTS "public"; - --- CreateTable -CREATE TABLE "User" ( - "id" TEXT NOT NULL, - "email" TEXT NOT NULL, - "password" TEXT NOT NULL, - "name" TEXT, - "role" TEXT NOT NULL DEFAULT 'member', - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "updatedAt" TIMESTAMP(3) NOT NULL, - - CONSTRAINT "User_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "TrackedAccount" ( - "id" TEXT NOT NULL, - "platform" TEXT NOT NULL, - "username" TEXT NOT NULL, - "accountId" TEXT NOT NULL, - "userId" TEXT NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "TrackedAccount_pkey" PRIMARY KEY ("id") -); - --- CreateTable -CREATE TABLE "Snapshot" ( - "id" TEXT NOT NULL, - "accountId" TEXT NOT NULL, - "followers" INTEGER NOT NULL, - "views" INTEGER NOT NULL, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - - CONSTRAINT "Snapshot_pkey" PRIMARY KEY ("id") -); - --- CreateIndex -CREATE UNIQUE INDEX "User_email_key" ON "User"("email"); - --- AddForeignKey -ALTER TABLE "TrackedAccount" ADD CONSTRAINT "TrackedAccount_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Snapshot" ADD CONSTRAINT "Snapshot_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "TrackedAccount"("id") ON DELETE CASCADE ON UPDATE CASCADE; -