diff --git a/.env b/.env
index 021615e..8f46d6a 100644
--- a/.env
+++ b/.env
@@ -1,24 +1,11 @@
-# When adding additional environment variables, the schema in "/src/env.js"
-# should be updated accordingly.
-
-# Drizzle
DATABASE_URL="postgresql://postgres:hackme@localhost:5432/opengifame"
-# Next Auth
-# You can generate a new secret on the command line with:
-# openssl rand -base64 32
-# https://next-auth.js.org/configuration/options#secret
NEXTAUTH_SECRET="tAOVgxpY1U0BsnPCr6Gf8WVkmRMkp06ztUfwMhBKMQ4="
-NEXTAUTH_URL="http://localhost:3000"
-
-# Next Auth Discord Provider
-DISCORD_CLIENT_ID=""
-DISCORD_CLIENT_SECRET=""
-
+NEXTAUTH_URL="https://opengifame.dev.fergl.ie:3000"
NEXT_PUBLIC_SITE_NAME=Open Gifame
NEXT_PUBLIC_SITE_DESCRIPTION=Robot powered giffage
-NEXT_PUBLIC_SITE_URL=https://gifs.ferg.al,
-NEXT_PUBLIC_SITE_OG_IMAGE=http://localhost:3000/icon.png
+NEXT_PUBLIC_SITE_URL=https://opengifame.dev.fergl.ie:3000
+NEXT_PUBLIC_SITE_OG_IMAGE=https://opengifame.dev.fergl.ie:3000/icon.png
NEXT_PUBLIC_SITE_TWITTER=https://twitter.com/opengifame
NEXT_PUBLIC_SITE_GITHUB=https://github.com/fergalmoran/opengifame
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index 88c180d..e59a9b2 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -1,61 +1,53 @@
/** @type {import("eslint").Linter.Config} */
const config = {
- "parser": "@typescript-eslint/parser",
- "parserOptions": {
- "project": true
+ parser: "@typescript-eslint/parser",
+ parserOptions: {
+ project: true,
},
- "plugins": [
- "@typescript-eslint",
- "drizzle"
- ],
- "extends": [
+ plugins: ["@typescript-eslint", "drizzle"],
+ extends: [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended-type-checked",
- "plugin:@typescript-eslint/stylistic-type-checked"
+ "plugin:@typescript-eslint/stylistic-type-checked",
],
- "rules": {
+ rules: {
+ "@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/consistent-type-imports": [
"warn",
{
- "prefer": "type-imports",
- "fixStyle": "inline-type-imports"
- }
+ prefer: "type-imports",
+ fixStyle: "inline-type-imports",
+ },
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
- "argsIgnorePattern": "^_"
- }
+ argsIgnorePattern: "^_",
+ },
],
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-misused-promises": [
"error",
{
- "checksVoidReturn": {
- "attributes": false
- }
- }
+ checksVoidReturn: {
+ attributes: false,
+ },
+ },
],
"drizzle/enforce-delete-with-where": [
"error",
{
- "drizzleObjectName": [
- "db",
- "ctx.db"
- ]
- }
+ drizzleObjectName: ["db", "ctx.db"],
+ },
],
"drizzle/enforce-update-with-where": [
"error",
{
- "drizzleObjectName": [
- "db",
- "ctx.db"
- ]
- }
- ]
- }
-}
-module.exports = config;
\ No newline at end of file
+ drizzleObjectName: ["db", "ctx.db"],
+ },
+ ],
+ },
+};
+module.exports = config;
diff --git a/.vscode/settings.json b/.vscode/settings.json
index cae72af..b3b431b 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,3 +1,4 @@
{
- "workbench.colorTheme": "Tinacious Design (High Contrast)"
+ // "workbench.colorTheme": "Tinacious Design (High Contrast)"
+ "workbench.colorTheme": "Cyberpunk 2077 rebuild",
}
\ No newline at end of file
diff --git a/bun.lockb b/bun.lockb
index 6fda6fe..bb94666 100755
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/package.json b/package.json
index fc178a2..aeb404c 100644
--- a/package.json
+++ b/package.json
@@ -90,14 +90,15 @@
"zod": "^3.23.8"
},
"devDependencies": {
- "@types/eslint": "^9.6.1",
+ "@faker-js/faker": "^9.0.0",
+ "@types/eslint": "^8.56.12",
"@types/node": "^22.5.4",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^8.4.0",
"@typescript-eslint/parser": "^8.4.0",
"drizzle-kit": "^0.24.2",
- "eslint": "^9.10.0",
+ "eslint": "^8.57.0",
"eslint-config-next": "^14.2.8",
"eslint-plugin-drizzle": "^0.2.3",
"postcss": "^8.4.45",
diff --git a/src/app/(site)/(auth)/register/page.tsx b/src/app/(site)/(auth)/register/page.tsx
index 39066b8..964ae53 100644
--- a/src/app/(site)/(auth)/register/page.tsx
+++ b/src/app/(site)/(auth)/register/page.tsx
@@ -1,12 +1,10 @@
"use client";
import React from "react";
-import RegistrationForm from "@/components/forms/auth/RegistrationForm";
-import SocialLogin from "@/components/widgets/login/SocialLogin";
+import RegistrationForm from "@/components/forms/auth/registration-form";
+import SocialLogin from "@/components/widgets/login/social-login-button";
import Link from "next/link";
import { Icons } from "@/components/icons";
-import { cn } from "@/lib/utils";
-import { buttonVariants } from "@/components/ui/button";
const RegisterPage: React.FC = () => {
return (
diff --git a/src/app/(site)/(auth)/signin/page.tsx b/src/app/(site)/(auth)/signin/page.tsx
index f2e7d82..36092e6 100644
--- a/src/app/(site)/(auth)/signin/page.tsx
+++ b/src/app/(site)/(auth)/signin/page.tsx
@@ -1,11 +1,9 @@
"use client";
-import SocialLogin from "@/components/widgets/login/SocialLogin";
+import SocialLogin from "@/components/widgets/login/social-login-button";
import Link from "next/link";
import React from "react";
import { Icons } from "@/components/icons";
-import { cn } from "@/lib/utils";
-import { buttonVariants } from "@/components/ui/button";
-import SignInForm from "@/components/forms/auth/SignInForm";
+import SignInForm from "@/components/forms/auth/signin-form";
const SignInPage = () => {
return (
diff --git a/src/app/_components/trending-images.tsx b/src/app/_components/trending-images.tsx
deleted file mode 100644
index dcb3285..0000000
--- a/src/app/_components/trending-images.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-"use client";
-
-import { useState } from "react";
-
-import { api } from "@/trpc/react";
-
-export function TrendingImages() {
- const [name, setName] = useState("");
- return
Trending Images
;
-}
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 1baf2a5..c0e40ea 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -1,7 +1,7 @@
-import { Inter as FontSans } from "next/font/google";
+import { Roboto as font } from "next/font/google";
import "@/styles/globals.css";
-import { type Metadata, Viewport } from "next";
+import { type Metadata, type Viewport } from "next";
import { TRPCReactProvider } from "@/trpc/react";
import { cn } from "@/lib/utils";
@@ -12,17 +12,18 @@ import React from "react";
import TopNavbar from "@/components/navbar/top-navbar";
import { dashboardConfig } from "@/config/top-nav.config";
import { siteConfig } from "@/config/site.config";
+import { getServerSession } from "next-auth";
-const fontSans = FontSans({
- subsets: ["latin"],
- variable: "--font-sans",
-});
export const viewport: Viewport = {
themeColor: [
{ media: "(prefers-color-scheme: light)", color: "white" },
{ media: "(prefers-color-scheme: dark)", color: "black" },
],
};
+const f = font({
+ weight: "400",
+ subsets: ["latin"],
+});
export const metadata: Metadata = {
title: "Open Gifame",
@@ -30,9 +31,10 @@ export const metadata: Metadata = {
icons: [{ rel: "icon", url: "/favicon.ico" }],
};
-export default function RootLayout({
+export default async function RootLayout({
children,
}: Readonly<{ children: React.ReactNode }>) {
+ const session = await getServerSession();
return (
@@ -45,15 +47,15 @@ export default function RootLayout({
-
- {children}
+
+ {children}
diff --git a/src/app/page.tsx b/src/app/page.tsx
index fbb0cdd..427b17a 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,5 +1,5 @@
-import { TrendingImages } from "@/app/_components/trending-images";
import LandingPage from "@/components/pages/landing-page";
+import { TrendingImages } from "@/components/trending-images";
import { getServerAuthSession } from "@/server/auth";
import { HydrateClient } from "@/trpc/server";
diff --git a/src/components/forms/auth/RegistrationForm.tsx b/src/components/forms/auth/registration-form.tsx
similarity index 100%
rename from src/components/forms/auth/RegistrationForm.tsx
rename to src/components/forms/auth/registration-form.tsx
diff --git a/src/components/forms/auth/SignInForm.tsx b/src/components/forms/auth/signin-form.tsx
similarity index 100%
rename from src/components/forms/auth/SignInForm.tsx
rename to src/components/forms/auth/signin-form.tsx
diff --git a/src/components/icons.tsx b/src/components/icons.tsx
index 5d79b19..3cfe83e 100644
--- a/src/components/icons.tsx
+++ b/src/components/icons.tsx
@@ -25,6 +25,7 @@ import {
X,
type Icon as LucideIcon,
Terminal,
+ LogIn,
} from "lucide-react";
export type Icon = typeof LucideIcon;
@@ -46,9 +47,9 @@ export const Icons = {
user: User,
arrowRight: ArrowRight,
help: HelpCircle,
+ login: LogIn,
logo: ({ ...props }: LucideProps) => (