Add URL-based routing with sidebar navigation

Replace client-side state switching with proper Next.js routes:
- /new - New scrape form
- /jobs - Jobs list with table view
- /jobs/[id] - Individual job details and logs
- /analytics - Analytics overview (completed jobs)
- /analytics/[id] - Analytics for specific job

Add JobsContext for shared state across routes. Update Sidebar
to use next/link with pathname matching. Root page redirects to /new.

Also adds partial job status styling to JobsView.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-01-24 10:58:48 +00:00
parent 3eda9bdbfa
commit b1296059a9
10 changed files with 931 additions and 288 deletions

View File

@@ -1,6 +1,8 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { JobsProvider } from "@/contexts/JobsContext";
import Sidebar from "@/components/Sidebar";
const geistSans = Geist({
variable: "--font-geist-sans",
@@ -13,8 +15,8 @@ const geistMono = Geist_Mono({
});
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: "Google Reviews Scraper Pro",
description: "Scrape and analyze Google Reviews",
};
export default function RootLayout({
@@ -27,7 +29,14 @@ export default function RootLayout({
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children}
<JobsProvider>
<div className="h-screen w-screen overflow-hidden flex">
<Sidebar />
<div className="flex-1 bg-gray-50 overflow-hidden">
{children}
</div>
</div>
</JobsProvider>
</body>
</html>
);