diff --git a/apps/web/src/components/header.tsx b/apps/web/src/components/header.tsx
deleted file mode 100644
index 810fa00..0000000
--- a/apps/web/src/components/header.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import { Link } from "@tanstack/react-router";
-
-import UserMenu from "./user-menu";
-
-export default function Header() {
- const links = [
- { to: "/", label: "Home" },
- { to: "/dashboard", label: "Dashboard" },
- ] as const;
-
- return (
-
-
-
-
-
-
-
-
-
- );
-}
diff --git a/apps/web/src/components/homepage/EventRegistrationForm.tsx b/apps/web/src/components/homepage/EventRegistrationForm.tsx
new file mode 100644
index 0000000..c0c8eb7
--- /dev/null
+++ b/apps/web/src/components/homepage/EventRegistrationForm.tsx
@@ -0,0 +1,111 @@
+"use client";
+
+import { useState } from "react";
+
+export default function EventRegistrationForm() {
+ const [formData, setFormData] = useState({
+ name: "",
+ email: "",
+ phone: "",
+ company: "",
+ dietaryRequirements: "",
+ });
+
+ const handleSubmit = (e: React.FormEvent) => {
+ e.preventDefault();
+ console.log("Form submitted:", formData);
+ };
+
+ const handleChange = (
+ e: React.ChangeEvent,
+ ) => {
+ setFormData((prev) => ({
+ ...prev,
+ [e.target.name]: e.target.value,
+ }));
+ };
+
+ return (
+
+ Register for the Event
+
+
+
+ );
+}
diff --git a/apps/web/src/components/homepage/Footer.tsx b/apps/web/src/components/homepage/Footer.tsx
new file mode 100644
index 0000000..0852451
--- /dev/null
+++ b/apps/web/src/components/homepage/Footer.tsx
@@ -0,0 +1,15 @@
+export default function Footer() {
+ return (
+
+ );
+}
diff --git a/apps/web/src/components/homepage/Hero.tsx b/apps/web/src/components/homepage/Hero.tsx
new file mode 100644
index 0000000..a73048d
--- /dev/null
+++ b/apps/web/src/components/homepage/Hero.tsx
@@ -0,0 +1,22 @@
+export default function Hero() {
+ return (
+
+ Welcome to Our Event
+
+ Join us for an amazing experience. Register now to secure your spot.
+
+
+
+
+
+
+ );
+}
diff --git a/apps/web/src/components/homepage/Info.tsx b/apps/web/src/components/homepage/Info.tsx
new file mode 100644
index 0000000..2c91fbd
--- /dev/null
+++ b/apps/web/src/components/homepage/Info.tsx
@@ -0,0 +1,48 @@
+export default function Info() {
+ return (
+
+
+
+
Event Details
+
+ Date: TBD
+
+ Location: TBD
+
+ Duration: Full Day
+
+
+
+
+
What to Expect
+
+ Keynote speakers
+
+ Networking opportunities
+
+ Workshops & sessions
+
+
+
+
+
Who Should Attend
+
+ Industry professionals
+
+ Students & educators
+
+ Anyone interested
+
+
+
+
+ );
+}
diff --git a/apps/web/src/components/sign-in-form.tsx b/apps/web/src/components/sign-in-form.tsx
deleted file mode 100644
index e521606..0000000
--- a/apps/web/src/components/sign-in-form.tsx
+++ /dev/null
@@ -1,137 +0,0 @@
-import { useForm } from "@tanstack/react-form";
-import { useNavigate } from "@tanstack/react-router";
-import { toast } from "sonner";
-import z from "zod";
-
-import { authClient } from "@/lib/auth-client";
-
-import Loader from "./loader";
-import { Button } from "./ui/button";
-import { Input } from "./ui/input";
-import { Label } from "./ui/label";
-
-export default function SignInForm({ onSwitchToSignUp }: { onSwitchToSignUp: () => void }) {
- const navigate = useNavigate({
- from: "/",
- });
- const { isPending } = authClient.useSession();
-
- const form = useForm({
- defaultValues: {
- email: "",
- password: "",
- },
- onSubmit: async ({ value }) => {
- await authClient.signIn.email(
- {
- email: value.email,
- password: value.password,
- },
- {
- onSuccess: () => {
- navigate({
- to: "/dashboard",
- });
- toast.success("Sign in successful");
- },
- onError: (error) => {
- toast.error(error.error.message || error.error.statusText);
- },
- },
- );
- },
- validators: {
- onSubmit: z.object({
- email: z.email("Invalid email address"),
- password: z.string().min(8, "Password must be at least 8 characters"),
- }),
- },
- });
-
- if (isPending) {
- return ;
- }
-
- return (
-
-
Welcome Back
-
-
- {(state) => (
-
- )}
-
-
-
-
-
-
-
- );
-}
diff --git a/apps/web/src/components/sign-up-form.tsx b/apps/web/src/components/sign-up-form.tsx
deleted file mode 100644
index 60d8958..0000000
--- a/apps/web/src/components/sign-up-form.tsx
+++ /dev/null
@@ -1,162 +0,0 @@
-import { useForm } from "@tanstack/react-form";
-import { useNavigate } from "@tanstack/react-router";
-import { toast } from "sonner";
-import z from "zod";
-
-import { authClient } from "@/lib/auth-client";
-
-import Loader from "./loader";
-import { Button } from "./ui/button";
-import { Input } from "./ui/input";
-import { Label } from "./ui/label";
-
-export default function SignUpForm({ onSwitchToSignIn }: { onSwitchToSignIn: () => void }) {
- const navigate = useNavigate({
- from: "/",
- });
- const { isPending } = authClient.useSession();
-
- const form = useForm({
- defaultValues: {
- email: "",
- password: "",
- name: "",
- },
- onSubmit: async ({ value }) => {
- await authClient.signUp.email(
- {
- email: value.email,
- password: value.password,
- name: value.name,
- },
- {
- onSuccess: () => {
- navigate({
- to: "/dashboard",
- });
- toast.success("Sign up successful");
- },
- onError: (error) => {
- toast.error(error.error.message || error.error.statusText);
- },
- },
- );
- },
- validators: {
- onSubmit: z.object({
- name: z.string().min(2, "Name must be at least 2 characters"),
- email: z.email("Invalid email address"),
- password: z.string().min(8, "Password must be at least 8 characters"),
- }),
- },
- });
-
- if (isPending) {
- return ;
- }
-
- return (
-
-
Create Account
-
-
- {(state) => (
-
- )}
-
-
-
-
-
-
-
- );
-}
diff --git a/apps/web/src/components/user-menu.tsx b/apps/web/src/components/user-menu.tsx
deleted file mode 100644
index ad186e8..0000000
--- a/apps/web/src/components/user-menu.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import { Link, useNavigate } from "@tanstack/react-router";
-
-import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuGroup,
- DropdownMenuItem,
- DropdownMenuLabel,
- DropdownMenuSeparator,
- DropdownMenuTrigger,
-} from "@/components/ui/dropdown-menu";
-import { authClient } from "@/lib/auth-client";
-
-import { Button } from "./ui/button";
-import { Skeleton } from "./ui/skeleton";
-
-export default function UserMenu() {
- const navigate = useNavigate();
- const { data: session, isPending } = authClient.useSession();
-
- if (isPending) {
- return ;
- }
-
- if (!session) {
- return (
-
-
-
- );
- }
-
- return (
-
- }>
- {session.user.name}
-
-
-
- My Account
-
- {session.user.email}
- {
- authClient.signOut({
- fetchOptions: {
- onSuccess: () => {
- navigate({
- to: "/",
- });
- },
- },
- });
- }}
- >
- Sign Out
-
-
-
-
- );
-}
diff --git a/apps/web/src/index.css b/apps/web/src/index.css
index 2ba48ff..f1d8c73 100644
--- a/apps/web/src/index.css
+++ b/apps/web/src/index.css
@@ -1,128 +1 @@
@import "tailwindcss";
-@import "tw-animate-css";
-@import "shadcn/tailwind.css";
-
-@custom-variant dark (&:is(.dark *));
-
-:root {
- --background: oklch(1 0 0);
- --foreground: oklch(0.145 0 0);
- --card: oklch(1 0 0);
- --card-foreground: oklch(0.145 0 0);
- --popover: oklch(1 0 0);
- --popover-foreground: oklch(0.145 0 0);
- --primary: oklch(0.205 0 0);
- --primary-foreground: oklch(0.985 0 0);
- --secondary: oklch(0.97 0 0);
- --secondary-foreground: oklch(0.205 0 0);
- --muted: oklch(0.97 0 0);
- --muted-foreground: oklch(0.556 0 0);
- --accent: oklch(0.97 0 0);
- --accent-foreground: oklch(0.205 0 0);
- --destructive: oklch(0.58 0.22 27);
- --border: oklch(0.922 0 0);
- --input: oklch(0.922 0 0);
- --ring: oklch(0.708 0 0);
- --chart-1: oklch(0.809 0.105 251.813);
- --chart-2: oklch(0.623 0.214 259.815);
- --chart-3: oklch(0.546 0.245 262.881);
- --chart-4: oklch(0.488 0.243 264.376);
- --chart-5: oklch(0.424 0.199 265.638);
- --radius: 0.625rem;
- --sidebar: oklch(0.985 0 0);
- --sidebar-foreground: oklch(0.145 0 0);
- --sidebar-primary: oklch(0.205 0 0);
- --sidebar-primary-foreground: oklch(0.985 0 0);
- --sidebar-accent: oklch(0.97 0 0);
- --sidebar-accent-foreground: oklch(0.205 0 0);
- --sidebar-border: oklch(0.922 0 0);
- --sidebar-ring: oklch(0.708 0 0);
-}
-
-.dark {
- --background: oklch(0.145 0 0);
- --foreground: oklch(0.985 0 0);
- --card: oklch(0.205 0 0);
- --card-foreground: oklch(0.985 0 0);
- --popover: oklch(0.205 0 0);
- --popover-foreground: oklch(0.985 0 0);
- --primary: oklch(0.87 0 0);
- --primary-foreground: oklch(0.205 0 0);
- --secondary: oklch(0.269 0 0);
- --secondary-foreground: oklch(0.985 0 0);
- --muted: oklch(0.269 0 0);
- --muted-foreground: oklch(0.708 0 0);
- --accent: oklch(0.371 0 0);
- --accent-foreground: oklch(0.985 0 0);
- --destructive: oklch(0.704 0.191 22.216);
- --border: oklch(1 0 0 / 10%);
- --input: oklch(1 0 0 / 15%);
- --ring: oklch(0.556 0 0);
- --chart-1: oklch(0.809 0.105 251.813);
- --chart-2: oklch(0.623 0.214 259.815);
- --chart-3: oklch(0.546 0.245 262.881);
- --chart-4: oklch(0.488 0.243 264.376);
- --chart-5: oklch(0.424 0.199 265.638);
- --sidebar: oklch(0.205 0 0);
- --sidebar-foreground: oklch(0.985 0 0);
- --sidebar-primary: oklch(0.488 0.243 264.376);
- --sidebar-primary-foreground: oklch(0.985 0 0);
- --sidebar-accent: oklch(0.269 0 0);
- --sidebar-accent-foreground: oklch(0.985 0 0);
- --sidebar-border: oklch(1 0 0 / 10%);
- --sidebar-ring: oklch(0.556 0 0);
-}
-
-@theme inline {
- --font-sans: "Inter Variable", sans-serif;
- --color-sidebar-ring: var(--sidebar-ring);
- --color-sidebar-border: var(--sidebar-border);
- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
- --color-sidebar-accent: var(--sidebar-accent);
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
- --color-sidebar-primary: var(--sidebar-primary);
- --color-sidebar-foreground: var(--sidebar-foreground);
- --color-sidebar: var(--sidebar);
- --color-chart-5: var(--chart-5);
- --color-chart-4: var(--chart-4);
- --color-chart-3: var(--chart-3);
- --color-chart-2: var(--chart-2);
- --color-chart-1: var(--chart-1);
- --color-ring: var(--ring);
- --color-input: var(--input);
- --color-border: var(--border);
- --color-destructive: var(--destructive);
- --color-accent-foreground: var(--accent-foreground);
- --color-accent: var(--accent);
- --color-muted-foreground: var(--muted-foreground);
- --color-muted: var(--muted);
- --color-secondary-foreground: var(--secondary-foreground);
- --color-secondary: var(--secondary);
- --color-primary-foreground: var(--primary-foreground);
- --color-primary: var(--primary);
- --color-popover-foreground: var(--popover-foreground);
- --color-popover: var(--popover);
- --color-card-foreground: var(--card-foreground);
- --color-card: var(--card);
- --color-foreground: var(--foreground);
- --color-background: var(--background);
- --radius-sm: calc(var(--radius) - 4px);
- --radius-md: calc(var(--radius) - 2px);
- --radius-lg: var(--radius);
- --radius-xl: calc(var(--radius) + 4px);
- --radius-2xl: calc(var(--radius) + 8px);
- --radius-3xl: calc(var(--radius) + 12px);
- --radius-4xl: calc(var(--radius) + 16px);
-}
-
-@layer base {
- * {
- @apply border-border outline-ring/50;
- }
- body {
- @apply font-sans bg-background text-foreground;
- }
- html {
- @apply font-sans;
- }
-}
diff --git a/apps/web/src/routeTree.gen.ts b/apps/web/src/routeTree.gen.ts
index 2cf4025..96ff85c 100644
--- a/apps/web/src/routeTree.gen.ts
+++ b/apps/web/src/routeTree.gen.ts
@@ -9,22 +9,10 @@
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
import { Route as rootRouteImport } from './routes/__root'
-import { Route as LoginRouteImport } from './routes/login'
-import { Route as DashboardRouteImport } from './routes/dashboard'
import { Route as IndexRouteImport } from './routes/index'
import { Route as ApiRpcSplatRouteImport } from './routes/api/rpc/$'
import { Route as ApiAuthSplatRouteImport } from './routes/api/auth/$'
-const LoginRoute = LoginRouteImport.update({
- id: '/login',
- path: '/login',
- getParentRoute: () => rootRouteImport,
-} as any)
-const DashboardRoute = DashboardRouteImport.update({
- id: '/dashboard',
- path: '/dashboard',
- getParentRoute: () => rootRouteImport,
-} as any)
const IndexRoute = IndexRouteImport.update({
id: '/',
path: '/',
@@ -43,58 +31,36 @@ const ApiAuthSplatRoute = ApiAuthSplatRouteImport.update({
export interface FileRoutesByFullPath {
'/': typeof IndexRoute
- '/dashboard': typeof DashboardRoute
- '/login': typeof LoginRoute
'/api/auth/$': typeof ApiAuthSplatRoute
'/api/rpc/$': typeof ApiRpcSplatRoute
}
export interface FileRoutesByTo {
'/': typeof IndexRoute
- '/dashboard': typeof DashboardRoute
- '/login': typeof LoginRoute
'/api/auth/$': typeof ApiAuthSplatRoute
'/api/rpc/$': typeof ApiRpcSplatRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
'/': typeof IndexRoute
- '/dashboard': typeof DashboardRoute
- '/login': typeof LoginRoute
'/api/auth/$': typeof ApiAuthSplatRoute
'/api/rpc/$': typeof ApiRpcSplatRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
- fullPaths: '/' | '/dashboard' | '/login' | '/api/auth/$' | '/api/rpc/$'
+ fullPaths: '/' | '/api/auth/$' | '/api/rpc/$'
fileRoutesByTo: FileRoutesByTo
- to: '/' | '/dashboard' | '/login' | '/api/auth/$' | '/api/rpc/$'
- id: '__root__' | '/' | '/dashboard' | '/login' | '/api/auth/$' | '/api/rpc/$'
+ to: '/' | '/api/auth/$' | '/api/rpc/$'
+ id: '__root__' | '/' | '/api/auth/$' | '/api/rpc/$'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
IndexRoute: typeof IndexRoute
- DashboardRoute: typeof DashboardRoute
- LoginRoute: typeof LoginRoute
ApiAuthSplatRoute: typeof ApiAuthSplatRoute
ApiRpcSplatRoute: typeof ApiRpcSplatRoute
}
declare module '@tanstack/react-router' {
interface FileRoutesByPath {
- '/login': {
- id: '/login'
- path: '/login'
- fullPath: '/login'
- preLoaderRoute: typeof LoginRouteImport
- parentRoute: typeof rootRouteImport
- }
- '/dashboard': {
- id: '/dashboard'
- path: '/dashboard'
- fullPath: '/dashboard'
- preLoaderRoute: typeof DashboardRouteImport
- parentRoute: typeof rootRouteImport
- }
'/': {
id: '/'
path: '/'
@@ -121,8 +87,6 @@ declare module '@tanstack/react-router' {
const rootRouteChildren: RootRouteChildren = {
IndexRoute: IndexRoute,
- DashboardRoute: DashboardRoute,
- LoginRoute: LoginRoute,
ApiAuthSplatRoute: ApiAuthSplatRoute,
ApiRpcSplatRoute: ApiRpcSplatRoute,
}
diff --git a/apps/web/src/routes/__root.tsx b/apps/web/src/routes/__root.tsx
index 91e676f..80fe9c3 100644
--- a/apps/web/src/routes/__root.tsx
+++ b/apps/web/src/routes/__root.tsx
@@ -1,61 +1,60 @@
import type { QueryClient } from "@tanstack/react-query";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
-import { HeadContent, Outlet, Scripts, createRootRouteWithContext } from "@tanstack/react-router";
+import {
+ createRootRouteWithContext,
+ HeadContent,
+ Outlet,
+ Scripts,
+} from "@tanstack/react-router";
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools";
-
+import { Toaster } from "@/components/ui/sonner";
import type { orpc } from "@/utils/orpc";
-import { Toaster } from "@/components/ui/sonner";
-
-import Header from "../components/header";
import appCss from "../index.css?url";
export interface RouterAppContext {
- orpc: typeof orpc;
- queryClient: QueryClient;
+ orpc: typeof orpc;
+ queryClient: QueryClient;
}
export const Route = createRootRouteWithContext()({
- head: () => ({
- meta: [
- {
- charSet: "utf-8",
- },
- {
- name: "viewport",
- content: "width=device-width, initial-scale=1",
- },
- {
- title: "My App",
- },
- ],
- links: [
- {
- rel: "stylesheet",
- href: appCss,
- },
- ],
- }),
+ head: () => ({
+ meta: [
+ {
+ charSet: "utf-8",
+ },
+ {
+ name: "viewport",
+ content: "width=device-width, initial-scale=1",
+ },
+ {
+ title: "My App",
+ },
+ ],
+ links: [
+ {
+ rel: "stylesheet",
+ href: appCss,
+ },
+ ],
+ }),
- component: RootDocument,
+ component: RootDocument,
});
function RootDocument() {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+ );
}
diff --git a/apps/web/src/routes/dashboard.tsx b/apps/web/src/routes/dashboard.tsx
deleted file mode 100644
index 3b20370..0000000
--- a/apps/web/src/routes/dashboard.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { useQuery } from "@tanstack/react-query";
-import { createFileRoute, redirect } from "@tanstack/react-router";
-
-import { getUser } from "@/functions/get-user";
-import { orpc } from "@/utils/orpc";
-
-export const Route = createFileRoute("/dashboard")({
- component: RouteComponent,
- beforeLoad: async () => {
- const session = await getUser();
- return { session };
- },
- loader: async ({ context }) => {
- if (!context.session) {
- throw redirect({
- to: "/login",
- });
- }
- },
-});
-
-function RouteComponent() {
- const { session } = Route.useRouteContext();
-
- const privateData = useQuery(orpc.privateData.queryOptions());
-
- return (
-
-
Dashboard
-
Welcome {session?.user.name}
-
API: {privateData.data?.message}
-
- );
-}
diff --git a/apps/web/src/routes/index.tsx b/apps/web/src/routes/index.tsx
index ad07474..e739619 100644
--- a/apps/web/src/routes/index.tsx
+++ b/apps/web/src/routes/index.tsx
@@ -1,51 +1,21 @@
-import { useQuery } from "@tanstack/react-query";
import { createFileRoute } from "@tanstack/react-router";
-import { orpc } from "@/utils/orpc";
+import EventRegistrationForm from "@/components/homepage/EventRegistrationForm";
+import Footer from "@/components/homepage/Footer";
+import Hero from "@/components/homepage/Hero";
+import Info from "@/components/homepage/Info";
export const Route = createFileRoute("/")({
- component: HomeComponent,
+ component: HomePage,
});
-const TITLE_TEXT = `
- ██████╗ ███████╗████████╗████████╗███████╗██████╗
- ██╔══██╗██╔════╝╚══██╔══╝╚══██╔══╝██╔════╝██╔══██╗
- ██████╔╝█████╗ ██║ ██║ █████╗ ██████╔╝
- ██╔══██╗██╔══╝ ██║ ██║ ██╔══╝ ██╔══██╗
- ██████╔╝███████╗ ██║ ██║ ███████╗██║ ██║
- ╚═════╝ ╚══════╝ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝
-
- ████████╗ ███████╗████████╗ █████╗ ██████╗██╗ ██╗
- ╚══██╔══╝ ██╔════╝╚══██╔══╝██╔══██╗██╔════╝██║ ██╔╝
- ██║ ███████╗ ██║ ███████║██║ █████╔╝
- ██║ ╚════██║ ██║ ██╔══██║██║ ██╔═██╗
- ██║ ███████║ ██║ ██║ ██║╚██████╗██║ ██╗
- ╚═╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝
- `;
-
-function HomeComponent() {
- const healthCheck = useQuery(orpc.healthCheck.queryOptions());
-
- return (
-
-
{TITLE_TEXT}
-
-
- API Status
-
-
-
- {healthCheck.isLoading
- ? "Checking..."
- : healthCheck.data
- ? "Connected"
- : "Disconnected"}
-
-
-
-
-
- );
+function HomePage() {
+ return (
+
+
+
+
+
+
+ );
}
diff --git a/apps/web/src/routes/login.tsx b/apps/web/src/routes/login.tsx
deleted file mode 100644
index 5abb99c..0000000
--- a/apps/web/src/routes/login.tsx
+++ /dev/null
@@ -1,19 +0,0 @@
-import { createFileRoute } from "@tanstack/react-router";
-import { useState } from "react";
-
-import SignInForm from "@/components/sign-in-form";
-import SignUpForm from "@/components/sign-up-form";
-
-export const Route = createFileRoute("/login")({
- component: RouteComponent,
-});
-
-function RouteComponent() {
- const [showSignIn, setShowSignIn] = useState(false);
-
- return showSignIn ? (
- setShowSignIn(false)} />
- ) : (
- setShowSignIn(true)} />
- );
-}