When someone shares a link to the dashboard in WhatsApp, Facebook,
LinkedIn, Discord, etc., the platform now shows a custom preview
instead of a plain blank card.
- public/og-image.png 1200x630 PNG with the brand mark, the
MEGA INFRASTRUCTURE wordmark, and a
tagline over a dark gradient with the
brand accent bars.
- public/fonts/ Inter ExtraBold (woff) used by the OG image
generator so the rendered text is identical
on every machine.
- scripts/build-og-image.mjs
Generates the image from an SVG template
using sharp. The font is loaded from the
local file (or Google Fonts CDN as fallback)
and embedded as base64 inside the SVG so
the renderer doesn't depend on system
fonts.
- src/app/layout.tsx Adds the openGraph + twitter metadata
pointing at /og-image.png so the preview
appears in link-unfurl contexts.
- package.json 'npm run og-image' runs the generator;
'npm run build' chains it via prebuild so
the image is regenerated on every CI build.
47 lines
1.4 KiB
JSON
47 lines
1.4 KiB
JSON
{
|
|
"name": "mega-infrastructure-dashboard",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev -H 0.0.0.0 -p 3000 --webpack",
|
|
"build": "npm run og-image && next build --webpack",
|
|
"og-image": "node scripts/build-og-image.mjs",
|
|
"start": "next start -H 0.0.0.0 -p 3000",
|
|
"lint": "next lint",
|
|
"typecheck": "tsc --noEmit",
|
|
"postinstall": "node scripts/patch-next-dev-blocker.cjs"
|
|
},
|
|
"dependencies": {
|
|
"@ducanh2912/next-pwa": "^10.2.9",
|
|
"@radix-ui/react-dialog": "^1.1.4",
|
|
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
|
"@radix-ui/react-label": "^2.1.1",
|
|
"@radix-ui/react-select": "^2.1.4",
|
|
"@radix-ui/react-slot": "^1.1.1",
|
|
"@radix-ui/react-tabs": "^1.1.2",
|
|
"@radix-ui/react-tooltip": "^1.1.6",
|
|
"@tanstack/react-table": "^8.20.6",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"date-fns": "^4.1.0",
|
|
"lucide-react": "^0.469.0",
|
|
"next": "^16",
|
|
"papaparse": "^5.4.1",
|
|
"react": "^19.0.0",
|
|
"react-dom": "^19.0.0",
|
|
"recharts": "^2.15.0",
|
|
"tailwind-merge": "^2.6.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.10.5",
|
|
"@types/papaparse": "^5.3.15",
|
|
"@types/react": "^19.0.2",
|
|
"@types/react-dom": "^19.0.2",
|
|
"eslint": "^9.17.0",
|
|
"eslint-config-next": "^16",
|
|
"postcss": "^8.4.49",
|
|
"tailwindcss": "^4.0.0",
|
|
"@tailwindcss/postcss": "^4.0.0",
|
|
"typescript": "^5.7.2"
|
|
}
|
|
}
|