Index: pages/+Head.tsx
===================================================================
--- pages/+Head.tsx	(revision 6196d609d200de0e04c2c142c0150d778cb11ec6)
+++ 	(revision )
@@ -1,7 +1,0 @@
-// https://vike.dev/Head
-
-import logoUrl from "../assets/logo.svg";
-
-export function Head() {
-  return <link rel="icon" href={logoUrl} />;
-}
Index: pages/+Layout.telefunc.ts
===================================================================
--- pages/+Layout.telefunc.ts	(revision 6196d609d200de0e04c2c142c0150d778cb11ec6)
+++ pages/+Layout.telefunc.ts	(revision 40ac7a920a0b08c324bf4201b03a36483cc3aad4)
@@ -50,13 +50,4 @@
 
     return approvedBuilds;
-}
-
-export async function onGetHighestRankedBuilds({ limit }
-                                                  : { limit?: number }) {
-    const context = ctx();
-
-    const highestRankedBuilds = await drizzleQueries.getHighestRankedBuilds(context.db, limit);
-
-    return highestRankedBuilds;
 }
 
Index: pages/+Layout.tsx
===================================================================
--- pages/+Layout.tsx	(revision 6196d609d200de0e04c2c142c0150d778cb11ec6)
+++ pages/+Layout.tsx	(revision 40ac7a920a0b08c324bf4201b03a36483cc3aad4)
@@ -1,74 +1,37 @@
-import "./Layout.css";
+import React from 'react';
+import Navbar from '../components/Navbar';
+import Footer from '../components/Footer';
+import Box from '@mui/material/Box';
+import { ThemeProvider, createTheme } from '@mui/material/styles';
+import CssBaseline from '@mui/material/CssBaseline';
 
-import logoUrl from "../assets/logo.svg";
-import { Link } from "../components/Link";
+const theme = createTheme({
+    palette: {
+        mode: 'dark',
+        primary: { main: '#ff8201' },
+        background: { default: '#121212', paper: '#1e1e1e' },
+    },
+});
 
 export default function Layout({ children }: { children: React.ReactNode }) {
-  return (
-    <div
-      style={{
-        display: "flex",
-        maxWidth: 900,
-        margin: "auto",
-      }}
-    >
-      <Sidebar>
-        <Logo />
-        <Link href="/">Welcome</Link>
-        <Link href="/todo">Todo</Link>
-        <Link href="/star-wars">Data Fetching</Link>
-      </Sidebar>
-      <Content>{children}</Content>
-    </div>
-  );
+    return (
+        <ThemeProvider theme={theme}>
+            <CssBaseline />
+            <Box
+                sx={{
+                    display: 'flex',
+                    flexDirection: 'column',
+                    minHeight: '100vh',
+                    bgcolor: 'background.default',
+                    color: 'text.primary',
+                }}
+            >
+                <Navbar />
+                <Box component="main" sx={{ flexGrow: 1, py: 3 }}>
+                    {children}
+                </Box>
+                <Footer />
+            </Box>
+        </ThemeProvider>
+    );
 }
-
-function Sidebar({ children }: { children: React.ReactNode }) {
-  return (
-    <div
-      id="sidebar"
-      style={{
-        padding: 20,
-        flexShrink: 0,
-        display: "flex",
-        flexDirection: "column",
-        lineHeight: "1.8em",
-        borderRight: "2px solid #eee",
-      }}
-    >
-      {children}
-    </div>
-  );
-}
-
-function Content({ children }: { children: React.ReactNode }) {
-  return (
-    <div id="page-container">
-      <div
-        id="page-content"
-        style={{
-          padding: 20,
-          paddingBottom: 50,
-          minHeight: "100vh",
-        }}
-      >
-        {children}
-      </div>
-    </div>
-  );
-}
-
-function Logo() {
-  return (
-    <div
-      style={{
-        marginTop: 20,
-        marginBottom: 10,
-      }}
-    >
-      <a href="/">
-        <img src={logoUrl} height={64} width={64} alt="logo" />
-      </a>
-    </div>
-  );
-}
Index: pages/+config.ts
===================================================================
--- pages/+config.ts	(revision 6196d609d200de0e04c2c142c0150d778cb11ec6)
+++ pages/+config.ts	(revision 40ac7a920a0b08c324bf4201b03a36483cc3aad4)
@@ -1,3 +1,3 @@
-import type { Config } from "vike/types";
+import type {Config} from "vike/types";
 import vikePhoton from "vike-photon/config";
 import vikeReact from "vike-react/config";
@@ -7,14 +7,13 @@
 
 export default {
-  // https://vike.dev/head-tags
-  title: "My Vike App",
-  description: "Demo showcasing Vike",
+    // https://vike.dev/head-tags
+    title: "PC Forge",
+    description: "PC Forge Site",
+    passToClient: ["user"],
+    extends: [vikeReact, vikePhoton],
 
-  passToClient: ["user"],
-  extends: [vikeReact, vikePhoton],
-
-  // https://vike.dev/vike-photon
-  photon: {
-    server: "../server/entry.ts",
-  },
+    // https://vike.dev/vike-photon
+    photon: {
+        server: "../server/entry.ts",
+    },
 } satisfies Config;
Index: pages/Head.tsx
===================================================================
--- pages/Head.tsx	(revision 40ac7a920a0b08c324bf4201b03a36483cc3aad4)
+++ pages/Head.tsx	(revision 40ac7a920a0b08c324bf4201b03a36483cc3aad4)
@@ -0,0 +1,7 @@
+// https://vike.dev/Head
+
+import logoUrl from "../assets/logo.svg";
+
+export function Head() {
+  return <link rel="icon" href={logoUrl} />;
+}
Index: pages/Layout.css
===================================================================
--- pages/Layout.css	(revision 6196d609d200de0e04c2c142c0150d778cb11ec6)
+++ pages/Layout.css	(revision 40ac7a920a0b08c324bf4201b03a36483cc3aad4)
@@ -1,29 +1,132 @@
-/* Links */
-a {
-  text-decoration: none;
-}
-#sidebar a {
-  padding: 2px 10px;
-  margin-left: -10px;
-}
-#sidebar a.is-active {
-  background-color: #eee;
+html, body {
+    margin: 0;
+    padding: 0;
+    overflow-x: hidden;
+
 }
 
-/* Reset */
 body {
-  margin: 0;
-  font-family: sans-serif;
-}
-* {
-  box-sizing: border-box;
+    background: #262636;
 }
 
-/* Page Transition Animation */
+#app-shell {
+    min-height: 100vh;
+    display: flex;
+    flex-direction: column;
+}
+
 #page-content {
-  opacity: 1;
-  transition: opacity 0.3s ease-in-out;
+    flex: 1;
+    padding: 32px 20px;
+    max-width: 1000px;
+    width: 100%;
+    margin: 0 auto;
 }
-body.page-transition #page-content {
-  opacity: 0;
+
+.navbar {
+    background: black;
+    color: white;
 }
+
+.navbar__logo{
+    height: 32px;
+    width: auto;
+    margin-right: 5px;
+}
+
+.navbar a {
+    color: white;
+    text-decoration: none;
+}
+
+.navbar__inner {
+    width: 100%;
+    margin: 0 auto;
+    padding: 5px 15px;
+    display: flex;
+    flex-direction: column;
+    gap: 10px;
+}
+
+.navbar__top {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    gap: 15px;
+    min-width: 0;
+}
+
+.navbar__bottom {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    gap: 16px;
+    min-width: 0;
+}
+
+.navbar__brand {
+    font-size: 25px;
+    font-weight: 700;
+}
+
+.navbar__auth {
+    display: flex;
+    align-items: center;
+    gap: 10px;
+    font-size: 18px;
+    opacity: 0.95;
+    margin-right: 30px;
+}
+
+.navbar__sep {
+    opacity: 0.5;
+}
+
+.navbar__links {
+    display: flex;
+    flex-wrap: wrap;
+    gap: 20px;
+    font-size: 18px;
+}
+
+.navbar__links a {
+    padding: 6px 8px;
+    border-radius: 8px;
+}
+
+.navbar__links a:hover,
+.navbar__auth a:hover {
+    background: rgba(255, 255, 255, 0.18);
+    color: #ff8201;
+}
+
+.navbar__search input {
+    width: 220px;
+    max-width: 45vw;
+    padding: 8px 10px;
+    border-radius: 10px;
+    border: 1px solid rgba(255, 255, 255, 0.15);
+    background: rgba(255, 255, 255, 0.06);
+    color: #eaeaea;
+    outline: none;
+    margin-right: 30px;
+    min-width: 0;
+
+}
+
+.navbar__search input::placeholder {
+    color: rgba(234, 234, 234, 0.6);
+}
+
+.footer {
+    border-top: 1px solid rgba(255, 255, 255, 0.08);
+    background: black;
+    color: gray;
+}
+
+.footer__inner {
+    width: 100%;
+    margin: 0 auto;
+    padding: 18px 20px;
+    font-size: 14px;
+}
Index: pages/auth/login/+Page.tsx
===================================================================
--- pages/auth/login/+Page.tsx	(revision 40ac7a920a0b08c324bf4201b03a36483cc3aad4)
+++ pages/auth/login/+Page.tsx	(revision 40ac7a920a0b08c324bf4201b03a36483cc3aad4)
@@ -0,0 +1,88 @@
+import React, { useState } from "react";
+import { Container, Box, Typography, TextField, Button, Paper, Alert } from "@mui/material";
+
+export default function LoginPage() {
+    const [error, setError] = useState<string | null>(null);
+
+    const handleSubmit = async (event: React.FormEvent<HTMLFormElement>) => {
+        event.preventDefault();
+        setError(null);
+
+        const formData = new FormData(event.currentTarget);
+        const username = formData.get("username");
+        const password = formData.get("password");
+
+        const res = await fetch("/api/auth/callback/credentials", {
+            method: "POST",
+            headers: { "Content-Type": "application/json" },
+            body: JSON.stringify({
+                username,
+                password,
+                csrfToken: await getCsrfToken(),
+            }),
+        });
+
+        if (res.url.includes("error")) {
+            setError("Invalid username or password");
+        } else {
+            window.location.href = "/dashboard/user";
+        }
+    };
+
+    return (
+        <Container component="main" maxWidth="xs">
+            <Box sx={{ marginTop: 8, display: "flex", flexDirection: "column", alignItems: "center" }}>
+                <Paper elevation={3} sx={{ p: 4, width: '100%', display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
+
+                    <Typography component="h1" variant="h5">
+                        Log in
+                    </Typography>
+
+                    {error && (
+                        <Alert severity="error" sx={{ mt: 2, width: '100%' }}>
+                            {error}
+                        </Alert>
+                    )}
+
+                    <Box component="form" onSubmit={handleSubmit} sx={{ mt: 1, width: '100%' }}>
+                        <TextField
+                            margin="normal"
+                            required
+                            fullWidth
+                            id="username"
+                            label="Username"
+                            name="username"
+                            autoComplete="username"
+                            autoFocus
+                        />
+                        <TextField
+                            margin="normal"
+                            required
+                            fullWidth
+                            name="password"
+                            label="Password"
+                            type="password"
+                            id="password"
+                            autoComplete="current-password"
+                        />
+
+                        <Button
+                            type="submit"
+                            fullWidth
+                            variant="contained"
+                            sx={{ mt: 3, mb: 2 }}
+                        >
+                            Sign In
+                        </Button>
+                    </Box>
+                </Paper>
+            </Box>
+        </Container>
+    );
+}
+
+async function getCsrfToken() {
+    const res = await fetch("/api/auth/csrf");
+    const data = await res.json();
+    return data.csrfToken;
+}
Index: pages/auth/register/+Page.tsx
===================================================================
--- pages/auth/register/+Page.tsx	(revision 40ac7a920a0b08c324bf4201b03a36483cc3aad4)
+++ pages/auth/register/+Page.tsx	(revision 40ac7a920a0b08c324bf4201b03a36483cc3aad4)
@@ -0,0 +1,88 @@
+import React, {useState} from "react";
+import {Container, Box, Typography, TextField, Button, Paper, Alert, AlertColor} from "@mui/material";
+import {registerNewUser} from "./register.telefunc";
+
+export default function RegisterPage() {
+    const [username, setUsername] = useState("");
+    const [email, setEmail] = useState("");
+    const [password, setPassword] = useState("");
+    const [loading, setLoading] = useState(false);
+    const [message, setMessage] = useState<string | null>(null);
+    const [severity, setSeverity] = useState<AlertColor>("info");
+
+    async function onSubmit(e: React.FormEvent) {
+        e.preventDefault();
+        setLoading(true);
+        setMessage(null);
+
+        try {
+            const result = await registerNewUser({username, email, password});
+            if (result?.success) {
+                setSeverity("success");
+                setMessage("Registration successful! Redirecting...");
+                window.location.href = "/auth/login";
+            } else {
+                setSeverity("error");
+                setMessage("Registration failed.");
+            }
+        } catch (err) {
+            setSeverity("error");
+            setMessage("An error occurred. Please try again.");
+        } finally {
+            setLoading(false);
+        }
+    }
+
+    return (
+        <Container component="main" maxWidth="xs">
+            <Box sx={{marginTop: 8, display: "flex", flexDirection: "column", alignItems: "center", color: "white"}}>
+                <Paper elevation={3} sx={{p: 4, width: '100%'}}>
+                    <Typography component="h1" variant="h5" align="center">
+                        Register
+                    </Typography>
+
+                    <Box component="form" onSubmit={onSubmit} sx={{mt: 3}}>
+                        <TextField
+                            margin="normal"
+                            required
+                            fullWidth
+                            label="Username"
+                            value={username}
+                            onChange={(e) => setUsername(e.target.value)}
+                        />
+                        <TextField
+                            margin="normal"
+                            required
+                            fullWidth
+                            label="Email Address"
+                            type="email"
+                            value={email}
+                            onChange={(e) => setEmail(e.target.value)}
+                        />
+                        <TextField
+                            margin="normal"
+                            required
+                            fullWidth
+                            label="Password"
+                            type="password"
+                            value={password}
+                            onChange={(e) => setPassword(e.target.value)}
+                        />
+
+                        <Button
+                            type="submit"
+                            fullWidth
+                            variant="contained"
+                            disabled={loading}
+                            sx={{mt: 3, mb: 2, color: "white"}}
+                        >
+                            {loading ? "Registering..." : "Register"}
+                        </Button>
+
+                        {message && <Alert severity={severity}>{message}</Alert>}
+                    </Box>
+                </Paper>
+            </Box>
+        </Container>
+    );
+}
Index: pages/dashboard/user/+Page.tsx
===================================================================
--- pages/dashboard/user/+Page.tsx	(revision 40ac7a920a0b08c324bf4201b03a36483cc3aad4)
+++ pages/dashboard/user/+Page.tsx	(revision 40ac7a920a0b08c324bf4201b03a36483cc3aad4)
@@ -0,0 +1,225 @@
+import React, {useEffect, useState} from 'react';
+import {
+    Container,
+    Paper,
+    Typography,
+    Box,
+    Avatar,
+    Divider,
+    Button,
+    CircularProgress,
+    Card,
+    CardContent,
+    CardActionArea,
+    IconButton
+} from '@mui/material';
+import Grid from '@mui/material/Grid';
+import {Dialog, DialogTitle, DialogContent, DialogActions} from '@mui/material';
+import CloseIcon from '@mui/icons-material/Close';
+
+import PersonIcon from '@mui/icons-material/Person';
+import ComputerIcon from '@mui/icons-material/Computer';
+import FavoriteIcon from '@mui/icons-material/Favorite';
+import DeleteIcon from '@mui/icons-material/Delete';
+import EditIcon from '@mui/icons-material/Edit';
+
+import {getUserInfoAndData, onDeleteBuild} from "./userDashboard.telefunc";
+
+type DashboardData = {
+    user: { username: string; email?: string; [key: string]: any };
+    userBuilds: any[];
+    favoriteBuilds: any[];
+};
+
+export default function UserDashboard() {
+    const [data, setData] = useState<DashboardData | null>(null);
+    const [loading, setLoading] = useState(true);
+    const [error, setError] = useState<string | null>(null);
+    const [openMyBuildsDialog, setOpenMyBuildsDialog] = useState(false);
+
+    const loadData = () => {
+        getUserInfoAndData()
+            .then((result) => {
+                setData(result);
+                setLoading(false);
+            })
+            .catch((err) => {
+                console.error(err);
+                setError("Failed to load dashboard. Please log in.");
+                setLoading(false);
+            });
+    };
+
+    useEffect(() => {
+        loadData();
+    }, []);
+
+    const handleDelete = async (buildId: number) => {
+        if (!confirm("Are you sure you want to delete this build?")) return;
+        try {
+            await onDeleteBuild({buildId});
+            loadData();
+        } catch (e) {
+            alert("Failed to delete build");
+        }
+    };
+
+    if (loading) return <Box sx={{display: 'flex', justifyContent: 'center', mt: 10}}><CircularProgress/></Box>;
+    if (error || !data) return <Container sx={{mt: 5, textAlign: 'center'}}><Typography color="error"
+                                                                                        variant="h6">{error}</Typography><Button
+        href="/auth/login" variant="contained">Login</Button></Container>;
+
+
+    // @ts-ignore
+    return (
+        <Container maxWidth="xl" sx={{mt: 4, mb: 4, color: 'white'}}>
+            <Grid container spacing={3}>
+
+                <Grid item xs={12} md={3}>
+                    <Paper elevation={3}
+                           sx={{p: 3, display: 'flex', flexDirection: 'column', alignItems: 'center', height: '100%'}}>
+                        <Avatar sx={{width: 100, height: 100, mb: 2, bgcolor: 'primary.main'}}><PersonIcon
+                            sx={{fontSize: 60}}/></Avatar>
+                        <Typography variant="h5" fontWeight="bold" gutterBottom>{data.user.username}</Typography>
+                        <Typography variant="body2" color="text.secondary" gutterBottom>{data.user.email}</Typography>
+                        <Divider sx={{width: '100%', my: 2}}/>
+                        {/*<Button variant="outlined" fullWidth color="primary" sx={{mb: 1}}>Edit Profile</Button>*/}
+                    </Paper>
+                </Grid>
+
+                <Grid item xs={12} md={9}>
+                    <Grid container spacing={3} direction="column">
+
+                        <Grid item xs={12}>
+                            <Paper elevation={3} sx={{p: 3, minHeight: '300px', bgcolor: '#1e1e1e'}}>
+                                <Box sx={{display: 'flex', alignItems: 'center', mb: 2}}>
+                                    <FavoriteIcon color="error" sx={{mr: 1}}/>
+                                    <Typography variant="h6" fontWeight="bold">Favorited Builds</Typography>
+                                </Box>
+                                <Divider sx={{mb: 2}}/>
+
+                                {data.favoriteBuilds.length === 0 ? (
+                                    <Typography color="text.secondary" align="center" sx={{mt: 4}}>You haven't favorited
+                                        any builds yet.</Typography>
+                                ) : (
+                                    <Grid container spacing={2}>
+                                        {data.favoriteBuilds.map((build: any) => (
+                                            <Grid item xs={12} sm={6} md={4} key={build.id}>
+                                                <BuildCard build={build}/>
+                                            </Grid>
+                                        ))}
+                                    </Grid>
+                                )}
+                            </Paper>
+                        </Grid>
+
+                        <Grid item xs={12}>
+                            <Paper elevation={3} sx={{p: 3, minHeight: '300px', bgcolor: '#1e1e1e'}}>
+
+                                <Box sx={{
+                                    display: 'flex',
+                                    alignItems: 'center',
+                                    justifyContent: 'space-between',
+                                    mb: 2
+                                }}>
+                                    <Box sx={{display: 'flex', alignItems: 'center'}}>
+                                        <ComputerIcon color="primary" sx={{mr: 1}}/>
+                                        <Typography variant="h6" fontWeight="bold">My Builds</Typography>
+                                    </Box>
+
+                                    {data.userBuilds.length > 4 && (
+                                        <Button
+                                            variant="outlined"
+                                            size="small"
+                                            onClick={() => setOpenMyBuildsDialog(true)}
+                                        >
+                                            See All ({data.userBuilds.length})
+                                        </Button>
+                                    )}
+                                </Box>
+                                <Divider sx={{mb: 2}}/>
+
+                                {data.userBuilds.length === 0 ? (
+                                    <Box sx={{textAlign: 'center', mt: 4}}>
+                                        <Typography color="text.secondary" gutterBottom>You haven't created any builds
+                                            yet.</Typography>
+                                        <Button variant="contained" href="/forge"
+                                                sx={{color: 'white', fontWeight: 'bolder'}}>Start Forging</Button>
+                                    </Box>
+                                ) : (
+                                    <Grid container spacing={2}>
+                                        {data.userBuilds.slice(0, 3).map((build: any) => (
+                                            <Grid item xs={12} sm={6} md={3} key={build.id}>
+                                                <BuildCard
+                                                    build={build}
+                                                    onDelete={() => handleDelete(build.id)}
+                                                    isOwner={true}
+                                                />
+                                            </Grid>
+                                        ))}
+                                    </Grid>
+                                )}
+                            </Paper>
+                        </Grid>
+
+                        <Dialog open={openMyBuildsDialog} onClose={() => setOpenMyBuildsDialog(false)} maxWidth="md"
+                                fullWidth>
+                            <DialogTitle sx={{display: 'flex', justifyContent: 'space-between', alignItems: 'center'}}>All
+                                My Builds
+                                <IconButton onClick={() => setOpenMyBuildsDialog(false)}>
+                                    <CloseIcon/>
+                                </IconButton>
+                            </DialogTitle>
+                            <DialogContent dividers>
+                                <Grid container spacing={2} sx={{mt: 1}}>
+                                    {data.userBuilds.map((build: any) => (
+                                        <Grid item xs={12} sm={6} md={4} key={build.id}>
+                                            <BuildCard
+                                                build={build}
+                                                onDelete={() => handleDelete(build.id)}
+                                                isOwner={true}
+                                            />
+                                        </Grid>
+                                    ))}
+                                </Grid>
+                            </DialogContent>
+
+                            <DialogActions>
+                                <Button onClick={() => setOpenMyBuildsDialog(false)}>Close</Button>
+                            </DialogActions>
+                        </Dialog>
+
+                    </Grid>
+                </Grid>
+            </Grid>
+        </Container>
+    );
+}
+
+function BuildCard({build, onDelete, isOwner}: { build: any, onDelete?: () => void, isOwner?: boolean }) {
+    return (
+        <Card sx={{height: '100%', display: 'flex', flexDirection: 'column'}}>
+            <CardActionArea href={`/build/${build.id}`} sx={{flexGrow: 1}}>
+                <CardContent>
+                    <Typography variant="subtitle1" fontWeight="bold" noWrap>
+                        {build.name || `Build #${build.id}`}
+                    </Typography>
+                    <Typography variant="body2" color="text.secondary">
+                        Created: {build.createdAt ? new Date(build.createdAt).toLocaleDateString() : 'Unknown'}
+                    </Typography>
+                </CardContent>
+            </CardActionArea>
+
+            {isOwner && (
+                <Box sx={{display: 'flex', justifyContent: 'flex-end', p: 1, borderTop: '1px solid #eee'}}>
+                    <IconButton size="small" href={`/build/edit/${build.id}`} color="primary">
+                        <EditIcon fontSize="small"/>
+                    </IconButton>
+                    <IconButton size="small" onClick={onDelete} color="error">
+                        <DeleteIcon fontSize="small"/>
+                    </IconButton>
+                </Box>
+            )}
+        </Card>
+    );
+}
Index: pages/index/+Page.tsx
===================================================================
--- pages/index/+Page.tsx	(revision 40ac7a920a0b08c324bf4201b03a36483cc3aad4)
+++ pages/index/+Page.tsx	(revision 40ac7a920a0b08c324bf4201b03a36483cc3aad4)
@@ -0,0 +1,255 @@
+import React, { useEffect, useState } from 'react';
+import {
+    Container, Box, Typography, Button, Grid, Card, CardMedia, CardContent,
+    CardActions, Chip, Rating, Dialog, DialogTitle, DialogContent, DialogActions,
+    IconButton, Divider
+} from '@mui/material';
+import CloseIcon from '@mui/icons-material/Close';
+import AutoFixHighIcon from '@mui/icons-material/AutoFixHigh';
+import CommentIcon from '@mui/icons-material/Comment';
+import StarIcon from '@mui/icons-material/Star';
+import HardwareIcon from '@mui/icons-material/Memory';
+import ListIcon from '@mui/icons-material/List'; // Icon for "Show All"
+
+// --- PLACEHOLDER ASSETS ---
+const PLACEHOLDER_IMG = "https://placehold.co/600x400?text=Gaming+PC";
+
+import { onGetHighestRankedBuilds, onCloneBuild } from './buildCards.telefunc';
+import { onGetApprovedBuilds } from '../+Layout.telefunc';
+import {getAuthState} from "../../server/telefunc/ctx"; //
+
+export default function HomePage() {
+    const [data, setData] = useState<any>(null);
+    const [selectedBuild, setSelectedBuild] = useState<any>(null); // For Detail Popup
+    const [openDetailPopup, setOpenDetailPopup] = useState(false);
+
+    // NEW: Popup for "All Top Ranked Builds"
+    const [openRankedPopup, setOpenRankedPopup] = useState(false);
+
+    useEffect(() => {
+        async function loadSite(){
+            try{
+                const [
+                    authData, highestRankedBuilds, commnityBuilds
+                ] = await Promise.all([
+                    getAuthState(),
+                    onGetHighestRankedBuilds({ limit: 3 }),
+                    onGetApprovedBuilds({ limit: 12 })
+                ]);
+
+                setData({
+                    isLoggedIn: authData.isLoggedIn,
+                    userId: authData.userId,
+                    prebuilts: highestRankedBuilds,
+                    communityBuilds: commnityBuilds
+                });
+            } catch (error) {
+                console.error("Error loading homepage data:", error);
+            }
+    }
+
+    loadSite();
+}, []);
+
+    // Open Build Details
+    const handleCardClick = (build: any) => {
+        setSelectedBuild(build);
+        setOpenDetailPopup(true);
+    };
+
+    const handleClone = async () => {
+        if (!data?.isLoggedIn) return alert("Please login to clone builds!");
+        if (confirm(`Clone "${selectedBuild.name}" to your dashboard?`)) {
+            await onCloneBuild({ buildId: selectedBuild.id });
+            alert("Build cloned! Check your dashboard.");
+            setOpenDetailPopup(false);
+        }
+    };
+
+    if (!data) return <Box sx={{ p: 10, textAlign: 'center' }}>Loading Forge...</Box>;
+
+    return (
+        <Box>
+            <Box sx={{
+                position: 'relative', height: '500px',
+                display: 'flex', alignItems: 'center', justifyContent: 'center', color: 'white',
+                '&::before': { content: '""', position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', backgroundColor: 'rgba(0,0,0,0.6)' }
+            }}>
+                <Box sx={{ position: 'relative', textAlign: 'center', zIndex: 1, p: 2 }}>
+                    <Typography variant="h2" fontWeight="bold" gutterBottom>Forge Your Ultimate Machine</Typography>
+                    <Typography variant="h5" sx={{ maxWidth: '800px', mx: 'auto' }}>
+                        Build, share, discuss, and discover custom PC configurations.
+                    </Typography>
+                    <Typography variant="h5" sx={{ mb: 1, maxWidth: '800px', mx: 'auto' }}>
+                        Join the community today.
+                    </Typography>
+
+                    <Button variant="contained" size="large" href="/forger" startIcon={<AutoFixHighIcon />} sx={{ fontSize: '1.2rem', px: 4, py: 1.5 }}>
+                        Start Forging
+                    </Button>
+                </Box>
+            </Box>
+
+            <Container maxWidth="xl" sx={{ mt: 6, mb: 10 }}>
+                <Box sx={{ mb: 4, borderLeft: '5px solid #ff8201', pl: 2, display: 'flex', justifyContent: 'space-between', alignItems: 'end' }}>
+                    <Box>
+                        <Typography variant="h4" fontWeight="bold">Hall of Fame</Typography>
+                        <Typography variant="subtitle1" color="text.secondary">The highest rated configurations from across the community.</Typography>
+                    </Box>
+                    <Button
+                        variant="outlined"
+                        startIcon={<ListIcon />}
+                        onClick={() => setOpenRankedPopup(true)}
+                    >
+                        Show All Top Ranked
+                    </Button>
+                </Box>
+
+                <Grid container spacing={3} sx={{ mb: 8 }}>
+                    <Grid item xs={12} md={3}>
+                        <Box sx={{
+                            height: '100%', p: 3, bgcolor: '#ff8201', color: 'black', borderRadius: 2,
+                            display: 'flex', flexDirection: 'column', justifyContent: 'center'
+                        }}>
+                            <Typography color={'black'} variant="h4" fontWeight="bold" gutterBottom>The Elite</Typography>
+                            <Typography fontWeight={'bold'}>
+                                These 3 builds represent the pinnacle of performance and looks as voted by the PC Forge community.
+                            </Typography>
+                        </Box>
+                    </Grid>
+
+                    {data.prebuilts.map((build: any) => (
+                        <Grid item xs={12} sm={6} md={3} key={build.id}>
+                            <BuildCard build={build} onClick={() => handleCardClick(build)} />
+                        </Grid>
+                    ))}
+                </Grid>
+
+                <SectionHeader title="Community Forge" subtitle="Fresh builds from users around the world."/>
+                <Grid container spacing={3}>
+                    {data.communityBuilds.map((build: any) => (
+                        <Grid item xs={12} sm={6} md={3} key={build.id}>
+                            <BuildCard build={build} onClick={() => handleCardClick(build)} />
+                        </Grid>
+                    ))}
+                </Grid>
+
+                <Box sx={{ display: 'flex', justifyContent: 'center', mt: 6 }}>
+                    <Button variant="outlined" size="large" href="/completed-builds">View All Community Builds</Button>
+                </Box>
+
+            </Container>
+
+            <Dialog open={openDetailPopup} onClose={() => setOpenDetailPopup(false)} maxWidth="md" fullWidth>
+                {selectedBuild && (
+                    <>
+                        <DialogTitle sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
+                            <Box>
+                                <Typography variant="h5" fontWeight="bold">{selectedBuild.name}</Typography>
+                                <Typography variant="subtitle2" color="text.secondary">By {selectedBuild.username || "Unknown"}</Typography>
+                            </Box>
+                            <IconButton onClick={() => setOpenDetailPopup(false)}><CloseIcon /></IconButton>
+                        </DialogTitle>
+
+                        <DialogContent dividers>
+                            <Grid container spacing={4}>
+                                <Grid item xs={12} md={6}>
+                                    <Box component="img" src={selectedBuild.imageUrl || PLACEHOLDER_IMG} sx={{ width: '100%', borderRadius: 2, mb: 2 }} />
+                                    <Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
+                                        <Rating value={Number(selectedBuild.avgRating) || 0} readOnly precision={0.5} />
+                                        <Typography>({selectedBuild.ratingCount || 0} reviews)</Typography>
+                                    </Box>
+                                </Grid>
+                                <Grid item xs={12} md={6}>
+                                    <Typography variant="h6" gutterBottom>Build Specs</Typography>
+                                    <ComponentRow name="CPU" value="Intel Core i9-13900K" /> {/* Placeholder */}
+                                    <ComponentRow name="GPU" value="NVIDIA RTX 4090" />    {/* Placeholder */}
+
+                                    <Box sx={{ mt: 4, bgcolor: '#f5f5f5', p: 2, borderRadius: 1 }}>
+                                        <Typography variant="subtitle2" fontWeight="bold">Actions</Typography>
+                                        <Box sx={{ display: 'flex', gap: 1, mt: 1 }}>
+                                            <Button size="small" variant="outlined" startIcon={<StarIcon />}>Rate</Button>
+                                            <Button size="small" variant="outlined" startIcon={<CommentIcon />}>Review</Button>
+                                        </Box>
+                                    </Box>
+                                </Grid>
+                            </Grid>
+                        </DialogContent>
+
+                        <DialogActions sx={{ p: 2 }}>
+                            {data.userId === selectedBuild.userId ? (
+                                <Button variant="contained" href={`/forger?edit=${selectedBuild.id}`}>Edit</Button>
+                            ) : (
+                                <Button variant="contained" color="secondary" startIcon={<AutoFixHighIcon />} onClick={null}>
+                                    Clone & Edit
+                                </Button>
+                            )}
+                            <Button href={`/build/${selectedBuild.id}`}>View Full Details</Button>
+                        </DialogActions>
+                    </>
+                )}
+            </Dialog>
+
+
+            <Dialog open={openRankedPopup} onClose={() => setOpenRankedPopup(false)} maxWidth="lg" fullWidth>
+                <DialogTitle sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
+                    Hall of Fame (All Top Ranked)
+                    <IconButton onClick={() => setOpenRankedPopup(false)}><CloseIcon /></IconButton>
+                </DialogTitle>
+                <DialogContent dividers>
+                    <Grid container spacing={3}>
+
+                        {data.prebuilts.concat(data.communityBuilds).map((build: any) => (
+                            <Grid item xs={12} sm={6} md={3} key={`popup-${build.id}`}>
+                                <BuildCard build={build} onClick={() => {
+                                    setOpenRankedPopup(false);
+                                    handleCardClick(build);
+                                }} />
+                            </Grid>
+                        ))}
+                    </Grid>
+                </DialogContent>
+            </Dialog>
+
+        </Box>
+    );
+}
+
+function SectionHeader({ title, subtitle }: { title: string, subtitle: string }) {
+    return (
+        <Box sx={{ mb: 4, borderLeft: '5px solid #1976d2', pl: 2 }}>
+            <Typography variant="h4" fontWeight="bold" color="text.primary">{title}</Typography>
+            <Typography variant="subtitle1" color="text.secondary">{subtitle}</Typography>
+        </Box>
+    );
+}
+
+function BuildCard({ build, onClick }: { build: any, onClick: () => void }) {
+    return (
+        <Card sx={{ height: '100%', display: 'flex', flexDirection: 'column', cursor: 'pointer', transition: 'all 0.2s', '&:hover': { transform: 'translateY(-4px)', boxShadow: 6 } }} onClick={onClick}>
+            <CardMedia component="img" height="160" image={build.imageUrl || PLACEHOLDER_IMG} alt={build.name} />
+            <CardContent sx={{ flexGrow: 1, pb: 1 }}>
+                <Typography gutterBottom variant="h6" noWrap>{build.name}</Typography>
+
+                <Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mt: 1 }}>
+                    <Box sx={{ display: 'flex', alignItems: 'center', px: 1, borderRadius: 1 }}>
+                        <StarIcon fontSize="small" sx={{ color: '#faaf00', mr: 0.5 }} />
+                        <Typography variant="body2" fontWeight="bold">{Number(build.avgRating || 0).toFixed(1)}</Typography>
+                    </Box>
+                    <Typography variant="caption" color="text.secondary">
+                        {build.commentCount || 0} reviews
+                    </Typography>
+                </Box>
+            </CardContent>
+        </Card>
+    );
+}
+
+function ComponentRow({ name, value }: { name: string, value: string }) {
+    return (
+        <Box sx={{ display: 'flex', justifyContent: 'space-between', py: 1, borderBottom: '1px solid #eee' }}>
+            <Typography variant="body2" color="text.secondary">{name}</Typography>
+            <Typography variant="body2" fontWeight="bold">{value}</Typography>
+        </Box>
+    );
+}
Index: pages/index/buildCards.telefunc.ts
===================================================================
--- pages/index/buildCards.telefunc.ts	(revision 40ac7a920a0b08c324bf4201b03a36483cc3aad4)
+++ pages/index/buildCards.telefunc.ts	(revision 40ac7a920a0b08c324bf4201b03a36483cc3aad4)
@@ -0,0 +1,25 @@
+import {ctx, requireUser} from "../../server/telefunc/ctx";
+import * as drizzleQueries from "../../database/drizzle/queries";
+import {Abort} from "telefunc";
+
+export async function onGetHighestRankedBuilds({ limit }
+                                               : { limit?: number }) {
+    const context = ctx();
+
+    const highestRankedBuilds = await drizzleQueries.getHighestRankedBuilds(context.db, limit);
+
+    return highestRankedBuilds;
+}
+
+export async function onCloneBuild({ buildId }
+                                   : { buildId: number }) {
+    const { c, userId } = requireUser()
+
+    if (!Number.isInteger(buildId) || buildId <= 0) throw Abort();
+
+    const newBuild = await drizzleQueries.cloneBuild(c.db, userId, buildId);
+
+    if (!newBuild) throw Abort();
+
+    return newBuild;
+}
