import React, { useEffect, useState } from "react"; import { Box, Button, Container, Stack, Typography } from "@mui/material"; import { alpha } from "@mui/material/styles"; import { useLocation, useNavigate } from "react-router-dom"; import DashboardIcon from "@mui/icons-material/SpaceDashboardOutlined"; import AlarmIcon from "@mui/icons-material/NotificationsActiveOutlined"; import MatchIcon from "@mui/icons-material/FactCheckOutlined"; import MailIcon from "@mui/icons-material/MarkEmailReadOutlined"; import AttachIcon from "@mui/icons-material/DescriptionOutlined"; import InsightsIcon from "@mui/icons-material/InsightsOutlined"; import { api } from "../api"; const BRAND_DARK = "#0b1020"; const BRAND_PANEL = "#111a33"; const FEATURES: { icon: React.ReactNode; title: string; body: string }[] = [ { icon: , title: "Centralized pipeline", body: "Track every application across Applied, Waiting, Interview, Offer, Rejected and Ghosted — drag to update." }, { icon: , title: "Smart follow-ups", body: "Reminders surface what needs attention next, with a grounded draft ready to review and send." }, { icon: , title: "Honest CV match", body: "A deterministic keyword-coverage score with matched vs missing skills — not an opaque black box." }, { icon: , title: "Email correspondence", body: "Link Gmail threads to a job; new replies appear automatically without re-importing." }, { icon: , title: "Attachments & docs", body: "Keep resumes, cover letters and portfolios versioned per application, right where you need them." }, { icon: , title: "Dashboard & insights", body: "Response rates, funnel, time-in-stage and skill demand across your whole search." }, ]; const STEPS: { n: number; title: string; body: string }[] = [ { n: 1, title: "Import", body: "Paste a job URL or use the bookmarklet — we parse the role into structured fields." }, { n: 2, title: "Match", body: "See how your CV covers the role: matched keywords and the gaps to close." }, { n: 3, title: "Tailor", body: "AI drafts a tailored CV and cover letter — you review every word before it goes out." }, { n: 4, title: "Track", body: "Move it through the pipeline; documents, notes and history stay attached." }, { n: 5, title: "Follow up", body: "Linked email threads and reminders keep momentum with grounded replies." }, { n: 6, title: "Analyze", body: "See what's working — response rate, funnel and time-in-stage — and focus your effort." }, ]; const PRICING: { name: string; price: string; cadence: string; highlight: boolean; features: string[]; cta: string }[] = [ { name: "Free", price: "£0", cadence: "forever", highlight: false, cta: "Get started", features: ["Unlimited job tracking & pipeline", "One-click capture (bookmarklet + PWA)", "Deterministic CV↔job match score", "3 AI CV tailors / month"] }, { name: "Pro", price: "£9", cadence: "/ month · billed monthly or yearly", highlight: true, cta: "Start Pro", features: ["Everything in Free", "Unlimited AI CV & cover-letter tailoring", "CV versions + factuality guardrail", "Gmail correspondence CRM", "Analytics drill-downs"] }, { name: "Bring your own key", price: "£3", cadence: "/ month + your AI key", highlight: false, cta: "Get started", features: ["Everything in Pro", "Use your own Gemini / Groq key", "Unlimited AI at provider cost", "Privacy-first & self-host friendly"] }, ]; export default function LandingPage() { const navigate = useNavigate(); const location = useLocation() as { state?: { from?: string } }; const [checking, setChecking] = useState(true); // If the visitor already has a session, send them straight into the app. useEffect(() => { let active = true; api .get("/auth/me") .then(() => { if (active) navigate("/jobs", { replace: true }); }) .catch(() => { if (active) setChecking(false); }); return () => { active = false; }; }, [navigate]); // A protected route redirects unauthenticated visitors here with the page they // wanted in location state; forward it to /login so sign-in returns them there // instead of dropping them on /jobs. const goToLogin = () => navigate("/login", { state: location.state }); if (checking) { return ( Loading… ); } const gradientText = { background: "linear-gradient(90deg,#6366f1,#22d3ee)", WebkitBackgroundClip: "text", WebkitTextFillColor: "transparent", } as const; return ( {/* Top bar */} JobTrack {/* Hero */} AI-ASSISTED JOB SEARCH WORKSPACE Run your job search without losing the thread. Import a role, tailor your CV, track every application, and keep recruiter correspondence tied to the right job — all in one focused workspace. Assistive, never autonomous: you approve every draft. React · TypeScript · ASP.NET Core · EF Core · FastAPI AI · Gmail {/* Product preview */} SEE IT IN ACTION Your whole search, at a glance Interface preview. {/* Features */} WHAT IT DOES One workspace for the whole search Everything from a single import to the final offer — no more spreadsheets and scattered inboxes. {FEATURES.map((f) => ( {f.icon} {f.title} {f.body} ))} {/* How it works */} HOW IT WORKS From a link to an offer {STEPS.map((s) => ( {s.n} {s.title} {s.body} ))} {/* Pricing */} PRICING Honest, simple pricing Billed monthly or yearly — never by the week. Cancel anytime. {PRICING.map((tier) => ( {tier.highlight && ( Most popular )} {tier.name} {tier.price} {tier.cadence} {tier.features.map((f) => ( {f} ))} ))} Prices indicative — assistive, never autonomous: you always review and send. No auto-apply spam. {/* CTA */} Ready to organize your search? Sign in to start tracking applications, tailoring CVs, and following up with intent. {/* Footer */} © {new Date().getFullYear()} JobTrack — a focused workspace for the modern job search. ); }