From cdf1704499144194163cfca7fb19c9cf1e25a1ab Mon Sep 17 00:00:00 2001 From: Chneemann Date: Tue, 6 Oct 2026 08:40:27 +0200 Subject: [PATCH] feat(welcome): overhaul welcome page with responsive design and theme tokens --- app/page.tsx | 181 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 164 insertions(+), 17 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index c62a0fa..fb55326 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,49 +1,196 @@ /** * @file app/page.tsx - * @description Server component acting as the welcome landing page, redirecting authenticated users to the summary view or presenting sign-in and register options. + * @description Welcome landing page component with responsive hero section, features showcase, and authentication redirect check. */ import { auth } from "@/auth"; import { redirect } from "next/navigation"; import Link from "next/link"; import Footer from "@/app/components/layout/Footer"; +import { JSX } from "react/jsx-runtime"; /** - * Renders the welcome page containing branding elements, authentication status checks, - * and navigation links for signing in or registering. + * Properties for the FeatureCard component. + * + * @interface FeatureCardProps + * @property {React.ReactNode} icon - The icon element displayed inside the feature card. + * @property {string} title - The title of the feature. + * @property {string} description - A short explanatory description of the feature. + */ +interface FeatureCardProps { + icon: React.ReactNode; + title: string; + description: string; +} + +/** + * Renders an individual feature card highlighting a specific platform capability. + * + * @param {FeatureCardProps} props - The component props. + * @param {React.ReactNode} props.icon - The feature icon. + * @param {string} props.title - The feature title. + * @param {string} props.description - The feature description text. + * @returns {JSX.Element} The rendered feature card component. + */ +function FeatureCard({ icon, title, description }: FeatureCardProps) { + return ( +
+
+ {icon} +
+
+

+ {title} +

+

+ {description} +

+
+
+ ); +} + +/** + * Renders the fully responsive welcome landing page using custom Tailwind CSS variables. * * @async * @returns {Promise} The rendered welcome landing page component. */ -export default async function WelcomePage() { +export default async function WelcomePage(): Promise { const session = typeof auth === "function" ? await auth() : null; + if (session) { redirect("/summary"); } return ( -
-
-
-

Flowstate

-

Welcome Page

-
+
+ {/* Background Glow (Scaled down for mobile performance) */} + + + {/* Features Showcase */} +
+
+ + + + } + title="Hyper Velocity" + description="Eliminate switching friction with optimized workflows keeping you directly in the zone." + /> + + + + } + title="Clean Metrics" + description="Visualize focus states and process summaries clearly without visual clutter." + /> + + + + } + title="Full Security" + description="Encrypted data and robust authentication guards protecting your workspace session." + /> +
+
+ + + {/* Footer Container */}
);