refactor(app): serve one domain — /defects route and header nav

Drop the two-subdomain split (ADR 0004): report at /, view defects at
/defects, with a shared layout + header nav. Renames the dashboard page to
defects.vue and updates plan/README. Transparency over separation now that
auth gates everyone, and it removes the Coolify two-domain routing question.
This commit is contained in:
Julien Calixte
2026-05-28 00:24:02 +02:00
parent 999593b426
commit e5c002547f
7 changed files with 84 additions and 22 deletions

View File

@@ -1,4 +1,6 @@
<template>
<NuxtRouteAnnouncer />
<NuxtPage />
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</template>

26
app/layouts/default.vue Normal file
View File

@@ -0,0 +1,26 @@
<script setup lang="ts">
// Single domain (ADR 0004): report at `/`, view all defects at `/defects`,
// with a persistent header to move between them.
</script>
<template>
<div class="min-h-screen">
<header class="navbar border-base-300 border-b">
<NuxtLink to="/" class="btn btn-ghost text-xl">Andon</NuxtLink>
<nav class="ml-auto flex gap-1">
<NuxtLink to="/" class="btn btn-ghost btn-sm" exact-active-class="btn-active">
Report
</NuxtLink>
<NuxtLink
to="/defects"
class="btn btn-ghost btn-sm"
exact-active-class="btn-active"
>
View defects
</NuxtLink>
</nav>
</header>
<slot />
</div>
</template>

View File

@@ -1,7 +0,0 @@
<template>
<main>
<h1>Andon weak point dashboard</h1>
<BoardView />
<p>The red-dot defect map lands in Task 7.</p>
</main>
</template>

17
app/pages/defects.vue Normal file
View File

@@ -0,0 +1,17 @@
<script setup lang="ts">
// Defect-viewing route (`/defects`) — the read-only board with the weak-point
// map and feed. Same domain as reporting (ADR 0004).
</script>
<template>
<main class="mx-auto flex max-w-5xl flex-col items-center gap-6 p-6">
<header class="text-center">
<h1>Andon weak points</h1>
<p class="opacity-70">Every defect filed on the board.</p>
</header>
<BoardView />
<p class="opacity-60">The red-dot map (T7) and defect feed (T8) land next.</p>
</main>
</template>