├── .eslintrc.json ├── public ├── favicon.ico ├── yapici.png ├── feedback.png ├── Nacizaneco.png ├── background.png ├── dusunceler.png ├── NacizanecoBeta.png └── nacizane-profil.png ├── next.config.mjs ├── prisma ├── migrations │ ├── migration_lock.toml │ ├── 20240907232037_ │ │ └── migration.sql │ └── 20240812235952_init │ │ └── migration.sql └── schema.prisma ├── postcss.config.mjs ├── lib ├── utils.ts └── randomAuthorName.ts ├── app ├── api │ ├── auth │ │ └── [...nextauth] │ │ │ └── route.ts │ └── user │ │ ├── feedback │ │ ├── delete │ │ │ └── route.ts │ │ └── send │ │ │ └── route.ts │ │ └── update │ │ └── route.ts ├── utils │ ├── getUserId.ts │ ├── db.ts │ ├── getToken.ts │ └── auth.ts ├── components │ ├── landingPage │ │ ├── Announcement.tsx │ │ ├── Footer.tsx │ │ ├── ProfileCard.tsx │ │ └── Header.tsx │ ├── SignInWithGithub.tsx │ ├── username │ │ ├── FeedbackComment.tsx │ │ └── FeedbackForm.tsx │ └── ProfileForm.tsx ├── globals.css ├── layout.tsx ├── ayarlar │ └── page.tsx ├── not-found.tsx ├── gizlilik-politikasi │ └── page.tsx ├── kullanim-kosullari │ └── page.tsx ├── page.tsx └── [username] │ └── page.tsx ├── .env.example ├── components.json ├── .gitignore ├── tsconfig.json ├── components ├── ui │ ├── label.tsx │ ├── textarea.tsx │ ├── separator.tsx │ ├── input.tsx │ ├── toaster.tsx │ ├── checkbox.tsx │ ├── badge.tsx │ ├── avatar.tsx │ ├── button.tsx │ ├── card.tsx │ ├── accordion.tsx │ ├── toast.tsx │ ├── select.tsx │ └── dropdown-menu.tsx └── magicui │ └── blur-fade.tsx ├── package.json ├── tailwind.config.ts ├── README.md ├── hooks └── use-toast.ts └── LICENSE /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alicangunduz/nacizane/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/yapici.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alicangunduz/nacizane/HEAD/public/yapici.png -------------------------------------------------------------------------------- /public/feedback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alicangunduz/nacizane/HEAD/public/feedback.png -------------------------------------------------------------------------------- /public/Nacizaneco.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alicangunduz/nacizane/HEAD/public/Nacizaneco.png -------------------------------------------------------------------------------- /public/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alicangunduz/nacizane/HEAD/public/background.png -------------------------------------------------------------------------------- /public/dusunceler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alicangunduz/nacizane/HEAD/public/dusunceler.png -------------------------------------------------------------------------------- /public/NacizanecoBeta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alicangunduz/nacizane/HEAD/public/NacizanecoBeta.png -------------------------------------------------------------------------------- /public/nacizane-profil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alicangunduz/nacizane/HEAD/public/nacizane-profil.png -------------------------------------------------------------------------------- /next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | export default nextConfig; 5 | -------------------------------------------------------------------------------- /prisma/migrations/migration_lock.toml: -------------------------------------------------------------------------------- 1 | # Please do not edit this file manually 2 | # It should be added in your version-control system (i.e. Git) 3 | provider = "postgresql" -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /app/api/auth/[...nextauth]/route.ts: -------------------------------------------------------------------------------- 1 | import { authOptions } from "@/app/utils/auth"; 2 | import NextAuth from "next-auth/next"; 3 | 4 | const handler = NextAuth(authOptions); 5 | 6 | export { handler as GET, handler as POST }; 7 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | # Database ayarları 2 | DATABASE_URL= 3 | # GitHub OAuth ayarları 4 | GITHUB_ID= 5 | GITHUB_SECRET= 6 | # Callback URL 7 | CALLBACK_URL=http://localhost:3000 8 | 9 | # Next Auth ayarları 10 | NEXTAUTH_SECRET= 11 | NEXTAUTH_URL=http://localhost:3000 -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } -------------------------------------------------------------------------------- /app/utils/getUserId.ts: -------------------------------------------------------------------------------- 1 | import getToken from "@/app/utils/getToken"; 2 | import prisma from "@/app/utils/db"; 3 | 4 | export default async function getUserId() { 5 | const token = getToken(); 6 | if (!token) { 7 | return ""; 8 | } 9 | 10 | const session = await prisma.session.findFirst({ 11 | where: { 12 | sessionToken: token, 13 | }, 14 | }); 15 | 16 | if (!session) { 17 | return ""; 18 | } 19 | 20 | return session.userId; 21 | } 22 | -------------------------------------------------------------------------------- /app/utils/db.ts: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from "@prisma/client"; 2 | 3 | const prismaClientSingleton = () => { 4 | return new PrismaClient(); 5 | }; 6 | 7 | declare const globalThis: { 8 | prismaGlobal: ReturnType; 9 | } & typeof global; 10 | 11 | const prisma = globalThis.prismaGlobal ?? prismaClientSingleton(); 12 | 13 | export default prisma; 14 | 15 | if ((process.env.NODE_ENV as string) !== "production") 16 | globalThis.prismaGlobal = prisma; 17 | -------------------------------------------------------------------------------- /app/utils/getToken.ts: -------------------------------------------------------------------------------- 1 | import { cookies } from "next/headers"; 2 | 3 | export default function getToken() { 4 | const cookieStore = cookies(); 5 | const cookieName = "next-auth.session-token"; 6 | 7 | const getSecureToken = cookieStore.get(`__Secure-${cookieName}`); 8 | const getNotSecureToken = cookieStore.get(cookieName); 9 | 10 | const token = getSecureToken ?? getNotSecureToken; 11 | 12 | if (!token) { 13 | return ""; 14 | } 15 | 16 | return token.value; 17 | } 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env 30 | .env*.local 31 | 32 | # vercel 33 | .vercel 34 | 35 | # typescript 36 | *.tsbuildinfo 37 | next-env.d.ts 38 | 39 | # ide 40 | .idea 41 | -------------------------------------------------------------------------------- /app/components/landingPage/Announcement.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Link from "next/link"; 3 | 4 | function Announcement() { 5 | return ( 6 |
7 |

8 | Nacizane open-source bir üründür.{" "} 9 | 14 | Buraya tıklayarak contributor olabilirsiniz. 15 | 16 |

17 |
18 | ); 19 | } 20 | 21 | export default Announcement; 22 | -------------------------------------------------------------------------------- /app/utils/auth.ts: -------------------------------------------------------------------------------- 1 | import type { NextAuthOptions } from "next-auth"; 2 | import GitHubProvider from "next-auth/providers/github"; 3 | import { PrismaAdapter } from "@auth/prisma-adapter"; 4 | import prisma from "@/app/utils/db"; 5 | 6 | export const authOptions = { 7 | adapter: PrismaAdapter(prisma), 8 | session: { 9 | strategy: "database", 10 | maxAge: 30 * 24 * 60 * 60, 11 | }, 12 | providers: [ 13 | GitHubProvider({ 14 | clientId: process.env.GITHUB_ID as string, 15 | clientSecret: process.env.GITHUB_SECRET as string, 16 | }), 17 | ], 18 | pages: { 19 | signIn: "/", 20 | signOut: "/", 21 | }, 22 | } as NextAuthOptions; 23 | -------------------------------------------------------------------------------- /app/components/SignInWithGithub.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { Button } from "@/components/ui/button"; 4 | import { Github } from "lucide-react"; 5 | import { signIn } from "next-auth/react"; 6 | import { useRouter } from "next/navigation"; 7 | 8 | export default function SignInWithGithub() { 9 | const router = useRouter(); 10 | return ( 11 | 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["dom", "dom.iterable", "esnext"], 4 | "allowJs": true, 5 | "skipLibCheck": true, 6 | "strict": true, 7 | "noEmit": true, 8 | "esModuleInterop": true, 9 | "module": "esnext", 10 | "moduleResolution": "bundler", 11 | "resolveJsonModule": true, 12 | "isolatedModules": true, 13 | "jsx": "preserve", 14 | "incremental": true, 15 | "plugins": [ 16 | { 17 | "name": "next" 18 | } 19 | ], 20 | "paths": { 21 | "@/*": ["./*"] 22 | } 23 | }, 24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 25 | "exclude": ["node_modules"] 26 | } 27 | -------------------------------------------------------------------------------- /components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as LabelPrimitive from "@radix-ui/react-label" 5 | import { cva, type VariantProps } from "class-variance-authority" 6 | 7 | import { cn } from "@/lib/utils" 8 | 9 | const labelVariants = cva( 10 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" 11 | ) 12 | 13 | const Label = React.forwardRef< 14 | React.ElementRef, 15 | React.ComponentPropsWithoutRef & 16 | VariantProps 17 | >(({ className, ...props }, ref) => ( 18 | 23 | )) 24 | Label.displayName = LabelPrimitive.Root.displayName 25 | 26 | export { Label } 27 | -------------------------------------------------------------------------------- /components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | export interface TextareaProps 6 | extends React.TextareaHTMLAttributes {} 7 | 8 | const Textarea = React.forwardRef( 9 | ({ className, ...props }, ref) => { 10 | return ( 11 |