diff --git a/src/Header.tsx b/src/Header.tsx index d7aca2c..f25baf6 100644 --- a/src/Header.tsx +++ b/src/Header.tsx @@ -91,6 +91,32 @@ export default function Header({ + {/* NAV LINKS */} + + {[ + { label: "Dashboard", path: "/dashboard" }, + { label: "Fetch", path: "/fetch-requests" }, + { label: "Reports", path: "/reports" }, + ].map(({ label, path }) => ( + + ))} + + {/* AUTH SECTION */} {isAuthenticated ? ( <> diff --git a/src/Home.tsx b/src/Home.tsx index e4aa1a7..8cb870c 100644 --- a/src/Home.tsx +++ b/src/Home.tsx @@ -1,71 +1,180 @@ import * as React from "react"; -import { Box, Typography, Button, Container, Stack } from "@mui/material"; +import { Box, Typography, Button, Container, Grid, Paper, Chip } from "@mui/material"; import { useTheme, alpha } from "@mui/material/styles"; import { useNavigate } from "react-router-dom"; +import DashboardIcon from "@mui/icons-material/Dashboard"; +import SyncIcon from "@mui/icons-material/Sync"; +import BarChartIcon from "@mui/icons-material/BarChart"; +import SettingsIcon from "@mui/icons-material/Settings"; import ArrowForwardIcon from "@mui/icons-material/ArrowForward"; +import { useAuth } from "../react-auth"; -export default function Home() { +interface FeatureCardProps { + icon: React.ReactNode; + title: string; + description: string; + path: string; + label?: string; + accent: string; +} + +function FeatureCard({ icon, title, description, path, label, accent }: FeatureCardProps) { const navigate = useNavigate(); const theme = useTheme(); + return ( + navigate(path)} + sx={{ + p: 3, + borderRadius: 3, + border: "1px solid", + borderColor: "divider", + cursor: "pointer", + height: "100%", + display: "flex", + flexDirection: "column", + position: "relative", + overflow: "hidden", + transition: "all 0.25s ease", + "&::before": { + content: '""', + position: "absolute", + top: 0, + left: 0, + right: 0, + height: 3, + background: accent, + opacity: 0, + transition: "opacity 0.25s ease", + }, + "&:hover": { + transform: "translateY(-4px)", + boxShadow: `0 12px 32px ${alpha(theme.palette.common.black, theme.palette.mode === "dark" ? 0.3 : 0.08)}`, + borderColor: "transparent", + "&::before": { opacity: 1 }, + }, + }} + > + + + {icon} + + + {title} + + + + + {description} + + + {label && ( + + )} + + ); +} + +export default function Home() { + const navigate = useNavigate(); + const theme = useTheme(); + const { currentUser } = useAuth(); + + const features = [ + { + icon: , + title: "Dashboard", + description: "Visualise inflows and outflows with interactive charts, drill into categories, and track trends over daily, weekly, and monthly periods.", + path: "/dashboard", + accent: theme.palette.mode === "dark" ? "#818cf8" : "#6366f1", + }, + { + icon: , + title: "Fetch Requests", + description: "Upload bank statements or configure email ingestion to auto-import transactions. Track pipeline status from pending through to completion.", + path: "/fetch-requests", + accent: theme.palette.mode === "dark" ? "#34d399" : "#10b981", + }, + { + icon: , + title: "Report Snapshots", + description: "Generate cached report snapshots with custom filters — accounts, date ranges, amount bounds — then pin a snapshot on the dashboard for consistent comparisons.", + path: "/reports", + accent: theme.palette.mode === "dark" ? "#fbbf24" : "#f59e0b", + }, + { + icon: , + title: "Admin", + description: "Full CRUD over accounts, expenses, tags, and payors. Manage your data programmatically through the OpenAPI-driven admin panel.", + path: "/admin", + accent: theme.palette.mode === "dark" ? "#e879f9" : "#d946ef", + }, + ]; + return ( - - + alpha(t.palette.common.white, t.palette.mode === "dark" ? 0.04 : 0.6), - border: "1px solid", - borderColor: "divider", - borderRadius: 4, - boxShadow: (t) => - t.palette.mode === "dark" - ? "0 8px 32px 0 rgba(0, 0, 0, 0.5)" - : "0 8px 32px 0 rgba(31, 38, 135, 0.07)", + textAlign: "center", + mb: 6, }} > @@ -73,14 +182,20 @@ export default function Home() { - Your intelligent, extensible financial ledger. Control accounts, manage transactions, and track your data dynamically with our OpenAPI-driven architecture. + Your intelligent, extensible financial ledger. Import transactions, generate reports, and stay on top of your cashflow. - + + - + + + + {features.map((f) => ( + + + + ))} + );