diff --git a/README.md b/README.md index 697d2b9..6ec6b88 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A modern, high-performance Kanban & Workflow web application designed to help yo ![Tailwind CSS](https://img.shields.io/badge/Tailwind-v4-38bdf8?style=flat-square&logo=tailwind-css) ![Auth.js](https://img.shields.io/badge/Auth.js-v5-purple?style=flat-square) ![Drizzle ORM](https://img.shields.io/badge/Drizzle-ORM-C5F74F?style=flat-square&logo=drizzle) -![PostgreSQL](https://img.shields.io/badge/PostgreSQL-16-4169E1?style=flat-square&logo=postgresql) +![PostgreSQL](https://img.shields.io/badge/PostgreSQL-18-4169E1?style=flat-square&logo=postgresql) ## 🛠️ Tech Stack diff --git a/app/(app)/board/page.tsx b/app/(app)/board/page.tsx deleted file mode 100644 index 9d82a68..0000000 --- a/app/(app)/board/page.tsx +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Landing page - */ -export default function Home() { - return
Home
; -} diff --git a/app/(app)/dashboard/page.tsx b/app/(app)/dashboard/page.tsx new file mode 100644 index 0000000..647ab1e --- /dev/null +++ b/app/(app)/dashboard/page.tsx @@ -0,0 +1,6 @@ +/** + * Dashboard + */ +export default function Dashboard() { + return
Dashboard
; +} diff --git a/app/(app)/layout.tsx b/app/(app)/layout.tsx index 943281c..c1dc0ae 100644 --- a/app/(app)/layout.tsx +++ b/app/(app)/layout.tsx @@ -1,9 +1,23 @@ +/** + * @file layout.tsx + * @description Server component layout protecting authenticated routes, verifying user session status, and rendering the responsive application shell structure. + */ + import { auth } from "@/auth"; import { redirect } from "next/navigation"; import Sidebar from "@/app/components/layout/Sidebar"; import Header from "@/app/components/layout/Header"; import Navbar from "@/app/components/layout/Navbar"; +/** + * Renders the protected application layout wrapper. + * Checks for an active user session and redirects to the login page if unauthenticated. + * + * @async + * @param {Object} props - The component props. + * @param {React.ReactNode} props.children - The child components or pages to render within the layout. + * @returns {Promise} The rendered application layout structure. + */ export default async function AppLayout({ children, }: { diff --git a/app/(app)/summary/page.tsx b/app/(app)/summary/page.tsx new file mode 100644 index 0000000..b9d3ca9 --- /dev/null +++ b/app/(app)/summary/page.tsx @@ -0,0 +1,6 @@ +/** + * Summary + */ +export default function Summary() { + return
Summary
; +} diff --git a/app/(auth)/layout.tsx b/app/(auth)/layout.tsx index a1363e3..8ebda13 100644 --- a/app/(auth)/layout.tsx +++ b/app/(auth)/layout.tsx @@ -1,3 +1,17 @@ +/** + * @file AuthLayout.tsx + * @description Layout component wrapping authentication views with a centered container structure. + */ + +import React from "react"; + +/** + * Renders a centered layout wrapper optimized for authentication pages (login, registration, etc.). + * + * @param {Object} props - The component props. + * @param {React.ReactNode} props.children - The inner child components/pages to render inside the layout. + * @returns {JSX.Element} The rendered authentication layout component. + */ export default function AuthLayout({ children, }: { diff --git a/app/(auth)/login/page.tsx b/app/(auth)/login/page.tsx index 51cdcf7..633ec55 100644 --- a/app/(auth)/login/page.tsx +++ b/app/(auth)/login/page.tsx @@ -55,9 +55,8 @@ export default function LoginPage() { setError(defaultErrorMessage); } } else { - // Redirect user and refresh router cache on success - router.push("/"); - router.refresh(); + // Redirect user + router.push("/summary"); return; } } catch (err: any) { @@ -79,7 +78,7 @@ export default function LoginPage() { {/* Header Section */}

Flowstate Login

-

Sign in to continue.

+

Sign in to continue.

{/* Error Notification Banner */} @@ -95,7 +94,9 @@ export default function LoginPage() { {/* Credentials Form */}