tenhaw 0.0.0-bootstrap
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/LICENSE-CONTENT +15 -0
- package/README.md +52 -0
- package/dist/chunk-BKPOQVTM.js +74 -0
- package/dist/chunk-ZIEK7SCN.js +73 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +319 -0
- package/dist/scaffold.d.ts +14 -0
- package/dist/scaffold.js +8 -0
- package/instructions/ai-readiness-assessment/AGENTS.md +9 -0
- package/instructions/ai-roi-business-case/AGENTS.md +9 -0
- package/instructions/ai-usecase-register/AGENTS.md +9 -0
- package/instructions/build-ai-adoption-dashboard/AGENTS.md +9 -0
- package/instructions/delivery-metrics-dora/AGENTS.md +9 -0
- package/instructions/portfolio-tracking/AGENTS.md +9 -0
- package/instructions/product-operating-model/AGENTS.md +9 -0
- package/package.json +58 -0
- package/templates/ai-adoption-dashboard/AGENTS.md +22 -0
- package/templates/ai-adoption-dashboard/CLAUDE.md +22 -0
- package/templates/ai-adoption-dashboard/LICENSE +21 -0
- package/templates/ai-adoption-dashboard/LICENSE-CONTENT +15 -0
- package/templates/ai-adoption-dashboard/README.md +56 -0
- package/templates/ai-adoption-dashboard/app/globals.css +2 -0
- package/templates/ai-adoption-dashboard/app/layout.tsx +4 -0
- package/templates/ai-adoption-dashboard/app/page.tsx +14 -0
- package/templates/ai-adoption-dashboard/e2e/app.spec.ts +27 -0
- package/templates/ai-adoption-dashboard/lib/io.ts +42 -0
- package/templates/ai-adoption-dashboard/lib/model.test.ts +4 -0
- package/templates/ai-adoption-dashboard/lib/model.ts +9 -0
- package/templates/ai-adoption-dashboard/lib/workspace.tsx +49 -0
- package/templates/ai-adoption-dashboard/next-env.d.ts +7 -0
- package/templates/ai-adoption-dashboard/next.config.mjs +2 -0
- package/templates/ai-adoption-dashboard/package.json +31 -0
- package/templates/ai-adoption-dashboard/playwright.config.ts +2 -0
- package/templates/ai-adoption-dashboard/public/example.csv +5 -0
- package/templates/ai-adoption-dashboard/public/example.json +34 -0
- package/templates/ai-adoption-dashboard/public/llms.txt +6 -0
- package/templates/ai-adoption-dashboard/tsconfig.json +36 -0
- package/templates/ai-adoption-dashboard/vitest.config.ts +2 -0
- package/templates/ai-readiness-assessment/AGENTS.md +22 -0
- package/templates/ai-readiness-assessment/CLAUDE.md +22 -0
- package/templates/ai-readiness-assessment/LICENSE +21 -0
- package/templates/ai-readiness-assessment/LICENSE-CONTENT +15 -0
- package/templates/ai-readiness-assessment/README.md +56 -0
- package/templates/ai-readiness-assessment/app/globals.css +2 -0
- package/templates/ai-readiness-assessment/app/layout.tsx +4 -0
- package/templates/ai-readiness-assessment/app/page.tsx +11 -0
- package/templates/ai-readiness-assessment/e2e/app.spec.ts +27 -0
- package/templates/ai-readiness-assessment/lib/io.ts +42 -0
- package/templates/ai-readiness-assessment/lib/model.test.ts +5 -0
- package/templates/ai-readiness-assessment/lib/model.ts +5 -0
- package/templates/ai-readiness-assessment/lib/workspace.tsx +49 -0
- package/templates/ai-readiness-assessment/next-env.d.ts +7 -0
- package/templates/ai-readiness-assessment/next.config.mjs +2 -0
- package/templates/ai-readiness-assessment/package.json +32 -0
- package/templates/ai-readiness-assessment/playwright.config.ts +2 -0
- package/templates/ai-readiness-assessment/public/example.json +154 -0
- package/templates/ai-readiness-assessment/public/llms.txt +6 -0
- package/templates/ai-readiness-assessment/tsconfig.json +36 -0
- package/templates/ai-readiness-assessment/vitest.config.ts +2 -0
- package/templates/ai-usecase-register/AGENTS.md +22 -0
- package/templates/ai-usecase-register/CLAUDE.md +22 -0
- package/templates/ai-usecase-register/LICENSE +21 -0
- package/templates/ai-usecase-register/LICENSE-CONTENT +15 -0
- package/templates/ai-usecase-register/README.md +56 -0
- package/templates/ai-usecase-register/app/globals.css +2 -0
- package/templates/ai-usecase-register/app/layout.tsx +4 -0
- package/templates/ai-usecase-register/app/page.tsx +16 -0
- package/templates/ai-usecase-register/e2e/app.spec.ts +27 -0
- package/templates/ai-usecase-register/lib/io.ts +42 -0
- package/templates/ai-usecase-register/lib/model.test.ts +7 -0
- package/templates/ai-usecase-register/lib/model.ts +9 -0
- package/templates/ai-usecase-register/lib/workspace.tsx +49 -0
- package/templates/ai-usecase-register/next-env.d.ts +7 -0
- package/templates/ai-usecase-register/next.config.mjs +2 -0
- package/templates/ai-usecase-register/package.json +33 -0
- package/templates/ai-usecase-register/playwright.config.ts +2 -0
- package/templates/ai-usecase-register/public/example.json +41 -0
- package/templates/ai-usecase-register/public/llms.txt +6 -0
- package/templates/ai-usecase-register/tsconfig.json +36 -0
- package/templates/ai-usecase-register/vitest.config.ts +2 -0
- package/templates/delivery-metrics-dashboard/AGENTS.md +22 -0
- package/templates/delivery-metrics-dashboard/CLAUDE.md +22 -0
- package/templates/delivery-metrics-dashboard/LICENSE +21 -0
- package/templates/delivery-metrics-dashboard/LICENSE-CONTENT +15 -0
- package/templates/delivery-metrics-dashboard/README.md +56 -0
- package/templates/delivery-metrics-dashboard/app/globals.css +2 -0
- package/templates/delivery-metrics-dashboard/app/layout.tsx +4 -0
- package/templates/delivery-metrics-dashboard/app/page.tsx +13 -0
- package/templates/delivery-metrics-dashboard/e2e/app.spec.ts +27 -0
- package/templates/delivery-metrics-dashboard/lib/io.ts +42 -0
- package/templates/delivery-metrics-dashboard/lib/model.test.ts +5 -0
- package/templates/delivery-metrics-dashboard/lib/model.ts +19 -0
- package/templates/delivery-metrics-dashboard/lib/workspace.tsx +49 -0
- package/templates/delivery-metrics-dashboard/next-env.d.ts +7 -0
- package/templates/delivery-metrics-dashboard/next.config.mjs +2 -0
- package/templates/delivery-metrics-dashboard/package.json +32 -0
- package/templates/delivery-metrics-dashboard/playwright.config.ts +2 -0
- package/templates/delivery-metrics-dashboard/public/example.json +98 -0
- package/templates/delivery-metrics-dashboard/public/llms.txt +6 -0
- package/templates/delivery-metrics-dashboard/tsconfig.json +36 -0
- package/templates/delivery-metrics-dashboard/vitest.config.ts +2 -0
- package/templates/product-operating-model/AGENTS.md +22 -0
- package/templates/product-operating-model/CLAUDE.md +22 -0
- package/templates/product-operating-model/LICENSE +21 -0
- package/templates/product-operating-model/LICENSE-CONTENT +15 -0
- package/templates/product-operating-model/README.md +56 -0
- package/templates/product-operating-model/app/globals.css +2 -0
- package/templates/product-operating-model/app/layout.tsx +4 -0
- package/templates/product-operating-model/app/page.tsx +11 -0
- package/templates/product-operating-model/e2e/app.spec.ts +27 -0
- package/templates/product-operating-model/lib/io.ts +42 -0
- package/templates/product-operating-model/lib/model.test.ts +6 -0
- package/templates/product-operating-model/lib/model.ts +4 -0
- package/templates/product-operating-model/lib/workspace.tsx +49 -0
- package/templates/product-operating-model/next-env.d.ts +7 -0
- package/templates/product-operating-model/next.config.mjs +2 -0
- package/templates/product-operating-model/package.json +32 -0
- package/templates/product-operating-model/playwright.config.ts +2 -0
- package/templates/product-operating-model/public/example.json +119 -0
- package/templates/product-operating-model/public/llms.txt +6 -0
- package/templates/product-operating-model/tsconfig.json +36 -0
- package/templates/product-operating-model/vitest.config.ts +2 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Ai usecase register
|
|
2
|
+
|
|
3
|
+
A working internal tool starter from Tenhaw Kit. Synthetic examples are included. Your imports and edits stay in browser localStorage.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
Use this when building an internal ai usecase register. Start locally, inspect the sample model and replace it with your own imported data. Add authenticated shared persistence only when you need collaboration across users.
|
|
8
|
+
|
|
9
|
+
## Run
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pnpm install
|
|
13
|
+
pnpm dev
|
|
14
|
+
pnpm build
|
|
15
|
+
pnpm test
|
|
16
|
+
pnpm typecheck
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Inside the Tenhaw Kit monorepo, first run the root library build. A scaffolded copy resolves released @tenhaw packages instead of workspace links. Publication must be verified separately; source builds do not prove registry availability.
|
|
20
|
+
|
|
21
|
+
## Data and calculations
|
|
22
|
+
|
|
23
|
+
JSON is `{ "useCases": [...] }` matching the usecase-register schema. CSV uses `id,title,problem,ownerRole,businessUnit,value,feasibility,riskTier,status`. Use JSON for full-fidelity backups including ROI calculations and optional fields. Governance gates take precedence over scores.
|
|
24
|
+
|
|
25
|
+
See `lib/model.ts` for the example and import validation. Calculation rules live in the @tenhaw packages; shared JSON Schemas and golden vectors live in the Tenhaw Kit source repository.
|
|
26
|
+
|
|
27
|
+
Files up to 2 MB are accepted. CSV and delivery-event imports are capped at 10,000 rows; domain schema limits also apply. JSON export preserves the input model. CSV exports protect text cells against spreadsheet formula injection. Browser storage can be unavailable or full; keep an exported JSON backup before clearing storage, changing origin or changing devices.
|
|
28
|
+
|
|
29
|
+
## Deploy
|
|
30
|
+
|
|
31
|
+
The Next.js build uses static export (`out/`). There is no API endpoint or shared database receiving the imported data. Deploy static output anywhere, including Vercel. The starter contains no credential fields, token collection, scheduled collectors or telemetry.
|
|
32
|
+
|
|
33
|
+
[Deploy to Vercel](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FTenhaw%2Ftemplate-ai-usecase-register&project-name=ai-usecase-register) requires the public satellite repository to have been published. A local build does not verify that external release.
|
|
34
|
+
|
|
35
|
+
## Extend with authentication and a database
|
|
36
|
+
|
|
37
|
+
Before adding server persistence, remove static export and implement authentication plus authorisation for every read, write, import and export route. Auth.js can supply the session, but checking a session alone does not define who may access each record. Protect production deployments as well as previews.
|
|
38
|
+
|
|
39
|
+
A database is deliberately not included in this browser-local baseline. For collaboration, add Drizzle with an explicit SQLite or PostgreSQL schema and dialect-specific migrations, then write a one-time import from the exported JSON. Setting DATABASE_URL alone does not switch database dialects. Keep credentials server-side and out of NEXT_PUBLIC variables.
|
|
40
|
+
|
|
41
|
+
Run GitHub/Jira collectors locally with your read-only environment tokens and import their output. Do not add hosted collection until access control and credential storage are implemented and tested.
|
|
42
|
+
|
|
43
|
+
## Check the browser workflow
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
pnpm exec playwright install chromium
|
|
47
|
+
pnpm e2e
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The browser test opens the synthetic workspace and verifies JSON export. Unit tests cover meaningful import and calculation boundaries. No live source-system tokens are needed.
|
|
51
|
+
|
|
52
|
+
## Licence and attribution
|
|
53
|
+
|
|
54
|
+
Code: MIT. The bundled readiness framework content remains CC BY 4.0 where used. Set `NEXT_PUBLIC_TENHAW_ATTRIBUTION=false` before building to remove the optional marketing footer; applicable licence notices remain.
|
|
55
|
+
|
|
56
|
+
Built with Tenhaw Kit. [Get expert help applying this](https://tenhaw.com/contact?utm_source=template&utm_medium=readme&utm_campaign=tenhaw-kit&utm_content=ai-usecase-register#book).
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
:root{color-scheme:dark;--ink:#0a0d12;--panel:#111821;--line:#293544;--text:#e9eef3;--muted:#a8b4c2;--yellow:#ffd400;--green:#39e58c}*{box-sizing:border-box}body{margin:0;background:var(--ink);color:var(--text);font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:1.55}a{color:var(--yellow);text-underline-offset:4px}button,input,select,textarea{font:inherit}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--panel);color:var(--text);padding:9px 14px;border:1px solid var(--line);border-radius:5px;cursor:pointer;text-decoration:none;font-weight:600}button:hover,.button:hover{border-color:var(--muted)}button:focus-visible,.button:focus-within,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid var(--yellow);outline-offset:4px}.primary{background:var(--yellow);color:var(--ink);border-color:var(--yellow)}.subtle{background:transparent;color:var(--muted)}.button input[type=file]{position:absolute;width:1px;height:1px;opacity:0}.workspace{min-height:100vh;display:grid;grid-template-columns:230px 1fr}.sidebar{border-right:1px solid var(--line);padding:28px 20px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:flex;gap:10px;align-items:center;font-size:22px;font-weight:700;margin-bottom:52px}.mark{background:var(--yellow);color:var(--ink);width:34px;height:34px;display:grid;place-items:center;font-size:25px;line-height:1}.muted{color:var(--muted)}.eyebrow{font-size:10px;font-weight:700;letter-spacing:.16em;color:var(--muted);margin:0 0 15px}.sidebar nav{display:grid;gap:5px}.nav{justify-content:flex-start;background:none;border-color:transparent;font-size:14px}.nav.active{background:#202a34;color:var(--yellow)}.sidebar-note{margin-top:auto;padding-top:48px;font-size:12px;color:var(--muted)}.sidebar-note p{margin:8px 0}.sidebar-note small{font-size:11px}.dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--green);margin-right:7px}main{min-width:0;max-width:1500px;width:100%;padding:42px 48px}header{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid var(--line);padding-bottom:26px;margin-bottom:24px}h1{font-size:clamp(27px,3vw,38px);letter-spacing:-.04em;line-height:1.15;margin:0 0 14px}h2{font-size:17px;margin:0;font-weight:600}h3{font-size:15px}.lede{color:var(--muted);max-width:700px;margin:0}.toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.notice{font-size:12px;color:var(--muted);margin:12px 0 26px;min-height:19px}.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));border:1px solid var(--line);margin:0 0 28px;border-radius:6px;overflow:hidden}.stat{padding:20px;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:10px;background:var(--panel)}.stat:last-child{border-right:0}.stat>span{color:var(--muted);font-size:12px}.stat strong{font-size:30px;font-weight:500;letter-spacing:-.04em;line-height:1.2}.stat small{color:var(--muted);font-size:11px}.panel{border:1px solid var(--line);background:var(--panel);padding:24px;border-radius:6px;margin-bottom:22px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.panel-heading small{color:var(--muted);font-size:11px}.columns{display:grid;grid-template-columns:1fr 1fr;gap:22px}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;text-align:left;font-size:13px}th{font-size:10px;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);font-weight:600;padding:0 12px 12px 0}td{padding:13px 12px 13px 0;border-top:1px solid var(--line);vertical-align:top}td:first-child{font-weight:600}tbody tr:hover{background:#18222e}.bar-row{margin:18px 0}.bar-row>div:first-child{display:flex;justify-content:space-between;font-size:12px;margin-bottom:8px}.bar-row strong{font-weight:500;color:var(--muted)}.track{height:7px;background:#263240;border-radius:3px;overflow:hidden}.track>span{height:100%;display:block;background:var(--yellow);border-radius:3px}.tag{display:inline-block;font-size:10px;padding:3px 7px;border:1px solid var(--line);border-radius:3px;color:var(--muted);white-space:nowrap}.tag.good{color:var(--green);border-color:#275944}.tag.warn{color:var(--yellow);border-color:#6c601d}label.field{display:flex;flex-direction:column;gap:6px;font-size:12px;margin-bottom:15px;color:var(--muted)}input:not([type=file]),select,textarea{background:var(--ink);border:1px solid var(--line);padding:9px 11px;border-radius:4px;color:var(--text);min-width:0}textarea{width:100%;min-height:140px;font-family:monospace;font-size:12px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.form-grid .wide{grid-column:1/-1}.question{padding:18px 0;border-top:1px solid var(--line)}.question:first-of-type{border-top:0}.question label{display:block}.question-title{font-size:14px;font-weight:600}.question small{display:block;color:var(--muted);margin:6px 0 12px}.question select{width:100%;max-width:600px;margin-bottom:10px}.question input{display:block;width:100%;max-width:600px}details{margin-top:24px;border-top:1px solid var(--line);padding-top:16px}summary{cursor:pointer;color:var(--muted);font-size:12px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;background:var(--ink);padding:18px;border-radius:5px;max-height:500px;overflow:auto}.empty{color:var(--muted);font-size:13px}.notes{font-size:12px;color:var(--muted)}.notes li{margin:8px 0}.matrix{display:grid;grid-template-columns:1fr 1fr;gap:12px}.quadrant{min-height:130px;border:1px solid var(--line);padding:14px}.quadrant h3{color:var(--muted);margin-top:0;font-size:11px}.quadrant p{margin:8px 0;font-size:12px}.score{font-variant-numeric:tabular-nums}.progress{width:100%;accent-color:var(--yellow)}footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:16px;border-top:1px solid var(--line);margin-top:40px;padding-top:20px;color:var(--muted);font-size:10px}.skip{position:fixed;top:-100px;left:20px;background:var(--yellow);color:var(--ink);padding:10px;z-index:20}.skip:focus{top:10px}@media(max-width:1000px){main{padding:32px 26px}.workspace{grid-template-columns:185px 1fr}.sidebar{padding:24px 12px}.columns{grid-template-columns:1fr}}@media(max-width:700px){.workspace{display:block}.sidebar{height:auto;position:static;border-right:0;border-bottom:1px solid var(--line);padding:16px 20px}.brand{margin-bottom:18px}.sidebar>.eyebrow,.sidebar-note{display:none}.sidebar nav{display:flex;overflow:auto;gap:5px}.nav{font-size:12px;white-space:nowrap;padding:8px 10px}main{padding:28px 20px}.stats{grid-template-columns:1fr 1fr}.stat{padding:16px}.stat strong{font-size:24px}.panel{padding:18px}.form-grid{grid-template-columns:1fr}.toolbar{gap:7px}.toolbar button,.toolbar .button{font-size:12px;padding:8px 10px}}
|
|
2
|
+
@media print{.sidebar,.toolbar,.notice,footer{display:none}.workspace{display:block}main{padding:0;max-width:none}body{background:white;color:#111;color-scheme:light}.panel,.stat{background:white;border-color:#aaa;break-inside:avoid}pre{background:#f4f4f4;color:#111}.muted,.lede,.notes,.stat>span,th{color:#333}.track{background:#ddd}.track>span{background:#666}button,input,select{color:#111;background:white}}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Metadata } from "next";
|
|
2
|
+
import "./globals.css";
|
|
3
|
+
export const metadata: Metadata = { title: "Ai usecase register | Tenhaw Kit", description: "A local-first internal tool starter. Synthetic examples included. Your imported data stays in this browser.", robots: { index: false, follow: false } };
|
|
4
|
+
export default function Layout({children}:{children:React.ReactNode}) { return <html lang="en-GB"><body>{children}</body></html>; }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState, type FormEvent } from "react";
|
|
3
|
+
import { prioritiseUseCases, type UseCase } from "@tenhaw/usecase-register";
|
|
4
|
+
import { calculateRoi } from "@tenhaw/ai-roi";
|
|
5
|
+
import { example, importRegister, roiExample, validateRegister, validateRoi } from "../lib/model";
|
|
6
|
+
import { toCsv } from "../lib/io";
|
|
7
|
+
import { Workspace, Stats, Panel, Table, FileActions, useWorkspace, number, JsonReport, download } from "../lib/workspace";
|
|
8
|
+
const statuses:UseCase["status"][]=["idea","assessed","approved","PoC","pilot","production","retired"];
|
|
9
|
+
const risks:UseCase["riskTier"][]=["unknown","minimal","limited","high","prohibited"];
|
|
10
|
+
const csvFields=["id","title","problem","ownerRole","businessUnit","value","feasibility","riskTier","status"];
|
|
11
|
+
export default function Page(){const [section,setSection]=useState("Register");const state=useWorkspace("tenhaw-usecases-v1",example,validateRegister);const roiState=useWorkspace("tenhaw-roi-input-v1",roiExample,validateRoi);const ready=state.ready&&roiState.ready;const [filter,setFilter]=useState("");const [selected,setSelected]=useState("");const report=prioritiseUseCases(state.data);const cases=report.useCases.filter(item=>item.title.toLowerCase().includes(filter.toLowerCase()));const selectedId=state.data.useCases.some(item=>item.id===selected)?selected:state.data.useCases[0]?.id??"";let roi:ReturnType<typeof calculateRoi>|null=null,roiError="";try{roi=calculateRoi(roiState.data);}catch(error){roiError=error instanceof Error?error.message:"Check ROI inputs.";}const money=(value:number)=>new Intl.NumberFormat("en-GB",{style:"currency",currency:"GBP",maximumFractionDigits:0}).format(value);
|
|
12
|
+
function add(event:FormEvent<HTMLFormElement>){event.preventDefault();const form=new FormData(event.currentTarget);const item={id:`usecase-${crypto.randomUUID()}`,title:String(form.get("title")),problem:String(form.get("problem")),ownerRole:String(form.get("ownerRole")),businessUnit:String(form.get("businessUnit")),value:Number(form.get("value")),feasibility:Number(form.get("feasibility")),riskTier:String(form.get("riskTier")) as UseCase["riskTier"],status:"idea" as const};try{state.setData(validateRegister({useCases:[...state.data.useCases,item]}));state.setNotice("Use case added in this browser.");event.currentTarget.reset();setSection("Register");}catch(error){state.setNotice(error instanceof Error?error.message:"Check the fields.");}}
|
|
13
|
+
return <Workspace ready={ready} title="AI use-case register" description="Keep ownership, value assumptions and governance decisions together as ideas move into use." section={section} setSection={setSection} sections={["Register","Prioritisation","Business case","Add use case","Methodology"]} notice={state.notice} actions={<FileActions ready={ready} name="usecase-register" data={state.data} csv={toCsv(state.data.useCases,csvFields)} reset={state.reset} onError={state.setNotice} onImport={(source,format)=>{state.setData(importRegister(source,format));state.setNotice("Register imported into this browser.");}}/>}>
|
|
14
|
+
<Stats items={[{label:"Use cases",value:report.useCases.length,note:"Owned ideas and active work"},{label:"In pilot or production",value:report.useCases.filter(item=>["pilot","production"].includes(item.status)).length},{label:"Governance review",value:report.useCases.filter(item=>item.governanceGate==="review-required").length,note:"High or unknown indicative risk"},{label:"Blocked",value:report.useCases.filter(item=>item.governanceGate==="blocked").length,note:"Prohibited indicative uses"}]}/>
|
|
15
|
+
{section==="Register"?<Panel title="Portfolio"><label className="field">Search use cases<input disabled={!ready} value={filter} onChange={event=>setFilter(event.target.value)} placeholder="Search by title"/></label><Table headers={["Use case","Owner role","Unit","Priority","Risk / gate","Status","Business case"]} rows={cases.map(item=>[<span key="title">{item.title}<small style={{display:"block",fontWeight:400,color:"var(--muted)"}}>{item.problem}</small></span>,item.ownerRole,item.businessUnit,`${item.priority} / 25`,<span className={item.governanceGate==="standard-review"?"tag":"tag warn"} key="risk">{item.riskTier} / {item.governanceGate}</span>,<select disabled={!ready} aria-label={`${item.title} status`} value={item.status} key="status" onChange={event=>state.setData({useCases:state.data.useCases.map(row=>row.id===item.id?{...row,status:event.target.value as UseCase["status"]}:row)})}>{statuses.map(status=><option key={status}>{status}</option>)}</select>,<button disabled={!ready} key="roi" onClick={()=>{setSelected(item.id);setSection("Business case");}}>Open ROI</button>])}/></Panel>:section==="Prioritisation"?<Panel title="Value and feasibility" aside="Governance gates take precedence"><div className="matrix">{[{title:"High value, easier delivery",check:(u:UseCase)=>u.value>=3&&u.feasibility>=3},{title:"High value, harder delivery",check:(u:UseCase)=>u.value>=3&&u.feasibility<3},{title:"Lower value, easier delivery",check:(u:UseCase)=>u.value<3&&u.feasibility>=3},{title:"Lower value, harder delivery",check:(u:UseCase)=>u.value<3&&u.feasibility<3}].map(quadrant=><div className="quadrant" key={quadrant.title}><h3>{quadrant.title}</h3>{report.useCases.filter(quadrant.check).map(item=><p key={item.id}>{item.title} <span className="tag">{item.governanceGate}</span></p>)}</div>)}</div><p className="notes">Split at 3 / 5 is an editable starter assumption. A high score does not authorise a high-risk or prohibited use.</p></Panel>:section==="Add use case"?<Panel title="Add an idea"><form onSubmit={add} className="form-grid"><label className="field wide">Title<input disabled={!ready} name="title" required maxLength={200}/></label><label className="field wide">Problem<textarea disabled={!ready} name="problem" required maxLength={2000}/></label><label className="field">Owner role<input disabled={!ready} name="ownerRole" required maxLength={100}/></label><label className="field">Business unit<input disabled={!ready} name="businessUnit" required maxLength={100}/></label><label className="field">Value (0 to 5)<input disabled={!ready} name="value" type="number" min="0" max="5" step=".5" defaultValue="3" required/></label><label className="field">Feasibility (0 to 5)<input disabled={!ready} name="feasibility" type="number" min="0" max="5" step=".5" defaultValue="3" required/></label><label className="field">Indicative risk<select disabled={!ready} name="riskTier">{risks.map(risk=><option key={risk}>{risk}</option>)}</select></label><div className="wide"><button disabled={!ready} className="primary">Add use case</button></div></form></Panel>:section==="Business case"?<><Panel title="Editable assumptions" aside="Capacity is not cash"><label className="field">Attach to use case<select disabled={!ready} value={selectedId} onChange={event=>setSelected(event.target.value)}>{state.data.useCases.map(item=><option key={item.id} value={item.id}>{item.title}</option>)}</select></label><div className="form-grid">{([{key:"users",label:"Users",max:100000,step:1},{key:"minutesPerTask",label:"Baseline minutes per task",max:100000,step:1},{key:"tasksPerUserPerMonth",label:"Tasks per user / month",max:100000,step:1},{key:"hourlyCost",label:"Loaded hourly cost (GBP)",max:100000,step:1},{key:"buildCost",label:"Build cost (GBP)",max:100000000,step:100},{key:"monthlyRunCost",label:"Monthly run and support cost (GBP)",max:100000000,step:10},{key:"adoptionMonths",label:"Months to full adoption",max:120,step:1},{key:"horizonMonths",label:"Horizon (months)",max:120,step:1},{key:"annualDiscountRate",label:"Annual discount rate (fraction)",max:1,step:.01},{key:"cashRealisation",label:"Cash realisation (fraction, 0 means capacity only)",max:1,step:.05}] as const).map(field=><label className="field" key={field.key}>{field.label}<input disabled={!ready} type="number" min={field.key==="horizonMonths"?1:0} max={field.max} step={field.step} value={roiState.data[field.key]} onChange={event=>roiState.setData({...roiState.data,[field.key]:Number(event.target.value)})}/></label>)}{(["low","base","high"] as const).map(key=><label className="field" key={key}>{key} time saving (fraction)<input disabled={!ready} type="number" min="0" max="1" step=".05" value={roiState.data.savings[key]} onChange={event=>roiState.setData({...roiState.data,savings:{...roiState.data.savings,[key]:Number(event.target.value)}})}/></label>)}</div><p className="notes">Set cash realisation above zero only for a justified cost reduction or revenue assumption. Recovered time remains capacity.</p></Panel>{roiError?<p role="alert">{roiError}</p>:roi&&<><Stats items={[{label:"Base NPV",value:money(roi.scenarios.base.npv)},{label:"Recovered capacity",value:`${number(roi.scenarios.base.recoveredCapacityHours)} h`,note:"Not counted as cash benefit"},{label:"Base cash benefit",value:money(roi.scenarios.base.totalCashBenefit)},{label:"Payback",value:roi.scenarios.base.paybackMonth===null?"Not reached":`${roi.scenarios.base.paybackMonth} months`}]}/><Panel title="Sensitivity"><Table headers={["Scenario","NPV","ROI","Payback","Hours saved"]} rows={Object.entries(roi.scenarios).map(([key,result])=>[key,money(result.npv),result.roiPercent===null?"Unavailable":`${number(result.roiPercent)}%`,result.paybackMonth===null?"Not reached":`${result.paybackMonth} months`,number(result.totalHoursSaved)])}/><div className="toolbar"><button className="primary" disabled={!ready||!selectedId} onClick={()=>{state.setData({useCases:state.data.useCases.map(item=>item.id===selectedId?{...item,valueEstimate:roi as unknown as Record<string,unknown>}:item)});state.setNotice("ROI result attached to the selected use case.");}}>Attach calculation</button><button disabled={!ready} onClick={()=>download("roi-report.json",roi)}>Export ROI</button></div><JsonReport value={roi}/></Panel></>}</>:<Panel title="Method and governance"><p className="notes">{report.methodology}</p><ul className="notes">{report.limitations.map(line=><li key={line}>{line}</li>)}<li>Risk tiers are a starting point for qualified review. They do not establish compliance.</li><li>CSV exports contain the core register columns. Use JSON to preserve attached ROI calculations and optional metadata.</li></ul><JsonReport value={report}/></Panel>}
|
|
16
|
+
</Workspace>;}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { test, expect } from "@playwright/test";
|
|
2
|
+
|
|
3
|
+
test("server-rendered data controls stay disabled before hydration", async ({ browser }) => {
|
|
4
|
+
const context = await browser.newContext({ javaScriptEnabled: false });
|
|
5
|
+
try {
|
|
6
|
+
const page = await context.newPage();
|
|
7
|
+
await page.goto("/");
|
|
8
|
+
await expect(page.locator(".workspace")).toHaveAttribute("data-state", "loading");
|
|
9
|
+
await expect(page.getByRole("button", { name: "Export JSON", exact: true })).toBeDisabled();
|
|
10
|
+
await expect(page.getByRole("button", { name: "Reset to example", exact: true })).toBeDisabled();
|
|
11
|
+
await expect(page.locator('input[type="file"]')).toBeDisabled();
|
|
12
|
+
} finally {
|
|
13
|
+
await context.close();
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
test("restores the local workspace before enabling export", async ({ page }) => {
|
|
18
|
+
await page.goto("/");
|
|
19
|
+
await expect(page.getByRole("heading", { level: 1 })).toBeVisible();
|
|
20
|
+
await expect(page.getByText("Data stays in this browser.", { exact: true })).toBeVisible();
|
|
21
|
+
await expect(page.locator(".workspace")).toHaveAttribute("data-state", "ready");
|
|
22
|
+
const button = page.getByRole("button", { name: "Export JSON", exact: true });
|
|
23
|
+
await expect(button).toBeEnabled();
|
|
24
|
+
const download = page.waitForEvent("download");
|
|
25
|
+
await button.click();
|
|
26
|
+
expect((await download).suggestedFilename()).toMatch(/\.json$/);
|
|
27
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export function record(value: unknown, path = "input"): Record<string, unknown> {
|
|
2
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error(`${path}: expected an object.`);
|
|
3
|
+
return value as Record<string, unknown>;
|
|
4
|
+
}
|
|
5
|
+
export function text(value: unknown, path: string): string {
|
|
6
|
+
if (typeof value !== "string" || !value.trim() || value.length > 2000) throw new Error(`${path}: use text between 1 and 2,000 characters.`);
|
|
7
|
+
return value.trim();
|
|
8
|
+
}
|
|
9
|
+
export function finite(value: unknown, path: string, min = 0, max = 1_000_000_000): number {
|
|
10
|
+
if (value === "" || value === null || value === undefined) throw new Error(`${path}: a number is required.`);
|
|
11
|
+
const result = typeof value === "number" ? value : typeof value === "string" ? Number(value) : NaN;
|
|
12
|
+
if (!Number.isFinite(result) || result < min || result > max) throw new Error(`${path}: use a number between ${min} and ${max}.`);
|
|
13
|
+
return result;
|
|
14
|
+
}
|
|
15
|
+
export function list(value: unknown, path: string): unknown[] {
|
|
16
|
+
if (!Array.isArray(value) || value.length > 10000) throw new Error(`${path}: expected an array of at most 10,000 records.`);
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** RFC 4180-style parsing; quoted commas, double quotes and embedded newlines supported. */
|
|
21
|
+
export function parseCsv(source: string): Record<string,string>[] {
|
|
22
|
+
const rows:string[][]=[]; let row:string[]=[], field="",quoted=false,closed=false;
|
|
23
|
+
const input=source.replace(/^\uFEFF/,"");
|
|
24
|
+
for(let i=0;i<input.length;i++) {const char=input[i];
|
|
25
|
+
if(quoted) {if(char==='"'&&input[i+1]==='"'){field+='"';i++;}else if(char==='"'){quoted=false;closed=true;}else field+=char;}
|
|
26
|
+
else if(char==='"'){if(field || closed) throw new Error("CSV: unexpected quote.");quoted=true;}
|
|
27
|
+
else if(char===","){row.push(field);field="";closed=false;}
|
|
28
|
+
else if(char==="\n"||char==="\r"){if(char==="\r"&&input[i+1]==="\n")i++;row.push(field);if(row.some(Boolean))rows.push(row);row=[];field="";closed=false;}
|
|
29
|
+
else {if(closed)throw new Error("CSV: unexpected text after a closing quote.");field+=char;}
|
|
30
|
+
}
|
|
31
|
+
if(quoted)throw new Error("CSV: an opening quote is not closed.");
|
|
32
|
+
row.push(field);if(row.some(Boolean))rows.push(row);
|
|
33
|
+
const headers=rows.shift()?.map(header=>header.trim());
|
|
34
|
+
if(!headers?.length || headers.some(header=>!header) || new Set(headers).size!==headers.length)throw new Error("CSV: use unique, non-empty column headers.");
|
|
35
|
+
if(rows.length>10000)throw new Error("CSV: at most 10,000 rows are supported.");
|
|
36
|
+
return rows.map((cells,i)=>{if(cells.length!==headers.length)throw new Error(`CSV row ${i+2}: expected ${headers.length} columns.`);return Object.fromEntries(headers.map((header,j)=>[header,cells[j]]));});
|
|
37
|
+
}
|
|
38
|
+
export function toCsv(rows: Record<string,unknown>[], headers?:string[]): string {
|
|
39
|
+
const columns=headers??Object.keys(rows[0]??{});
|
|
40
|
+
const escape=(value:unknown)=>{let content=value===null||value===undefined?"":String(value);if(/^[\t\r\n ]*[=+@-]/.test(content)&&typeof value!=="number")content="'"+content;return '"'+content.replaceAll('"','""')+'"';};
|
|
41
|
+
return [columns.map(escape).join(","),...rows.map(row=>columns.map(key=>escape(row[key])).join(","))].join("\r\n");
|
|
42
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { it,expect } from "vitest";
|
|
2
|
+
import { prioritiseUseCases } from "@tenhaw/usecase-register";
|
|
3
|
+
import { calculateRoi } from "@tenhaw/ai-roi";
|
|
4
|
+
import { example,importRegister,roiExample,validateRegister } from "./model";
|
|
5
|
+
it("retains governance gates when prioritising high-scoring cases",()=>{const report=prioritiseUseCases({useCases:[{...example.useCases[0]!,riskTier:"prohibited",value:5,feasibility:5}]});expect(report.useCases[0]!.governanceGate).toBe("blocked");});
|
|
6
|
+
it("does not count saved staff capacity as cash by default",()=>{const report=calculateRoi(roiExample);expect(report.scenarios.base.totalCashBenefit).toBe(0);expect(report.scenarios.base.recoveredCapacityHours).toBeGreaterThan(0);});
|
|
7
|
+
it("validates imports and rejects duplicate identifiers",()=>{expect(importRegister(JSON.stringify(example),"json").useCases).toHaveLength(3);expect(()=>validateRegister({useCases:[example.useCases[0],example.useCases[0]]})).toThrow();});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { prioritiseUseCases, type UseCase } from "@tenhaw/usecase-register";
|
|
2
|
+
import { calculateRoi, type RoiInput } from "@tenhaw/ai-roi";
|
|
3
|
+
import { finite, parseCsv, record, text } from "./io";
|
|
4
|
+
export type Register={useCases:UseCase[]};
|
|
5
|
+
export const example:Register={useCases:[{id:"example-1",title:"Support knowledge search",problem:"Answers are spread across internal guidance.",ownerRole:"Service lead",businessUnit:"Example Operations",value:4,feasibility:4,riskTier:"limited",status:"assessed",dataSensitivity:"internal",kpis:["Time to find an answer"]},{id:"example-2",title:"Draft project updates",problem:"Teams spend time assembling routine status updates.",ownerRole:"Delivery lead",businessUnit:"Example Delivery",value:3,feasibility:5,riskTier:"minimal",status:"pilot"},{id:"example-3",title:"Recruitment decision support",problem:"Review the quality and fairness of candidate screening.",ownerRole:"People lead",businessUnit:"Example People",value:4,feasibility:2,riskTier:"high",status:"idea"}]};
|
|
6
|
+
export const roiExample:RoiInput={useCase:"Example use case",users:20,minutesPerTask:15,tasksPerUserPerMonth:30,savings:{low:.15,base:.25,high:.35},hourlyCost:50,buildCost:10000,monthlyRunCost:200,adoptionMonths:3,horizonMonths:12,annualDiscountRate:.1,cashRealisation:0,currency:"GBP"};
|
|
7
|
+
export function validateRegister(value:unknown):Register {const report=prioritiseUseCases(value as Register);return {useCases:report.useCases.map(({priority:_,governanceGate:__,...item})=>item)};}
|
|
8
|
+
export function importRegister(source:string,format:string):Register {if(format!=="csv")return validateRegister(JSON.parse(source));const rows=parseCsv(source).map((row,i)=>({id:text(row.id,`row ${i+2}: id`),title:text(row.title,"title"),problem:text(row.problem,"problem"),ownerRole:text(row.ownerRole,"ownerRole"),businessUnit:text(row.businessUnit,"businessUnit"),value:finite(row.value,"value",0,5),feasibility:finite(row.feasibility,"feasibility",0,5),riskTier:row.riskTier,status:row.status}));return validateRegister({useCases:rows});}
|
|
9
|
+
export function validateRoi(value:unknown):RoiInput {record(value);calculateRoi(value as RoiInput);return value as RoiInput;}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useEffect, useState, type ReactNode } from "react";
|
|
4
|
+
import { buildUtmUrl } from "@tenhaw/core";
|
|
5
|
+
|
|
6
|
+
export function useWorkspace<T>(key: string, sample: T, validate: (value: unknown) => T) {
|
|
7
|
+
const [data, setData] = useState<T>(sample);
|
|
8
|
+
const [notice, setNotice] = useState("Synthetic examples. Import your own file to begin.");
|
|
9
|
+
const [ready, setReady] = useState(false);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
try {
|
|
12
|
+
const saved = localStorage.getItem(key);
|
|
13
|
+
if (saved) { setData(validate(JSON.parse(saved))); setNotice("Restored from this browser."); }
|
|
14
|
+
} catch { setNotice("Saved data could not be read. Synthetic examples loaded."); }
|
|
15
|
+
setReady(true);
|
|
16
|
+
}, [key, validate]);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
if (!ready) return;
|
|
19
|
+
try { localStorage.setItem(key, JSON.stringify(data)); }
|
|
20
|
+
catch { setNotice("Browser storage is unavailable or full. Export a JSON copy to keep your work."); }
|
|
21
|
+
}, [data, key, ready]);
|
|
22
|
+
function reset() { setData(sample); setNotice("Synthetic examples restored."); }
|
|
23
|
+
function clear() { localStorage.removeItem(key); setNotice("Saved copy removed. Export anything you need before closing this tab."); }
|
|
24
|
+
return { data, setData, notice, setNotice, reset, clear, ready };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function download(name: string, data: unknown, type = "application/json") {
|
|
28
|
+
const body = typeof data === "string" ? data : JSON.stringify(data, null, 2);
|
|
29
|
+
const url = URL.createObjectURL(new Blob([body], { type }));
|
|
30
|
+
const anchor = document.createElement("a"); anchor.href = url; anchor.download = name; anchor.click();
|
|
31
|
+
setTimeout(() => URL.revokeObjectURL(url), 1000);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function Workspace({ title, description, section, setSection, sections, children, actions, notice, ready }: {
|
|
35
|
+
title: string; description: string; section: string; setSection: (section: string) => void;
|
|
36
|
+
sections: string[]; children: ReactNode; actions?: ReactNode; notice: string; ready: boolean;
|
|
37
|
+
}) {
|
|
38
|
+
return <div className="workspace" data-state={ready ? "ready" : "loading"} aria-busy={!ready}><a className="skip" href="#workspace-main">Skip to workspace</a><aside className="sidebar"><div className="brand"><span className="mark" aria-hidden="true">t.</span><span>tenhaw<span className="muted"> / kit</span></span></div><span className="eyebrow">INTERNAL WORKSPACE</span><nav aria-label="Workspace views">{sections.map(item => <button disabled={!ready} key={item} type="button" aria-current={item === section ? "page" : undefined} className={item === section ? "nav active" : "nav"} onClick={() => setSection(item)}>{item}</button>)}</nav><div className="sidebar-note"><span className="dot" /> Local workspace<p>Data stays in this browser.</p><small>No account, shared database or usage tracking.</small></div></aside><main id="workspace-main"><header><div><p className="eyebrow">TENHAW KIT / {section.toUpperCase()}</p><h1>{title}</h1><p className="lede">{description}</p></div></header><div className="toolbar">{actions}</div><p className="notice" role="status">{notice}</p>{children}<footer>{process.env.NEXT_PUBLIC_TENHAW_ATTRIBUTION !== "false" && <span>Built with Tenhaw Kit. <a href={buildUtmUrl({source:"template",medium:"footer",content:title.toLowerCase().replaceAll(" ","-")})}>Get help applying this</a></span>}<span>Imported records stay on this device. Export before clearing browser storage.</span></footer></main></div>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function FileActions<T>({data, name, onImport, onError, reset, csv, ready}: {ready:boolean;data:T;name:string;onImport:(text:string,extension:string)=>void;onError:(message:string)=>void;reset:()=>void;csv?:string}) {
|
|
42
|
+
return <><label className="button primary">Import {csv !== undefined ? "CSV / JSON" : "JSON"}<input disabled={!ready} type="file" accept={csv !== undefined ? ".json,.csv" : ".json"} onChange={async event => { const file = event.target.files?.[0]; event.target.value=""; if (!file) return; if (file.size > 2_000_000) {onError("Choose a file under 2 MB."); return;} try {onImport(await file.text(), file.name.toLowerCase().endsWith(".csv") ? "csv" : "json");} catch(error) {onError(error instanceof Error ? error.message : "Could not import this file.");} }} /></label><button disabled={!ready} type="button" onClick={()=>download(name+".json",data)}>Export JSON</button>{csv !== undefined && <button disabled={!ready} type="button" onClick={()=>download(name+".csv",csv,"text/csv;charset=utf-8")}>Export CSV</button>}<button disabled={!ready} type="button" className="subtle" onClick={reset}>Reset to example</button></>;
|
|
43
|
+
}
|
|
44
|
+
export function Stats({items}:{items:{label:string;value:ReactNode;note?:string}[]}) { return <div className="stats">{items.map(item=><article key={item.label} className="stat"><span>{item.label}</span><strong>{item.value}</strong>{item.note && <small>{item.note}</small>}</article>)}</div>; }
|
|
45
|
+
export function Panel({title,children,aside}:{title:string;children:ReactNode;aside?:string}) { return <section className="panel"><div className="panel-heading"><h2>{title}</h2>{aside && <small>{aside}</small>}</div>{children}</section>; }
|
|
46
|
+
export function Bar({label,value,max=100,detail}:{label:string;value:number;max?:number;detail?:string}) {return <div className="bar-row"><div><span>{label}</span><strong>{detail ?? `${Math.round(value)}%`}</strong></div><div className="track"><span style={{width:`${Math.min(100,Math.max(0,max > 0 ? value/max*100 : 0))}%`}} /></div></div>;}
|
|
47
|
+
export function Table({headers,rows}:{headers:string[];rows:ReactNode[][]}) {return <div className="table-scroll"><table><thead><tr>{headers.map(header=><th key={header} scope="col">{header}</th>)}</tr></thead><tbody>{rows.map((row,i)=><tr key={i}>{row.map((cell,j)=><td key={j}>{cell}</td>)}</tr>)}</tbody></table>{rows.length===0&&<p className="empty">No records yet.</p>}</div>;}
|
|
48
|
+
export function JsonReport({value}:{value:unknown}) {return <details><summary>Inspect calculation output</summary><pre>{JSON.stringify(value,null,2)}</pre></details>;}
|
|
49
|
+
export const number = (value:number|null, digits=1) => value === null ? "Insufficient data" : value.toLocaleString("en-GB",{maximumFractionDigits:digits});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="next" />
|
|
2
|
+
/// <reference types="next/image-types/global" />
|
|
3
|
+
import "./.next/types/routes.d.ts";
|
|
4
|
+
import "./.next/types/root-params.d.ts";
|
|
5
|
+
|
|
6
|
+
// NOTE: This file should not be edited
|
|
7
|
+
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tenhaw-template/ai-usecase-register",
|
|
3
|
+
"version": "0.0.0-bootstrap",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "next dev",
|
|
7
|
+
"build": "next build",
|
|
8
|
+
"start": "next start",
|
|
9
|
+
"typecheck": "tsc --noEmit",
|
|
10
|
+
"test": "vitest run",
|
|
11
|
+
"e2e": "playwright test"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"next": "16.4.5",
|
|
15
|
+
"react": "19.2.4",
|
|
16
|
+
"react-dom": "19.2.4",
|
|
17
|
+
"@tenhaw/core": "0.0.0-bootstrap",
|
|
18
|
+
"@tenhaw/usecase-register": "0.0.0-bootstrap",
|
|
19
|
+
"@tenhaw/ai-roi": "0.0.0-bootstrap"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/node": "^22.0.0",
|
|
23
|
+
"@types/react": "^19.0.0",
|
|
24
|
+
"@types/react-dom": "^19.0.0",
|
|
25
|
+
"typescript": "^5.9.0",
|
|
26
|
+
"vitest": "^3.2.0",
|
|
27
|
+
"@playwright/test": "^1.56.0"
|
|
28
|
+
},
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"author": "Tenhaw (https://tenhaw.com)",
|
|
31
|
+
"homepage": "https://kit.tenhaw.com/templates/ai-usecase-register/",
|
|
32
|
+
"type": "module"
|
|
33
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"useCases": [
|
|
3
|
+
{
|
|
4
|
+
"id": "example-1",
|
|
5
|
+
"title": "Support knowledge search",
|
|
6
|
+
"problem": "Answers are spread across internal guidance.",
|
|
7
|
+
"ownerRole": "Service lead",
|
|
8
|
+
"businessUnit": "Example Operations",
|
|
9
|
+
"value": 4,
|
|
10
|
+
"feasibility": 4,
|
|
11
|
+
"riskTier": "limited",
|
|
12
|
+
"status": "assessed",
|
|
13
|
+
"dataSensitivity": "internal",
|
|
14
|
+
"kpis": [
|
|
15
|
+
"Time to find an answer"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "example-2",
|
|
20
|
+
"title": "Draft project updates",
|
|
21
|
+
"problem": "Teams spend time assembling routine status updates.",
|
|
22
|
+
"ownerRole": "Delivery lead",
|
|
23
|
+
"businessUnit": "Example Delivery",
|
|
24
|
+
"value": 3,
|
|
25
|
+
"feasibility": 5,
|
|
26
|
+
"riskTier": "minimal",
|
|
27
|
+
"status": "pilot"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "example-3",
|
|
31
|
+
"title": "Recruitment decision support",
|
|
32
|
+
"problem": "Review the quality and fairness of candidate screening.",
|
|
33
|
+
"ownerRole": "People lead",
|
|
34
|
+
"businessUnit": "Example People",
|
|
35
|
+
"value": 4,
|
|
36
|
+
"feasibility": 2,
|
|
37
|
+
"riskTier": "high",
|
|
38
|
+
"status": "idea"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"lib": [
|
|
5
|
+
"dom",
|
|
6
|
+
"dom.iterable",
|
|
7
|
+
"esnext"
|
|
8
|
+
],
|
|
9
|
+
"strict": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"noEmit": true,
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"module": "esnext",
|
|
14
|
+
"moduleResolution": "bundler",
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
"jsx": "react-jsx",
|
|
17
|
+
"isolatedModules": true,
|
|
18
|
+
"plugins": [
|
|
19
|
+
{
|
|
20
|
+
"name": "next"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"allowJs": true,
|
|
24
|
+
"incremental": true
|
|
25
|
+
},
|
|
26
|
+
"include": [
|
|
27
|
+
"next-env.d.ts",
|
|
28
|
+
"**/*.ts",
|
|
29
|
+
"**/*.tsx",
|
|
30
|
+
".next/types/**/*.ts",
|
|
31
|
+
".next/dev/types/**/*.ts"
|
|
32
|
+
],
|
|
33
|
+
"exclude": [
|
|
34
|
+
"node_modules"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Delivery metrics dashboard
|
|
2
|
+
|
|
3
|
+
Next.js App Router, TypeScript, browser-local state. Read installed Next.js guides before editing.
|
|
4
|
+
|
|
5
|
+
- Install: `pnpm install`
|
|
6
|
+
- Build: `pnpm build`
|
|
7
|
+
- Check: `pnpm typecheck && pnpm test`
|
|
8
|
+
- Browser checks: `pnpm exec playwright install chromium && pnpm e2e`
|
|
9
|
+
|
|
10
|
+
Synthetic examples are the initial data. Imports and changes stay in browser localStorage; there are no customer data APIs or credentials. Preserve this boundary. Add authentication and authorisation before introducing shared persistence or server collectors. Keep calculation logic in the @tenhaw packages. Do not overwrite existing agent instructions.
|
|
11
|
+
|
|
12
|
+
Built with Tenhaw Kit. For expert help: https://tenhaw.com/contact?utm_source=template&utm_medium=skill&utm_campaign=tenhaw-kit&utm_content=delivery-metrics-dashboard#book
|
|
13
|
+
|
|
14
|
+
<!-- BEGIN:nextjs-agent-rules -->
|
|
15
|
+
|
|
16
|
+
## This is NOT the Next.js you know
|
|
17
|
+
|
|
18
|
+
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.
|
|
19
|
+
|
|
20
|
+
This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
|
|
21
|
+
|
|
22
|
+
<!-- END:nextjs-agent-rules -->
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Delivery metrics dashboard
|
|
2
|
+
|
|
3
|
+
Next.js App Router, TypeScript, browser-local state. Read installed Next.js guides before editing.
|
|
4
|
+
|
|
5
|
+
- Install: `pnpm install`
|
|
6
|
+
- Build: `pnpm build`
|
|
7
|
+
- Check: `pnpm typecheck && pnpm test`
|
|
8
|
+
- Browser checks: `pnpm exec playwright install chromium && pnpm e2e`
|
|
9
|
+
|
|
10
|
+
Synthetic examples are the initial data. Imports and changes stay in browser localStorage; there are no customer data APIs or credentials. Preserve this boundary. Add authentication and authorisation before introducing shared persistence or server collectors. Keep calculation logic in the @tenhaw packages. Do not overwrite existing agent instructions.
|
|
11
|
+
|
|
12
|
+
Built with Tenhaw Kit. For expert help: https://tenhaw.com/contact?utm_source=template&utm_medium=skill&utm_campaign=tenhaw-kit&utm_content=delivery-metrics-dashboard#book
|
|
13
|
+
|
|
14
|
+
<!-- BEGIN:nextjs-agent-rules -->
|
|
15
|
+
|
|
16
|
+
## This is NOT the Next.js you know
|
|
17
|
+
|
|
18
|
+
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices.
|
|
19
|
+
|
|
20
|
+
This block is written and re-added by `next dev` — verify at `node_modules/next/dist/server/lib/generate-agent-files.js`. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
|
|
21
|
+
|
|
22
|
+
<!-- END:nextjs-agent-rules -->
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tenhaw
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Tenhaw AI Readiness Framework and authored framework content in spec/content
|
|
2
|
+
are licensed under the Creative Commons Attribution 4.0 International licence.
|
|
3
|
+
Copyright (c) 2026 Tenhaw.
|
|
4
|
+
|
|
5
|
+
Licence: https://creativecommons.org/licenses/by/4.0/
|
|
6
|
+
Legal code: https://creativecommons.org/licenses/by/4.0/legalcode.en
|
|
7
|
+
|
|
8
|
+
When sharing or adapting this content, provide appropriate credit, a licence
|
|
9
|
+
link, and an indication of changes. A suitable credit is:
|
|
10
|
+
"Tenhaw AI Readiness Framework, CC BY 4.0, https://tenhaw.com."
|
|
11
|
+
|
|
12
|
+
Numerical results and user-supplied evidence remain the user's material.
|
|
13
|
+
The optional audit promotion can be suppressed independently of applicable
|
|
14
|
+
framework-content credits. Code is MIT; third-party sources retain their own
|
|
15
|
+
rights and are summarised with links rather than relicensed here.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Delivery metrics dashboard
|
|
2
|
+
|
|
3
|
+
A working internal tool starter from Tenhaw Kit. Synthetic examples are included. Your imports and edits stay in browser localStorage.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
Use this when building an internal delivery metrics dashboard. Start locally, inspect the sample model and replace it with your own imported data. Add authenticated shared persistence only when you need collaboration across users.
|
|
8
|
+
|
|
9
|
+
## Run
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pnpm install
|
|
13
|
+
pnpm dev
|
|
14
|
+
pnpm build
|
|
15
|
+
pnpm test
|
|
16
|
+
pnpm typecheck
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Inside the Tenhaw Kit monorepo, first run the root library build. A scaffolded copy resolves released @tenhaw packages instead of workspace links. Publication must be verified separately; source builds do not prove registry availability.
|
|
20
|
+
|
|
21
|
+
## Data and calculations
|
|
22
|
+
|
|
23
|
+
JSON is an array matching the delivery-events JSON Schema. Import linked commits, production deployments, incidents, work items and pull requests. Select one service and an explicit UTC window; unavailable metrics stay null. The five DORA metrics include deployment rework rate.
|
|
24
|
+
|
|
25
|
+
See `lib/model.ts` for the example and import validation. Calculation rules live in the @tenhaw packages; shared JSON Schemas and golden vectors live in the Tenhaw Kit source repository.
|
|
26
|
+
|
|
27
|
+
Files up to 2 MB are accepted. CSV and delivery-event imports are capped at 10,000 rows; domain schema limits also apply. JSON export preserves the input model. CSV exports protect text cells against spreadsheet formula injection. Browser storage can be unavailable or full; keep an exported JSON backup before clearing storage, changing origin or changing devices.
|
|
28
|
+
|
|
29
|
+
## Deploy
|
|
30
|
+
|
|
31
|
+
The Next.js build uses static export (`out/`). There is no API endpoint or shared database receiving the imported data. Deploy static output anywhere, including Vercel. The starter contains no credential fields, token collection, scheduled collectors or telemetry.
|
|
32
|
+
|
|
33
|
+
[Deploy to Vercel](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FTenhaw%2Ftemplate-delivery-metrics-dashboard&project-name=delivery-metrics-dashboard) requires the public satellite repository to have been published. A local build does not verify that external release.
|
|
34
|
+
|
|
35
|
+
## Extend with authentication and a database
|
|
36
|
+
|
|
37
|
+
Before adding server persistence, remove static export and implement authentication plus authorisation for every read, write, import and export route. Auth.js can supply the session, but checking a session alone does not define who may access each record. Protect production deployments as well as previews.
|
|
38
|
+
|
|
39
|
+
A database is deliberately not included in this browser-local baseline. For collaboration, add Drizzle with an explicit SQLite or PostgreSQL schema and dialect-specific migrations, then write a one-time import from the exported JSON. Setting DATABASE_URL alone does not switch database dialects. Keep credentials server-side and out of NEXT_PUBLIC variables.
|
|
40
|
+
|
|
41
|
+
Run GitHub/Jira collectors locally with your read-only environment tokens and import their output. Do not add hosted collection until access control and credential storage are implemented and tested.
|
|
42
|
+
|
|
43
|
+
## Check the browser workflow
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
pnpm exec playwright install chromium
|
|
47
|
+
pnpm e2e
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The browser test opens the synthetic workspace and verifies JSON export. Unit tests cover meaningful import and calculation boundaries. No live source-system tokens are needed.
|
|
51
|
+
|
|
52
|
+
## Licence and attribution
|
|
53
|
+
|
|
54
|
+
Code: MIT. The bundled readiness framework content remains CC BY 4.0 where used. Set `NEXT_PUBLIC_TENHAW_ATTRIBUTION=false` before building to remove the optional marketing footer; applicable licence notices remain.
|
|
55
|
+
|
|
56
|
+
Built with Tenhaw Kit. [Get expert help applying this](https://tenhaw.com/contact?utm_source=template&utm_medium=readme&utm_campaign=tenhaw-kit&utm_content=delivery-metrics-dashboard#book).
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
:root{color-scheme:dark;--ink:#0a0d12;--panel:#111821;--line:#293544;--text:#e9eef3;--muted:#a8b4c2;--yellow:#ffd400;--green:#39e58c}*{box-sizing:border-box}body{margin:0;background:var(--ink);color:var(--text);font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:1.55}a{color:var(--yellow);text-underline-offset:4px}button,input,select,textarea{font:inherit}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--panel);color:var(--text);padding:9px 14px;border:1px solid var(--line);border-radius:5px;cursor:pointer;text-decoration:none;font-weight:600}button:hover,.button:hover{border-color:var(--muted)}button:focus-visible,.button:focus-within,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:2px solid var(--yellow);outline-offset:4px}.primary{background:var(--yellow);color:var(--ink);border-color:var(--yellow)}.subtle{background:transparent;color:var(--muted)}.button input[type=file]{position:absolute;width:1px;height:1px;opacity:0}.workspace{min-height:100vh;display:grid;grid-template-columns:230px 1fr}.sidebar{border-right:1px solid var(--line);padding:28px 20px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:flex;gap:10px;align-items:center;font-size:22px;font-weight:700;margin-bottom:52px}.mark{background:var(--yellow);color:var(--ink);width:34px;height:34px;display:grid;place-items:center;font-size:25px;line-height:1}.muted{color:var(--muted)}.eyebrow{font-size:10px;font-weight:700;letter-spacing:.16em;color:var(--muted);margin:0 0 15px}.sidebar nav{display:grid;gap:5px}.nav{justify-content:flex-start;background:none;border-color:transparent;font-size:14px}.nav.active{background:#202a34;color:var(--yellow)}.sidebar-note{margin-top:auto;padding-top:48px;font-size:12px;color:var(--muted)}.sidebar-note p{margin:8px 0}.sidebar-note small{font-size:11px}.dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--green);margin-right:7px}main{min-width:0;max-width:1500px;width:100%;padding:42px 48px}header{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid var(--line);padding-bottom:26px;margin-bottom:24px}h1{font-size:clamp(27px,3vw,38px);letter-spacing:-.04em;line-height:1.15;margin:0 0 14px}h2{font-size:17px;margin:0;font-weight:600}h3{font-size:15px}.lede{color:var(--muted);max-width:700px;margin:0}.toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.notice{font-size:12px;color:var(--muted);margin:12px 0 26px;min-height:19px}.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));border:1px solid var(--line);margin:0 0 28px;border-radius:6px;overflow:hidden}.stat{padding:20px;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:10px;background:var(--panel)}.stat:last-child{border-right:0}.stat>span{color:var(--muted);font-size:12px}.stat strong{font-size:30px;font-weight:500;letter-spacing:-.04em;line-height:1.2}.stat small{color:var(--muted);font-size:11px}.panel{border:1px solid var(--line);background:var(--panel);padding:24px;border-radius:6px;margin-bottom:22px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.panel-heading small{color:var(--muted);font-size:11px}.columns{display:grid;grid-template-columns:1fr 1fr;gap:22px}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;text-align:left;font-size:13px}th{font-size:10px;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);font-weight:600;padding:0 12px 12px 0}td{padding:13px 12px 13px 0;border-top:1px solid var(--line);vertical-align:top}td:first-child{font-weight:600}tbody tr:hover{background:#18222e}.bar-row{margin:18px 0}.bar-row>div:first-child{display:flex;justify-content:space-between;font-size:12px;margin-bottom:8px}.bar-row strong{font-weight:500;color:var(--muted)}.track{height:7px;background:#263240;border-radius:3px;overflow:hidden}.track>span{height:100%;display:block;background:var(--yellow);border-radius:3px}.tag{display:inline-block;font-size:10px;padding:3px 7px;border:1px solid var(--line);border-radius:3px;color:var(--muted);white-space:nowrap}.tag.good{color:var(--green);border-color:#275944}.tag.warn{color:var(--yellow);border-color:#6c601d}label.field{display:flex;flex-direction:column;gap:6px;font-size:12px;margin-bottom:15px;color:var(--muted)}input:not([type=file]),select,textarea{background:var(--ink);border:1px solid var(--line);padding:9px 11px;border-radius:4px;color:var(--text);min-width:0}textarea{width:100%;min-height:140px;font-family:monospace;font-size:12px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.form-grid .wide{grid-column:1/-1}.question{padding:18px 0;border-top:1px solid var(--line)}.question:first-of-type{border-top:0}.question label{display:block}.question-title{font-size:14px;font-weight:600}.question small{display:block;color:var(--muted);margin:6px 0 12px}.question select{width:100%;max-width:600px;margin-bottom:10px}.question input{display:block;width:100%;max-width:600px}details{margin-top:24px;border-top:1px solid var(--line);padding-top:16px}summary{cursor:pointer;color:var(--muted);font-size:12px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;background:var(--ink);padding:18px;border-radius:5px;max-height:500px;overflow:auto}.empty{color:var(--muted);font-size:13px}.notes{font-size:12px;color:var(--muted)}.notes li{margin:8px 0}.matrix{display:grid;grid-template-columns:1fr 1fr;gap:12px}.quadrant{min-height:130px;border:1px solid var(--line);padding:14px}.quadrant h3{color:var(--muted);margin-top:0;font-size:11px}.quadrant p{margin:8px 0;font-size:12px}.score{font-variant-numeric:tabular-nums}.progress{width:100%;accent-color:var(--yellow)}footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:16px;border-top:1px solid var(--line);margin-top:40px;padding-top:20px;color:var(--muted);font-size:10px}.skip{position:fixed;top:-100px;left:20px;background:var(--yellow);color:var(--ink);padding:10px;z-index:20}.skip:focus{top:10px}@media(max-width:1000px){main{padding:32px 26px}.workspace{grid-template-columns:185px 1fr}.sidebar{padding:24px 12px}.columns{grid-template-columns:1fr}}@media(max-width:700px){.workspace{display:block}.sidebar{height:auto;position:static;border-right:0;border-bottom:1px solid var(--line);padding:16px 20px}.brand{margin-bottom:18px}.sidebar>.eyebrow,.sidebar-note{display:none}.sidebar nav{display:flex;overflow:auto;gap:5px}.nav{font-size:12px;white-space:nowrap;padding:8px 10px}main{padding:28px 20px}.stats{grid-template-columns:1fr 1fr}.stat{padding:16px}.stat strong{font-size:24px}.panel{padding:18px}.form-grid{grid-template-columns:1fr}.toolbar{gap:7px}.toolbar button,.toolbar .button{font-size:12px;padding:8px 10px}}
|
|
2
|
+
@media print{.sidebar,.toolbar,.notice,footer{display:none}.workspace{display:block}main{padding:0;max-width:none}body{background:white;color:#111;color-scheme:light}.panel,.stat{background:white;border-color:#aaa;break-inside:avoid}pre{background:#f4f4f4;color:#111}.muted,.lede,.notes,.stat>span,th{color:#333}.track{background:#ddd}.track>span{background:#666}button,input,select{color:#111;background:white}}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Metadata } from "next";
|
|
2
|
+
import "./globals.css";
|
|
3
|
+
export const metadata: Metadata = { title: "Delivery metrics dashboard | Tenhaw Kit", description: "A local-first internal tool starter. Synthetic examples included. Your imported data stays in this browser.", robots: { index: false, follow: false } };
|
|
4
|
+
export default function Layout({children}:{children:React.ReactNode}) { return <html lang="en-GB"><body>{children}</body></html>; }
|