From 624edc2763439309145fa173c033adcbbf97c29a Mon Sep 17 00:00:00 2001 From: AdConsole Dev Date: Fri, 21 Aug 2026 18:30:26 +0800 Subject: [PATCH] Redirect root to legacy tool and add migration notice - Remove landing page, redirect directly to /adconsole.html - Add migration banner with GitHub link to legacy tool - Clean up references to React port progress --- app/page.tsx | 117 ++---------------------------------------- public/adconsole.html | 5 ++ 2 files changed, 10 insertions(+), 112 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index 3c7303b..a8dd538 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -1,119 +1,12 @@ import type { Metadata } from "next"; -import { promises as fs } from "node:fs"; -import path from "node:path"; +import { redirect } from "next/navigation"; export const metadata: Metadata = { - title: "AdConsole", - description: "Amazon PPC teaching simulator", + title: "AdConsole - Amazon PPC Simulator", + description: "Amazon PPC teaching simulator - Migrating to React", }; -async function getLegacyStats() { - try { - const filePath = path.join(process.cwd(), "public", "adconsole.html"); - const stat = await fs.stat(filePath); - return { - bytes: stat.size, - kb: Math.round(stat.size / 1024), - modified: stat.mtime.toLocaleString("sv-SE"), - }; - } catch (e) { - if (process.env.NODE_ENV !== "production") { - console.warn("adconsole.html not found:", e); - } - return null; - } -} - export default async function Home() { - const stats = await getLegacyStats(); - - return ( -
-
-
- - - Next.js shell ready - -

- AdConsole -

-

- Amazon PPC teaching simulator. The legacy static page is preserved - at /adconsole.html{" "} - while we port it into React components. Pick a path below to keep - moving. -

-
- -
- -
-

- Open legacy page -

- - → - -
-

- Jump straight into the original AdConsole HTML — works exactly as - before, no rebuild required. -

- {stats && ( -
-
-
Size
-
- {stats.kb} KB -
-
-
-
Last modified
-
- {stats.modified} -
-
-
- )} -
- -
-

- Build the React port -

-

- Start migrating the simulator into app/{" "} - route by route. The static HTML is the source of truth until the - port lands. -

-
    -
  • - - app/page.tsx — landing shell -
  • -
  • - - app/simulator/page.tsx — main UI (TBD) -
  • -
  • - - public/adconsole.html — legacy reference -
  • -
-
-
- -
- - Next.js · App Router · TypeScript · Tailwind v4 - - Run npm run dev to start -
-
-
- ); + // Redirect directly to the legacy tool + redirect("/adconsole.html"); } diff --git a/public/adconsole.html b/public/adconsole.html index 4c2de51..e07211b 100644 --- a/public/adconsole.html +++ b/public/adconsole.html @@ -546,6 +546,11 @@ +
+ Migration in Progress: This simulator is being migrated to React. + View the new React version on GitHub → +
+