Skip to content

Commit 486865d

Browse files
Mirror full Frontend structure under web_site/Frontend
1 parent 1319f38 commit 486865d

129 files changed

Lines changed: 11263 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

web_site/Frontend/.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["next/core-web-vitals"]
3+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Deploy Next.js site to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: pages
17+
cancel-in-progress: true
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Pages
27+
uses: actions/configure-pages@v5
28+
29+
- name: Setup Node
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: 20
33+
cache: npm
34+
35+
- name: Install dependencies
36+
run: npm ci
37+
38+
- name: Build static export
39+
run: npm run build
40+
41+
- name: Ensure custom domain CNAME
42+
run: echo "webcompass.ai" > out/CNAME
43+
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v3
46+
with:
47+
path: ./out
48+
49+
deploy:
50+
environment:
51+
name: github-pages
52+
url: ${{ steps.deployment.outputs.page_url }}
53+
runs-on: ubuntu-latest
54+
needs: build
55+
steps:
56+
- name: Deploy to GitHub Pages
57+
id: deployment
58+
uses: actions/deploy-pages@v4

web_site/Frontend/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
.next
3+
out
4+
.env*
5+
.DS_Store
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
pnpm-debug.log*

web_site/Frontend/README.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# WebCompass Frontend
2+
3+
Academic project page for **WebCompass: A Unified Multimodal Benchmark and Evaluation Framework for Web Coding**.
4+
5+
Production deployment target:
6+
7+
- GitHub Pages (custom domain + project subpath)
8+
- URL: `https://webcompass.ai/WebCompass/`
9+
- Base path: `/WebCompass`
10+
11+
## Tech Stack
12+
13+
- Next.js (App Router)
14+
- TypeScript
15+
- Tailwind CSS
16+
- shadcn/ui-style base components (`components/ui/*`)
17+
- Framer Motion
18+
- lucide-react
19+
- Recharts
20+
21+
## Local Development
22+
23+
```bash
24+
npm install
25+
npm run dev
26+
```
27+
28+
Local URL: `http://localhost:3000`
29+
30+
## Production Build (Static Export)
31+
32+
```bash
33+
npm run build
34+
```
35+
36+
This project uses Next.js static export (`output: "export"`) and generates deployable static files in `out/`.
37+
38+
## GitHub Pages Deployment
39+
40+
Deployment is automated by GitHub Actions:
41+
42+
- Workflow file: `.github/workflows/deploy.yml`
43+
- Trigger: push to `main` or `master`
44+
- Flow:
45+
1. Install dependencies
46+
2. Build static site
47+
3. Upload Pages artifact (`out/`)
48+
4. Deploy with `actions/deploy-pages`
49+
50+
After each push, the site updates at:
51+
`https://webcompass.ai/WebCompass/`
52+
53+
## Figure-Source Consistency (LaTeX whitelist)
54+
55+
The frontend only renders figures that are referenced in LaTeX files under `../Paper/sec`.
56+
57+
- Extraction script: `scripts/extract-used-figures.mjs`
58+
- Output whitelist: `data/usedFigures.json`
59+
60+
Run:
61+
62+
```bash
63+
npm run sync:figures
64+
npm run build
65+
```
66+
67+
Figure rendering in `data/figures.ts` is filtered by this whitelist, and missing secondary assets are suppressed from the gallery.
68+
69+
## Deployment-specific Notes
70+
71+
- `next.config.js` applies static export + repo base path in production.
72+
- Metadata and OG paths are generated with `/WebCompass` in production.
73+
- Local `npm run dev` remains normal (no base path in development).
74+
75+
## Project Structure
76+
77+
```text
78+
Frontend/
79+
.github/workflows/deploy.yml
80+
app/
81+
components/
82+
data/
83+
lib/
84+
public/
85+
scripts/
86+
styles/
87+
```
88+

web_site/Frontend/app/globals.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
@import "../styles/theme.css";
6+
7+
html {
8+
scroll-behavior: smooth;
9+
}
10+
11+
body {
12+
min-height: 100vh;
13+
text-rendering: optimizeLegibility;
14+
}
15+
16+
.bg-grid {
17+
background-image: linear-gradient(to right, rgba(148, 163, 184, 0.12) 1px, transparent 1px),
18+
linear-gradient(to bottom, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
19+
background-size: 36px 36px;
20+
}

web_site/Frontend/app/layout.tsx

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import type { Metadata } from "next";
2+
import { IBM_Plex_Sans, JetBrains_Mono } from "next/font/google";
3+
4+
import "./globals.css";
5+
6+
const ibmPlexSans = IBM_Plex_Sans({
7+
subsets: ["latin"],
8+
weight: ["400", "500", "600", "700"],
9+
variable: "--font-sans"
10+
});
11+
12+
const jetbrainsMono = JetBrains_Mono({
13+
subsets: ["latin"],
14+
weight: ["400", "500"],
15+
variable: "--font-mono"
16+
});
17+
18+
const productionOrigin = "https://webcompass.ai";
19+
const productionPath = "/WebCompass/";
20+
const productionUrl = `${productionOrigin}${productionPath}`;
21+
const siteUrl = process.env.NODE_ENV === "production" ? productionUrl : "http://localhost:3000/";
22+
const ogImagePath = "/WebCompass/og-image.svg";
23+
const faviconPath = "/WebCompass/favicon.svg";
24+
const paperTitle = "WebCompass: Towards Holistic Evaluation of Web Coding for Multimodal Code Models";
25+
26+
export const metadata: Metadata = {
27+
title: paperTitle,
28+
description:
29+
"WebCompass: Towards Holistic Evaluation of Web Coding for Multimodal Code Models.",
30+
metadataBase: new URL(process.env.NODE_ENV === "production" ? productionOrigin : "http://localhost:3000"),
31+
alternates: {
32+
canonical: process.env.NODE_ENV === "production" ? productionPath : "/"
33+
},
34+
openGraph: {
35+
title: paperTitle,
36+
description: "Towards Holistic Evaluation of Web Coding for Multimodal Code Models",
37+
url: siteUrl,
38+
siteName: "WebCompass",
39+
images: [
40+
{
41+
url: ogImagePath,
42+
width: 1200,
43+
height: 630,
44+
alt: "WebCompass Project Page"
45+
}
46+
],
47+
locale: "en_US",
48+
type: "website"
49+
},
50+
twitter: {
51+
card: "summary_large_image",
52+
title: paperTitle,
53+
description: "Towards Holistic Evaluation of Web Coding for Multimodal Code Models",
54+
images: [ogImagePath]
55+
},
56+
icons: {
57+
icon: faviconPath
58+
}
59+
};
60+
61+
export default function RootLayout({ children }: { children: React.ReactNode }) {
62+
return (
63+
<html lang="en" suppressHydrationWarning>
64+
<body className={`${ibmPlexSans.variable} ${jetbrainsMono.variable} font-sans antialiased`}>{children}</body>
65+
</html>
66+
);
67+
}
68+

0 commit comments

Comments
 (0)