first working dev version

This commit is contained in:
yigitokar 2024-08-01 21:06:59 -07:00
parent 651f984e52
commit 9011b181ac
4 changed files with 5686 additions and 4270 deletions

View file

@ -1,34 +0,0 @@
# -----------------------------------------------------------------------------
# App
# -----------------------------------------------------------------------------
NEXT_PUBLIC_APP_URL=http://localhost:3000
# -----------------------------------------------------------------------------
# Authentication (NextAuth.js)
# -----------------------------------------------------------------------------
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GITHUB_ACCESS_TOKEN=
# -----------------------------------------------------------------------------
# Database (MySQL - PlanetScale)
# -----------------------------------------------------------------------------
DATABASE_URL="mysql://root:root@localhost:3306/taxonomy?schema=public"
# -----------------------------------------------------------------------------
# Email (Postmark)
# -----------------------------------------------------------------------------
SMTP_FROM=
POSTMARK_API_TOKEN=
POSTMARK_SIGN_IN_TEMPLATE=
POSTMARK_ACTIVATION_TEMPLATE=
# -----------------------------------------------------------------------------
# Subscriptions (Stripe)
# -----------------------------------------------------------------------------
STRIPE_API_KEY=
STRIPE_WEBHOOK_SECRET=
STRIPE_PRO_MONTHLY_PLAN_ID=

View file

@ -27,7 +27,7 @@
"@editorjs/table": "^2.2.1",
"@hookform/resolvers": "^3.1.0",
"@next-auth/prisma-adapter": "^1.0.6",
"@prisma/client": "^4.13.0",
"@prisma/client": "^5.17.0",
"@radix-ui/react-accessible-icon": "^1.0.2",
"@radix-ui/react-accordion": "^1.1.1",
"@radix-ui/react-alert-dialog": "^1.0.3",
@ -56,6 +56,7 @@
"@radix-ui/react-toggle": "^1.0.2",
"@radix-ui/react-toggle-group": "^1.0.3",
"@radix-ui/react-tooltip": "^1.0.5",
"@supabase/supabase-js": "^2.45.0",
"@t3-oss/env-nextjs": "^0.2.2",
"@typescript-eslint/parser": "^5.59.0",
"@vercel/analytics": "^1.0.0",
@ -108,7 +109,7 @@
"prettier": "^2.8.8",
"prettier-plugin-tailwindcss": "^0.1.13",
"pretty-quick": "^3.1.3",
"prisma": "^4.13.0",
"prisma": "^5.17.0",
"rehype": "^12.0.1",
"rehype-autolink-headings": "^6.1.1",
"rehype-pretty-code": "^0.9.5",

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,10 @@
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
provider = "postgresql"
url = env("DATABASE_URL")
}
model Account {
@ -16,20 +13,19 @@ model Account {
type String
provider String
providerAccountId String
refresh_token String? @db.Text
access_token String? @db.Text
refresh_token String?
access_token String?
expires_at Int?
token_type String?
scope String?
id_token String? @db.Text
id_token String?
session_state String?
createdAt DateTime @default(now()) @map(name: "created_at")
updatedAt DateTime @default(now()) @map(name: "updated_at")
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @default(now()) @map("updated_at")
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@unique([provider, providerAccountId])
@@map(name: "accounts")
@@map("accounts")
}
model Session {
@ -39,28 +35,26 @@ model Session {
expires DateTime
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@map(name: "sessions")
@@map("sessions")
}
model User {
id String @id @default(cuid())
name String?
email String? @unique
emailVerified DateTime?
image String?
createdAt DateTime @default(now()) @map(name: "created_at")
updatedAt DateTime @default(now()) @map(name: "updated_at")
id String @id @default(cuid())
name String?
email String? @unique
emailVerified DateTime?
image String?
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @default(now()) @map("updated_at")
stripeCustomerId String? @unique @map("stripe_customer_id")
stripeSubscriptionId String? @unique @map("stripe_subscription_id")
stripePriceId String? @map("stripe_price_id")
stripeCurrentPeriodEnd DateTime? @map("stripe_current_period_end")
accounts Account[]
Post Post[]
sessions Session[]
accounts Account[]
sessions Session[]
Post Post[]
stripeCustomerId String? @unique @map(name: "stripe_customer_id")
stripeSubscriptionId String? @unique @map(name: "stripe_subscription_id")
stripePriceId String? @map(name: "stripe_price_id")
stripeCurrentPeriodEnd DateTime? @map(name: "stripe_current_period_end")
@@map(name: "users")
@@map("users")
}
model VerificationToken {
@ -69,7 +63,7 @@ model VerificationToken {
expires DateTime
@@unique([identifier, token])
@@map(name: "verification_tokens")
@@map("verification_tokens")
}
model Post {
@ -77,11 +71,10 @@ model Post {
title String
content Json?
published Boolean @default(false)
createdAt DateTime @default(now()) @map(name: "created_at")
updatedAt DateTime @default(now()) @map(name: "updated_at")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @default(now()) @map("updated_at")
authorId String
author User @relation(fields: [authorId], references: [id])
author User @relation(fields: [authorId], references: [id])
@@map(name: "posts")
}
@@map("posts")
}