Skip to content

Commit bd83ff1

Browse files
Add dev tools and SEO files
1 parent ae566cd commit bd83ff1

9 files changed

Lines changed: 578 additions & 15 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ npm run dev
1111

1212
Open `http://localhost:3000`.
1313

14+
### Dev tools (camera + model console)
15+
16+
PowerShell starter:
17+
18+
```powershell
19+
.\scripts\dev.ps1
20+
```
21+
22+
This opens `http://localhost:3000/?dev=1` and enables the live dev panel.
23+
1424
## 3D Model
1525

1626
Export the Blender model to GLB and place it here:

scripts/dev.ps1

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
param(
2+
[switch]$DevTools
3+
)
4+
5+
$ErrorActionPreference = "Stop"
6+
$root = Split-Path -Parent $PSScriptRoot
7+
Set-Location $root
8+
9+
Write-Host "[dev] Project: $root"
10+
Write-Host "[dev] Node: $(node -v)"
11+
Write-Host "[dev] NPM: $(npm -v)"
12+
13+
if (!(Test-Path -Path "node_modules")) {
14+
Write-Host "[dev] Installing dependencies..."
15+
npm install
16+
}
17+
18+
if ($DevTools -or $true) {
19+
$env:NEXT_PUBLIC_DEVTOOLS = "1"
20+
}
21+
22+
$url = "http://localhost:3000/?dev=1"
23+
Write-Host "[dev] Opening $url"
24+
Start-Process $url
25+
26+
Write-Host "[dev] Starting Next.js..."
27+
npm run dev

src/app/globals.css

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,105 @@ textarea {
568568
justify-content: center;
569569
}
570570

571+
.dev-console {
572+
position: fixed;
573+
z-index: 9998;
574+
width: 280px;
575+
border-radius: 16px;
576+
border: 1px solid var(--stroke);
577+
background: rgba(10, 12, 12, 0.92);
578+
color: var(--ink);
579+
box-shadow: var(--shadow);
580+
font-size: 12px;
581+
overflow: hidden;
582+
transform: translateY(0);
583+
}
584+
585+
.dev-console.top-left {
586+
top: 20px;
587+
left: 20px;
588+
}
589+
590+
.dev-console.top-right {
591+
top: 20px;
592+
right: 20px;
593+
}
594+
595+
.dev-console.bottom-left {
596+
bottom: 20px;
597+
left: 20px;
598+
}
599+
600+
.dev-console.bottom-right {
601+
bottom: 20px;
602+
right: 20px;
603+
}
604+
605+
.dev-toggle {
606+
width: 100%;
607+
padding: 10px 14px;
608+
background: rgba(126, 242, 178, 0.1);
609+
border: none;
610+
color: var(--ink);
611+
font-weight: 600;
612+
cursor: pointer;
613+
}
614+
615+
.dev-body {
616+
display: none;
617+
padding: 12px 14px 16px;
618+
gap: 12px;
619+
}
620+
621+
.dev-console.open .dev-body {
622+
display: grid;
623+
}
624+
625+
.dev-section {
626+
display: grid;
627+
gap: 8px;
628+
border-top: 1px solid var(--stroke);
629+
padding-top: 10px;
630+
}
631+
632+
.dev-section h4 {
633+
font-size: 12px;
634+
text-transform: uppercase;
635+
letter-spacing: 0.12em;
636+
color: var(--muted);
637+
}
638+
639+
.dev-section label {
640+
display: grid;
641+
gap: 4px;
642+
}
643+
644+
.dev-section input[type="range"] {
645+
width: 100%;
646+
}
647+
648+
.dev-positions {
649+
display: grid;
650+
grid-template-columns: repeat(2, 1fr);
651+
gap: 6px;
652+
}
653+
654+
.dev-positions button,
655+
.dev-reset {
656+
padding: 8px 10px;
657+
border-radius: 10px;
658+
border: 1px solid var(--stroke);
659+
background: rgba(255, 255, 255, 0.05);
660+
color: var(--ink);
661+
cursor: pointer;
662+
font-size: 11px;
663+
}
664+
665+
.dev-positions button.active {
666+
border-color: rgba(126, 242, 178, 0.6);
667+
background: rgba(126, 242, 178, 0.15);
668+
}
669+
571670
@keyframes float {
572671
0%,
573672
100% {

src/app/robots.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type { MetadataRoute } from "next";
2+
3+
export default function robots(): MetadataRoute.Robots {
4+
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL ?? "http://localhost:3000";
5+
6+
return {
7+
rules: {
8+
userAgent: "*",
9+
allow: "/",
10+
},
11+
sitemap: `${baseUrl}/sitemap.xml`,
12+
};
13+
}

src/app/sitemap.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { MetadataRoute } from "next";
2+
3+
export default function sitemap(): MetadataRoute.Sitemap {
4+
const baseUrl = process.env.NEXT_PUBLIC_SITE_URL ?? "http://localhost:3000";
5+
const lastModified = new Date();
6+
7+
return [
8+
{
9+
url: baseUrl,
10+
lastModified,
11+
changeFrequency: "weekly",
12+
priority: 1,
13+
},
14+
];
15+
}

0 commit comments

Comments
 (0)