diff --git a/README.md b/README.md deleted file mode 100644 index 9baee9a..0000000 --- a/README.md +++ /dev/null @@ -1,36 +0,0 @@ -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. \ No newline at end of file diff --git a/app/[id]/page.tsx b/app/[id]/page.tsx index fc7c4f7..7298dc8 100644 --- a/app/[id]/page.tsx +++ b/app/[id]/page.tsx @@ -10,8 +10,8 @@ import 'prismjs/themes/prism-tomorrow.css'; import AuthSection from '@/components/paste-form/AuthSection'; import CodeViewer from '@/components/paste/CodeViewer'; import LoadingPaste from '@/components/paste/LoadingPaste'; -import PasswordForm from '@/components/paste/PasswordForm'; -import PasteSidebar from '@/components/paste/PasteSidebar'; +import PasswordForm from '@/components/paste/Password'; +import PasteSidebar from '@/components/paste/Sidebar'; import { Paste } from '@/types/paste'; async function loadLanguage(lang: string) { diff --git a/app/layout.tsx b/app/layout.tsx index 45243d0..5091723 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,5 +1,5 @@ -import AuthProvider from '@/components/SessionProvider'; -import ToasterProvider from '@/components/ui/ToasterProvider'; +import AuthProvider from '@/components/providers/SessionProvider'; +import ToasterProvider from '@/components/providers/ToasterProvider'; import { ReactNode } from 'react'; import './globals.css'; diff --git a/components/PasteForm.tsx b/components/PasteForm.tsx index b6ceddf..2ba9e8b 100644 --- a/components/PasteForm.tsx +++ b/components/PasteForm.tsx @@ -2,7 +2,7 @@ import AuthSection from "@/components/paste-form/AuthSection"; import Editor from "@/components/paste-form/Editor"; -import SidebarPanel from "@/components/paste-form/SidebarPanel"; +import SidebarPanel from "@/components/paste-form/Sidebar"; import { useSession } from "next-auth/react"; import { useRouter } from "next/navigation"; import { useCallback, useEffect, useState } from "react"; diff --git a/components/paste-form/SidebarPanel.tsx b/components/paste-form/Sidebar.tsx similarity index 100% rename from components/paste-form/SidebarPanel.tsx rename to components/paste-form/Sidebar.tsx diff --git a/components/paste/PasswordForm.tsx b/components/paste/Password.tsx similarity index 100% rename from components/paste/PasswordForm.tsx rename to components/paste/Password.tsx diff --git a/components/paste/PasteSidebar.tsx b/components/paste/Sidebar.tsx similarity index 100% rename from components/paste/PasteSidebar.tsx rename to components/paste/Sidebar.tsx diff --git a/components/SessionProvider.tsx b/components/providers/SessionProvider.tsx similarity index 100% rename from components/SessionProvider.tsx rename to components/providers/SessionProvider.tsx diff --git a/components/ui/ToasterProvider.tsx b/components/providers/ToasterProvider.tsx similarity index 100% rename from components/ui/ToasterProvider.tsx rename to components/providers/ToasterProvider.tsx diff --git a/prisma/altbin.db b/prisma/altbin.db deleted file mode 100644 index d3e55a4..0000000 Binary files a/prisma/altbin.db and /dev/null differ diff --git a/prisma/migrations/20250819133430_init/migration.sql b/prisma/migrations/20250819133430_init/migration.sql deleted file mode 100644 index 5172d25..0000000 --- a/prisma/migrations/20250819133430_init/migration.sql +++ /dev/null @@ -1,12 +0,0 @@ --- CreateTable -CREATE TABLE "Paste" ( - "id" TEXT NOT NULL PRIMARY KEY, - "title" TEXT, - "content" TEXT NOT NULL, - "password" TEXT, - "maxViews" INTEGER, - "views" INTEGER NOT NULL DEFAULT 0, - "size" INTEGER, - "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, - "createdBy" TEXT -); diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml deleted file mode 100644 index 2a5a444..0000000 --- a/prisma/migrations/migration_lock.toml +++ /dev/null @@ -1,3 +0,0 @@ -# Please do not edit this file manually -# It should be added in your version-control system (e.g., Git) -provider = "sqlite" diff --git a/prisma/schema.prisma b/prisma/schema.prisma index e01776f..9da3800 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -3,8 +3,8 @@ generator client { } datasource db { - provider = "sqlite" - url = "file:./altbin.db" + provider = "postgresql" + url = env("DATABASE_URL") } model Paste { @@ -17,12 +17,11 @@ model Paste { size Int? createdAt DateTime @default(now()) createdBy String? - - dummyId String? - dummy Dummy? @relation(fields: [dummyId], references: [id]) + dummyId String? + dummy Dummy? @relation(fields: [dummyId], references: [id]) } model Dummy { id String @id @default(cuid()) pastes Paste[] -} \ No newline at end of file +}