feat(m1-1): scaffold SvelteKit + Dockerfile + TDD test harness

- SvelteKit (JS, adapter-node) home page + /api/health route
- frontend/Dockerfile multi-stage build->serve (slabuploader-m1:local, 349MB)
- Test harness: Vitest unit + Playwright e2e; smoke tests RED->GREEN verified
- Build, image build, and image serve all verified
This commit is contained in:
Ty
2026-09-13 22:55:34 -07:00
parent ba8e5f72f6
commit 93666320ef
15 changed files with 2610 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
:root {
--bg: #1a1a1a;
--fg: #f2f2f2;
--accent: #4f9d69;
--checker: repeating-conic-gradient(#e8e8e8 0% 25%, #f7f7f7 0% 50%) 0 0 / 24px 24px;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
background: var(--bg);
color: var(--fg);
}
button {
font: inherit;
padding: 0.6rem 1rem;
border: 0;
border-radius: 8px;
background: var(--accent);
color: #04140b;
font-weight: 600;
cursor: pointer;
}
button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
+12
View File
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
+13
View File
@@ -0,0 +1,13 @@
<script>
import '../app.css';
</script>
<svelte:head>
<title>SlabUploader — Milestone 1</title>
</svelte:head>
<main>
<h1>SlabUploader</h1>
<p>Milestone 1 — Capture (browser-only)</p>
<slot />
</main>
+12
View File
@@ -0,0 +1,12 @@
<script>
/** M1 placeholder home — the 5-state capture flow is built in later cards. */
</script>
<div class="capture">
<h2>Capture</h2>
<p>The M1 capture flow (Add photo → Mask → Length axis → Measure → PNG) lands in cards M1-3…M1-5.</p>
</div>
<style>
.capture { max-width: 720px; margin: 2rem auto; padding: 0 1rem; }
</style>
@@ -0,0 +1,6 @@
// Minimal health route so the UAT container has a non-SPA probe target.
import { json } from '@sveltejs/kit';
export function GET() {
return json({ ok: true, milestone: 1, app: 'slab-uploader' });
}