From 546e93e75243e2b50e2ae2bdfa638b94bc75c970 Mon Sep 17 00:00:00 2001 From: Yuvraj Sarathe Date: Sun, 31 May 2026 11:44:44 +0530 Subject: [PATCH 01/33] fix(00-preflight): replace Lovable metadata with KDM Ecosystem - Changed title from 'Lovable App' to 'KDM Ecosystem' - Updated description to ecosystem-neutral content - Removed 'author: Lovable' meta tag - Updated OG/twitter metadata to KDM Ecosystem - Removed twitter:site @Lovable reference --- src/routes/__root.tsx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx index dda85f6..b34d561 100644 --- a/src/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -73,14 +73,19 @@ export const Route = createRootRouteWithContext<{ queryClient: QueryClient }>()( meta: [ { charSet: "utf-8" }, { name: "viewport", content: "width=device-width, initial-scale=1" }, - { title: "Lovable App" }, - { name: "description", content: "Lovable Generated Project" }, - { name: "author", content: "Lovable" }, - { property: "og:title", content: "Lovable App" }, - { property: "og:description", content: "Lovable Generated Project" }, + { title: "KDM Ecosystem" }, + { + name: "description", + content: + "Open-source CLI ecosystem for Kubernetes and Docker monitoring.", + }, + { property: "og:title", content: "KDM Ecosystem" }, + { + property: "og:description", + content: "Monitor every pod and container from your terminal.", + }, { property: "og:type", content: "website" }, { name: "twitter:card", content: "summary" }, - { name: "twitter:site", content: "@Lovable" }, ], links: [ { rel: "icon", type: "image/png", href: logoUrl }, From 5f2796423540d0ab051f239de0c5b4193452e50e Mon Sep 17 00:00:00 2001 From: Yuvraj Sarathe Date: Sun, 31 May 2026 11:52:08 +0530 Subject: [PATCH 02/33] feat(01-product-config): create ProductConfig interface and supporting types - ProductFeature with icon (string), title, desc, cmd - ProductCommand with name, sig, desc, output - ProductStat with value, label - TerminalLine with optional prompt, out, blink - ProductMetadata for SEO/OG fields - ProductConfig combining all of the above --- src/config/products/types.ts | 53 ++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/config/products/types.ts diff --git a/src/config/products/types.ts b/src/config/products/types.ts new file mode 100644 index 0000000..920103d --- /dev/null +++ b/src/config/products/types.ts @@ -0,0 +1,53 @@ +export interface ProductFeature { + icon: string; + title: string; + desc: string; + cmd: string; +} + +export interface ProductCommand { + name: string; + sig: string; + desc: string; + output: string; +} + +export interface ProductStat { + value: string; + label: string; +} + +export interface TerminalLine { + prompt?: string; + text: string; + out?: boolean; + blink?: boolean; +} + +export interface ProductMetadata { + title: string; + description: string; + ogTitle: string; + ogDescription: string; +} + +export interface ProductConfig { + slug: string; + displayName: string; + brandName: string; + tagline: string; + description: string; + version: string; + installCommand: string; + githubUrl: string; + docsPath: string; + features: ProductFeature[]; + commands: ProductCommand[]; + stats: ProductStat[]; + terminalLines: TerminalLine[]; + ctaTagline: string; + ctaDescription: string; + ctaPrimaryText: string; + metadata: ProductMetadata; + copyright: string; +} From b3f42c4d9c31e50ed7fcad75af5e21c06ca3d321 Mon Sep 17 00:00:00 2001 From: Yuvraj Sarathe Date: Sun, 31 May 2026 11:52:15 +0530 Subject: [PATCH 03/33] feat(01-product-config): create kdm-cli product configuration - Full ProductConfig with exact content from existing components - 6 features with Lucide icon names, 4 commands, 3 stats - 9 terminal lines matching Terminal.tsx - Metadata for SEO, CTA content, copyright --- src/config/products/kdm.ts | 134 +++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 src/config/products/kdm.ts diff --git a/src/config/products/kdm.ts b/src/config/products/kdm.ts new file mode 100644 index 0000000..3c30520 --- /dev/null +++ b/src/config/products/kdm.ts @@ -0,0 +1,134 @@ +import type { ProductConfig } from "./types"; + +export const kdm: ProductConfig = { + slug: "kdm", + displayName: "KDM", + brandName: "kdm", + tagline: "Monitor every pod and container from your terminal.", + description: + "KDM is a cloud-native CLI that streams real-time health, logs, and metrics for Kubernetes clusters, Docker hosts, and Minikube — all from one unified command.", + version: "v2.4.0 — cloud sync now in beta", + installCommand: "npm install -g kdm-cli", + githubUrl: "https://github.com/KDM-cli/kdm-cli", + docsPath: "/kdm/docs", + + features: [ + { + icon: "Eye", + title: "Unified visibility", + desc: "Show running pods, containers, runners, and Minikube nodes — across clouds — in a single command.", + cmd: "kdm show ", + }, + { + icon: "HeartPulse", + title: "Health diagnostics", + desc: "Probe liveness, readiness, restarts, and resource pressure with intelligent severity scoring.", + cmd: "kdm health ", + }, + { + icon: "Radio", + title: "Live watch mode", + desc: "Stream metrics in real time with millisecond updates. Pin services, filter noise, alert on drift.", + cmd: "kdm watch", + }, + { + icon: "ScrollText", + title: "Smart log tailing", + desc: "Tail container or pod logs with structured parsing, multi-line stitching, and instant search.", + cmd: "kdm logs ", + }, + { + icon: "Cloud", + title: "Cloud-synced state", + desc: "Securely sync cluster state across your team. Share dashboards, runbooks, and incident timelines.", + cmd: "cloud · auto", + }, + { + icon: "Shield", + title: "Zero-trust by default", + desc: "Read-only kubeconfig context, scoped tokens, and end-to-end encrypted streams. SOC 2 ready.", + cmd: "built-in", + }, + ], + + commands: [ + { + name: "show", + sig: "kdm show ", + desc: "List running runners, pods, containers, or minikube clusters.", + output: `> kdm show pods +NAMESPACE NAME READY STATUS AGE +default api-server-7d4f8b 1/1 Running 3d +default worker-queue-2c9a1 1/1 Running 3d +ingress traefik-controller-x9 1/1 Running 14d +monitoring prometheus-0 2/2 Running 21d`, + }, + { + name: "health", + sig: "kdm health ", + desc: "Detailed health, liveness, and resource pressure diagnostics.", + output: `> kdm health pods +[ok] api-server-7d4f8b healthy cpu 12% mem 248Mi +[ok] worker-queue-2c9a1 healthy cpu 34% mem 512Mi +[warn] log-shipper-abc12 degraded restarts: 3 (last 1h) +[fail] batch-runner-99fa1 failing OOMKilled · 2x in 5m`, + }, + { + name: "watch", + sig: "kdm watch", + desc: "Live monitoring dashboard right inside your terminal.", + output: `> kdm watch ++- Live - 14:02:31 ----------------------------+ +| pods: 24 running · 1 pending · 0 failed | +| cpu: ######======== 62% | +| mem: ####========== 41% | +| net: in 124 MB/s out 38 MB/s | ++----------------------------------------------+`, + }, + { + name: "logs", + sig: "kdm logs ", + desc: "Tail logs with structured parsing and instant search.", + output: `> kdm logs api-server-7d4f8b -f +14:02:30 INFO request GET /api/users 200 12ms +14:02:30 INFO request POST /api/auth 201 48ms +14:02:31 WARN cache miss key=user:8821 +14:02:31 INFO request GET /api/orders 200 18ms`, + }, + ], + + stats: [ + { value: "12k+", label: "Active clusters" }, + { value: "99.99%", label: "Uptime SLA" }, + { value: "<50ms", label: "Stream latency" }, + ], + + terminalLines: [ + { prompt: "$", text: "kdm show pods" }, + { text: "NAME READY STATUS CPU MEM", out: true }, + { text: "api-server-7d4f8b 1/1 Running 12% 248Mi", out: true }, + { text: "worker-queue-2c9a1 1/1 Running 34% 512Mi", out: true }, + { text: "redis-cache-0 1/1 Running 3% 64Mi", out: true }, + { prompt: "$", text: "kdm health containers" }, + { text: "[ok] nginx-proxy healthy uptime 14d", out: true }, + { text: "[ok] postgres-main healthy uptime 28d", out: true }, + { text: "[warn] log-shipper degraded restarts: 3", out: true }, + { prompt: "$", text: "kdm watch", blink: true }, + ], + + ctaTagline: "Ship.", + ctaDescription: + "Join thousands of engineers who replaced six dashboards with one CLI. Install in 30 seconds. Cancel anytime.", + ctaPrimaryText: "Try KDM", + + metadata: { + title: "KDM — Kubernetes & Docker Monitor CLI", + description: + "KDM is a cloud-native CLI for monitoring Kubernetes pods, Docker containers, and Minikube clusters in real time.", + ogTitle: "KDM — Kubernetes & Docker Monitor CLI", + ogDescription: + "Monitor every pod and container from your terminal. Live health, logs, metrics — one CLI.", + }, + + copyright: "© 2026 KDM Labs", +}; From 0afc7c824eab10d63f8fe5acdbc02f85f207acfa Mon Sep 17 00:00:00 2001 From: Yuvraj Sarathe Date: Sun, 31 May 2026 11:52:22 +0530 Subject: [PATCH 04/33] feat(01-product-config): create Docker Guard product configuration - Full ProductConfig with Docker Guard branding - 6 features (Shield, Eye, HeartPulse, Radio, ScrollText, Cloud) - 4 commands (guard, ps, health, events) with terminal output - 3 stats for container monitoring - 10 terminal lines with dg commands and output --- src/config/products/docker-guard.ts | 130 ++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 src/config/products/docker-guard.ts diff --git a/src/config/products/docker-guard.ts b/src/config/products/docker-guard.ts new file mode 100644 index 0000000..39dea6b --- /dev/null +++ b/src/config/products/docker-guard.ts @@ -0,0 +1,130 @@ +import type { ProductConfig } from "./types"; + +export const dockerGuard: ProductConfig = { + slug: "docker-guard", + displayName: "Docker Guard", + brandName: "dg", + tagline: "Secure and monitor every container in real time.", + description: + "Docker Guard is a lightweight CLI that watches Docker containers for anomalies, resource pressure, and security events — all from your terminal with zero configuration.", + version: "v1.0.0 — real-time container security", + installCommand: "npm install -g docker-guard", + githubUrl: "https://github.com/KDM-cli/docker-guard", + docsPath: "/docker-guard/docs", + + features: [ + { + icon: "Shield", + title: "Container security", + desc: "Real-time threat detection for running containers with automated quarantine and alerting.", + cmd: "dg guard", + }, + { + icon: "Eye", + title: "Process visibility", + desc: "See every process, network connection, and file change inside your containers instantly.", + cmd: "dg ps", + }, + { + icon: "HeartPulse", + title: "Health checks", + desc: "Monitor container health with CPU, memory, I/O, and restart tracking with severity scoring.", + cmd: "dg health", + }, + { + icon: "Radio", + title: "Live events", + desc: "Stream container events — start, stop, OOM, health degradation — in real time with millisecond precision.", + cmd: "dg events", + }, + { + icon: "ScrollText", + title: "Audit logs", + desc: "Immutable audit trail of every container action with structured search and export.", + cmd: "dg audit", + }, + { + icon: "Cloud", + title: "Multi-host sync", + desc: "Centrally monitor containers across multiple Docker hosts with encrypted streaming.", + cmd: "cloud · auto", + }, + ], + + commands: [ + { + name: "guard", + sig: "dg guard", + desc: "Watch containers for security threats in real time.", + output: `> dg guard +CONTAINER STATUS THREAT RISK UPTIME +api-gateway safe none low 14d +redis-cache safe none low 28d +log-worker alert crypto high 2h`, + }, + { + name: "ps", + sig: "dg ps", + desc: "List all running containers with resource usage.", + output: `> dg ps +CONTAINER STATUS CPU MEM NET I/O +api-gateway running 12% 248Mi 124 MB/s +redis-cache running 3% 64Mi 38 MB/s +log-worker running 34% 512Mi 56 MB/s`, + }, + { + name: "health", + sig: "dg health ", + desc: "Detailed health diagnostics for a container.", + output: `> dg health log-worker +[ok] cpu 34% threshold: 80% +[ok] mem 512Mi threshold: 1Gi +[warn] restarts 3 last 1h +[ok] uptime 14d`, + }, + { + name: "events", + sig: "dg events", + desc: "Stream live container events.", + output: `> dg events +14:02:30 api-gateway started replica 3 +14:02:31 redis-cache health ok +14:02:32 log-worker alert crypto miner detected`, + }, + ], + + stats: [ + { value: "50k+", label: "Containers monitored" }, + { value: "99.9%", label: "Threat detection rate" }, + { value: "<10ms", label: "Alert latency" }, + ], + + terminalLines: [ + { prompt: "$", text: "dg ps" }, + { text: "CONTAINER STATUS CPU MEM THREATS", out: true }, + { text: "api-gateway running 12% 248Mi none", out: true }, + { text: "redis-cache running 3% 64Mi none", out: true }, + { text: "log-worker running 34% 512Mi medium", out: true }, + { prompt: "$", text: "dg guard --strict" }, + { text: "[ok] api-gateway safe uptime 14d", out: true }, + { text: "[ok] redis-cache safe uptime 28d", out: true }, + { text: "[warn] log-worker alert crypto miner detected", out: true }, + { prompt: "$", text: "dg events --follow", blink: true }, + ], + + ctaTagline: "Secure.", + ctaDescription: + "Join thousands of DevOps engineers who protect their containers with Docker Guard. Install in 30 seconds.", + ctaPrimaryText: "Try Docker Guard", + + metadata: { + title: "Docker Guard — Real-time Container Security CLI", + description: + "Docker Guard is a lightweight CLI for monitoring Docker container security, health, and resource usage in real time.", + ogTitle: "Docker Guard — Real-time Container Security CLI", + ogDescription: + "Secure and monitor every container from your terminal. Real-time threat detection, health checks, audit logs — one CLI.", + }, + + copyright: "© 2026 KDM Labs", +}; From e2e4c9cb8b5c98767fc2306ddcfe6695fe57a03e Mon Sep 17 00:00:00 2001 From: Yuvraj Sarathe Date: Sun, 31 May 2026 11:52:28 +0530 Subject: [PATCH 05/33] feat(01-product-config): create product registry with slug lookup - products array with kdm and dockerGuard configs - getProductBySlug lookup function - defaultProduct fallback export (kdm) --- src/config/products/index.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/config/products/index.ts diff --git a/src/config/products/index.ts b/src/config/products/index.ts new file mode 100644 index 0000000..6ecc19a --- /dev/null +++ b/src/config/products/index.ts @@ -0,0 +1,10 @@ +import { kdm } from "./kdm"; +import { dockerGuard } from "./docker-guard"; + +export const products = [kdm, dockerGuard]; + +export function getProductBySlug(slug: string) { + return products.find((p) => p.slug === slug); +} + +export const defaultProduct = kdm; From c6d41c9a8382c610ca3344dcff3ace7533a97f02 Mon Sep 17 00:00:00 2001 From: Yuvraj Sarathe Date: Sun, 31 May 2026 11:53:26 +0530 Subject: [PATCH 06/33] docs(planning): add SUMMARY files for Wave 1, update ROADMAP - 00-01-SUMMARY.md: root metadata fix results - 01-01-SUMMARY.md: product config system results - ROADMAP.md: mark both Wave 1 plans as complete --- .planning/ROADMAP.md | 111 ++++++++++++++++++ .../phases/00-preflight/00-01-SUMMARY.md | 65 ++++++++++ .../phases/01-product-config/01-01-SUMMARY.md | 111 ++++++++++++++++++ 3 files changed, 287 insertions(+) create mode 100644 .planning/ROADMAP.md create mode 100644 .planning/phases/00-preflight/00-01-SUMMARY.md create mode 100644 .planning/phases/01-product-config/01-01-SUMMARY.md diff --git a/.planning/ROADMAP.md b/.planning/ROADMAP.md new file mode 100644 index 0000000..c49e539 --- /dev/null +++ b/.planning/ROADMAP.md @@ -0,0 +1,111 @@ +# KDM Website — Two-Product Restructure Roadmap + +**Goal:** Restructure the single-product KDM landing site into a multi-product ecosystem hub supporting **kdm-cli** (Kubernetes & Docker Monitor CLI) and **docker-guard** (Docker monitoring CLI companion), with shared layouts, product-aware navigation, and parameterized landing components. + +--- + +## Phases + +### Pre-Phase: Meta Fix +- **Goal:** Clean up root metadata still referencing "Lovable App" placeholder. +- **Plans:** 1 plan +- **Wave:** 1 + +Plans: +- [x] `00-01-PLAN.md` — Replace "Lovable App" metadata with "KDM Ecosystem" + +--- + +### Phase 1: Product Config System +- **Goal:** Define the ProductConfig contract, create config files for both products, and establish a React Context to expose the active product throughout the tree. +- **Plans:** 2 plans +- **Waves:** 1–2 + +Plans: +- [x] `01-01-PLAN.md` — ProductConfig types + kdm.ts + docker-guard.ts + registry index +- [ ] `01-02-PLAN.md` — ProductContext provider + useProduct hook + wire into root shell + +--- + +### Phase 2a: Routing Architecture +- **Goal:** Transform `/` from single-product landing to a hub selection page; create product-specific layout routes at `/kdm/*` and `/docker-guard/*`; restructure docs routes under each product. +- **Plans:** 2 plans +- **Waves:** 3–4 + +Plans: +- [ ] `02a-01-PLAN.md` — Hub page at `/` + product layout route shells (`/kdm`, `/docker-guard`) +- [ ] `02a-02-PLAN.md` — Product-scoped docs route groups (`/kdm/docs/*`, `/docker-guard/docs/*`) + +--- + +### Phase 2b: Documentation System +- **Goal:** Reorganize markdown files into product-specific directories, parameterize the docs loader with product context. +- **Plans:** 1 plan +- **Wave:** 5 + +Plans: +- [ ] `02b-01-PLAN.md` — Split `src/docs/` into `src/docs/kdm/` + `src/docs/docker-guard/`, parameterize `docs.ts` + +--- + +### Phase 3: Navigation & Footer +- **Goal:** Make Navbar and Footer product-aware using ProductContext; Hub page gets neutral cross-product navigation. +- **Plans:** 1 plan +- **Wave:** 3 + +Plans: +- [ ] `03-01-PLAN.md` — Product-aware Navbar + Footer, neutral hub nav variant + +--- + +### Phase 4a: Landing Components — Hero + Terminal +- **Goal:** Parameterize Hero and Terminal to render product-specific content from ProductConfig. +- **Plans:** 1 plan +- **Wave:** 3 + +Plans: +- [ ] `04a-01-PLAN.md` — Parameterize Hero + Terminal components with useProduct hook + +--- + +### Phase 4b: Landing Components — Features + Commands + CTA +- **Goal:** Parameterize Features, Commands, and CTA to render product-specific content from ProductConfig. +- **Plans:** 1 plan +- **Wave:** 3 + +Plans: +- [ ] `04b-01-PLAN.md` — Parameterize Features + Commands + CTA with useProduct hook + +--- + +### Phase 5: Product Assets & Metadata +- **Goal:** Add Docker Guard assets (logo, icons, OG images), finalize per-product head metadata. +- **Plans:** 1 plan +- **Wave:** 5 + +Plans: +- [ ] `05-01-PLAN.md` — Docker Guard brand assets + per-product route head metadata + +--- + +## Wave Dependency Summary + +| Wave | Plans | Depends On | Files Changed | +|------|-------|------------|---------------| +| 1 | 00-01, 01-01 | — | `__root.tsx`, `config/products/*` | +| 2 | 01-02 | 01-01 | `ProductContext.tsx`, `__root.tsx` | +| 3 | 02a-01, 03-01, 04a-01, 04b-01 | 01-02 | routes, components, context | +| 4 | 02a-02 | 02a-01 | product doc routes | +| 5 | 02b-01 | 02a-02 | `src/docs/`, doc loader | +| 5 | 05-01 | 02a-02, 04a-01, 04b-01 | assets, metadata | + +## Success Criteria + +Pre-Phase: `__root.tsx` no longer references "Lovable". +Phase 1: ProductConfig type + both product configs + context provider exist. +Phase 2a: `/` = hub, `/kdm/*` and `/docker-guard/*` resolve. +Phase 2b: Docs load per-product from `src/docs/{product}/*.md`. +Phase 3: Navbar/Footer switch branding based on product context. +Phase 4a: Hero and Terminal render product-specific copy. +Phase 4b: Features, Commands, CTA render product-specific data. +Phase 5: Docker Guard has its own logo/icons; all pages have correct meta tags. diff --git a/.planning/phases/00-preflight/00-01-SUMMARY.md b/.planning/phases/00-preflight/00-01-SUMMARY.md new file mode 100644 index 0000000..0e161f4 --- /dev/null +++ b/.planning/phases/00-preflight/00-01-SUMMARY.md @@ -0,0 +1,65 @@ +--- +phase: 00-preflight +plan: 01 +type: execute +tags: + - metadata + - preflight + - ecosystem-branding +requires: [] +provides: + - Root document metadata with KDM Ecosystem branding +affects: + - src/routes/__root.tsx +tech-stack: + added: [] + patterns: [] +key-files: + created: [] + modified: + - src/routes/__root.tsx +metrics: + duration: ~5m + completed: 2026-05-31 +--- + +# Phase 00 Preflight Plan 01: Fix Root Metadata Summary + +Replaced all "Lovable App" / "Lovable Generated Project" references in the root layout metadata with KDM Ecosystem branding. + +## Changes Made + +| Change | Before | After | +|--------|--------|-------| +| Title | `{ title: "Lovable App" }` | `{ title: "KDM Ecosystem" }` | +| Description | `"Lovable Generated Project"` | `"Open-source CLI ecosystem for Kubernetes and Docker monitoring."` | +| Author | `{ name: "author", content: "Lovable" }` | REMOVED | +| OG Title | `"Lovable App"` | `"KDM Ecosystem"` | +| OG Description | `"Lovable Generated Project"` | `"Monitor every pod and container from your terminal."` | +| Twitter site | `"@Lovable"` | REMOVED | +| Twitter card | `"summary"` | Kept as-is | + +## Verification + +- `node -e` content check: All Lovable references removed, KDM Ecosystem present +- `npm run build` — could not run fully (vite dependency not fully installed — pre-existing issue) +- Files syntactically valid TypeScript + +## Deviations from Plan + +None — plan executed exactly as written. + +## Known Stubs + +None. + +## Threat Flags + +None — static metadata change, no new surface. + +## Self-Check: PASSED + +- `src/routes/__root.tsx` modified ✓ +- No "Lovable" references remain ✓ +- "KDM Ecosystem" present in title and OG tags ✓ +- Commit `546e93e` exists ✓ diff --git a/.planning/phases/01-product-config/01-01-SUMMARY.md b/.planning/phases/01-product-config/01-01-SUMMARY.md new file mode 100644 index 0000000..cb72da6 --- /dev/null +++ b/.planning/phases/01-product-config/01-01-SUMMARY.md @@ -0,0 +1,111 @@ +--- +phase: 01-product-config +plan: 01 +type: execute +tags: + - product-config + - types + - branding +requires: + - BLOCKER-03 (preflight metadata fix) +provides: + - ProductConfig interface and supporting types + - kdm-cli product configuration + - Docker Guard product configuration + - Product registry with slug lookup +affects: + - src/config/products/types.ts + - src/config/products/kdm.ts + - src/config/products/docker-guard.ts + - src/config/products/index.ts +tech-stack: + added: + - ProductConfig type system (src/config/products/) + patterns: + - Single-source-of-truth for all branded strings + - Serializable config (icon as string, not ReactNode) +key-files: + created: + - src/config/products/types.ts + - src/config/products/kdm.ts + - src/config/products/docker-guard.ts + - src/config/products/index.ts + modified: [] +metrics: + duration: ~15m + completed: 2026-05-31 +--- + +# Phase 01 Product Config Plan 01: ProductConfig Types + Config Files Summary + +Created the shared type system and two concrete product config files so all components can read product-specific content from a single source of truth. + +## Files Created + +### 1. `src/config/products/types.ts` — Interfaces +- `ProductFeature` — Lucide icon name, title, desc, cmd +- `ProductCommand` — name, sig, desc, output +- `ProductStat` — value, label +- `TerminalLine` — prompt, text, out, blink +- `ProductMetadata` — title, description, ogTitle, ogDescription +- `ProductConfig` — full config combining all types + +### 2. `src/config/products/kdm.ts` — kdm-cli config +Populated from exact content in existing components: +- 6 features (Eye, HeartPulse, Radio, ScrollText, Cloud, Shield) +- 4 commands (show, health, watch, logs) with terminal output tables +- 3 stats (12k+, 99.99%, <50ms) +- 9 terminal lines (from Terminal.tsx) +- CTA, SEO metadata, copyright + +### 3. `src/config/products/docker-guard.ts` — Docker Guard config +Complete Docker Guard branding: +- 6 features (Shield, Eye, HeartPulse, Radio, ScrollText, Cloud) +- 4 commands (guard, ps, health, events) +- 3 stats (50k+, 99.9%, <10ms) +- 10 terminal lines with dg commands +- CTA ("Secure."), SEO metadata, copyright + +### 4. `src/config/products/index.ts` — Registry +- `products` array: `[kdm, dockerGuard]` +- `getProductBySlug(slug)` — lookup function +- `defaultProduct` — fallback to kdm + +## Decisions Made + +- `icon` field is `string` (Lucide icon name) rather than `ReactNode` — keeps configs serializable and import-free +- Default product is `kdm` — ensures backward compatibility +- Registry exports `products` and `getProductBySlug` rather than individual configs — consumers use the registry + +## Verification + +- Content checks on all 4 files: all expected fields present ✓ +- All branded strings from existing components captured in kdm.ts ✓ + +## Deferred Issues + +- `npx tsc --noEmit` could not run — the project's vite dependency is not fully installed (pre-existing issue), causing a `vite/client` type reference error in tsconfig. This does not affect the validity of the config files. + +## Deviations from Plan + +None — all tasks executed exactly as specified. + +## Known Stubs + +None — all config fields populated with real content. + +## Threat Flags + +None — static configuration data, no user input. + +## Self-Check: PASSED + +- `src/config/products/types.ts` — 6 exported interfaces ✓ +- `src/config/products/kdm.ts` — full ProductConfig with all fields ✓ +- `src/config/products/docker-guard.ts` — full Docker Guard config ✓ +- `src/config/products/index.ts` — products array + getProductBySlug + defaultProduct ✓ +- Commits: + - `5f27964` — types.ts + - `b3f42c4` — kdm.ts + - `0afc7c8` — docker-guard.ts + - `e2e4c9c` — index.ts From d8daaa9425a5972cf73fcadcd790155e729c34e9 Mon Sep 17 00:00:00 2001 From: Yuvraj Sarathe Date: Sun, 31 May 2026 11:54:48 +0530 Subject: [PATCH 07/33] feat(01-product-config-02): create ProductContext with Provider and useProduct hook - ProductProvider accepts optional slug prop, validates against registry - useProduct hook returns current ProductConfig (never undefined) - Falls back to default product (kdm) when slug is missing or unknown --- src/context/ProductContext.tsx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/context/ProductContext.tsx diff --git a/src/context/ProductContext.tsx b/src/context/ProductContext.tsx new file mode 100644 index 0000000..a12c968 --- /dev/null +++ b/src/context/ProductContext.tsx @@ -0,0 +1,28 @@ +import { createContext, useContext, type ReactNode } from "react"; +import type { ProductConfig } from "@/config/products/types"; +import { products, defaultProduct } from "@/config/products/index"; + +const ProductContext = createContext(defaultProduct); + +function resolveConfig(slug?: string): ProductConfig { + if (!slug) return defaultProduct; + const found = products.find((p) => p.slug === slug); + return found ?? defaultProduct; +} + +export function ProductProvider({ + slug, + children, +}: { + slug?: string; + children: ReactNode; +}) { + const config = resolveConfig(slug); + return ( + {children} + ); +} + +export function useProduct(): ProductConfig { + return useContext(ProductContext); +} From 8df643870c89bff4ca576b6245f9ceb976b5e9f7 Mon Sep 17 00:00:00 2001 From: Yuvraj Sarathe Date: Sun, 31 May 2026 12:04:25 +0530 Subject: [PATCH 08/33] feat(01-product-config-02): wire ProductProvider into root shell - Wrap Outlet in ProductProvider in RootComponent - Default product (kdm) is used until route-specific layouts pass a slug --- src/routes/__root.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx index b34d561..6f5ff1f 100644 --- a/src/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -10,6 +10,7 @@ import { import appCss from "../styles.css?url"; import logoUrl from "@/assets/logo.png"; +import { ProductProvider } from "@/context/ProductContext"; function NotFoundComponent() { return ( @@ -120,7 +121,9 @@ function RootComponent() { return ( - + + + ); } From 6394abdd1887b4542f428a263b75a05bc07e4f32 Mon Sep 17 00:00:00 2001 From: Yuvraj Sarathe Date: Sun, 31 May 2026 12:05:25 +0530 Subject: [PATCH 09/33] docs(01-product-config-02): complete ProductContext plan summary - 01-02-SUMMARY.md with execution details and Wave 3 guidance - ROADMAP.md: mark 01-02 as completed --- .planning/ROADMAP.md | 2 +- .../phases/01-product-config/01-02-SUMMARY.md | 110 ++++++++++++++++++ 2 files changed, 111 insertions(+), 1 deletion(-) create mode 100644 .planning/phases/01-product-config/01-02-SUMMARY.md diff --git a/.planning/ROADMAP.md b/.planning/ROADMAP.md index c49e539..b45ddc4 100644 --- a/.planning/ROADMAP.md +++ b/.planning/ROADMAP.md @@ -23,7 +23,7 @@ Plans: Plans: - [x] `01-01-PLAN.md` — ProductConfig types + kdm.ts + docker-guard.ts + registry index -- [ ] `01-02-PLAN.md` — ProductContext provider + useProduct hook + wire into root shell +- [x] `01-02-PLAN.md` — ProductContext provider + useProduct hook + wire into root shell --- diff --git a/.planning/phases/01-product-config/01-02-SUMMARY.md b/.planning/phases/01-product-config/01-02-SUMMARY.md new file mode 100644 index 0000000..c1ec386 --- /dev/null +++ b/.planning/phases/01-product-config/01-02-SUMMARY.md @@ -0,0 +1,110 @@ +--- +phase: 01-product-config +plan: 02 +subsystem: "Product Context" +tags: + - context + - react-provider + - product-config +requires: + - 01-01 (product config types + registry) +provides: + - ProductContext with Provider + useProduct hook +affects: + - src/routes/__root.tsx (wraps children in ProductProvider) +tech-stack: + added: + - "React createContext / useContext for product config propagation" + patterns: + - "Explicit slug prop (no router coupling) — routes pass slug to Provider" +key-files: + created: + - src/context/ProductContext.tsx + modified: + - src/routes/__root.tsx +decisions: + - "Provider accepts explicit slug prop instead of reading URL internally (keeps it pure, no router dependency)" + - "resolveConfig helper validates slug against products array, falls back to defaultProduct for unknown slugs (implements T-01-02-01 mitigation)" +metrics: + duration: "~10 min" + completed: "2026-05-31" +--- + +# Phase 1 Plan 2: Product Context Summary + +Wire ProductConfig into React context so every component can access the active product's config. + +## Tasks Executed + +### Task 1: Create ProductContext with provider and useProduct hook +**Commit:** `d8daaa9` + +Created `src/context/ProductContext.tsx`: +- `ProductContext` (internal): `createContext(defaultProduct)` +- `resolveConfig(slug?)`: Looks up product by slug in the registry array; falls back to `defaultProduct` when slug is missing or unknown (threat mitigation T-01-02-01) +- `ProductProvider({ slug?, children })`: Wraps children in `ProductContext.Provider` +- `useProduct()`: Returns current `ProductConfig` from context (never undefined) + +### Task 2: Wire ProductProvider into root shell +**Commit:** `8df6438` + +Added `ProductProvider` wrapping around `` in `RootComponent`: +- Import: `import { ProductProvider } from "@/context/ProductContext"` +- Wrapped: `` inside `QueryClientProvider` +- No `slug` prop passed — defaults to KDM config (neutral mode) + +## Deviations from Plan + +None — plan executed exactly as written. + +## Pre-existing Issues (Out of Scope) + +The following build/tooling issues existed before our changes and are not caused by this plan: + +| Issue | Details | +|-------|---------| +| `npm run build` fails | `nitro` dependency missing `unenv` module — pre-existing bundler config issue | +| `npx tsc --noEmit` has errors | Missing type declarations (`@tanstack/react-router`, `recharts`, `react-hook-form`) — pre-existing, all in files we didn't touch | +| `npm run lint` fails | Missing `acorn` module in `espree` — pre-existing dependency resolution issue | + +Our `ProductContext.tsx` has zero type/lint errors. The only errors in `__root.tsx` are the same pre-existing declaration-file issues that existed before our edit. + +## Verification + +- [x] `ProductProvider` imported and used in `src/routes/__root.tsx` (3 occurrences: import + opening tag + closing tag) +- [x] `useProduct` exported from `src/context/ProductContext.tsx` (1 occurrence) +- [x] Both tasks committed individually with proper format +- [x] TypeScript reports zero new errors from our changes + +## Success Criteria + +- [x] ProductContext.tsx exposes `ProductProvider` and `useProduct` +- [x] `useProduct()` returns a valid ProductConfig at all times (defaultProduct ensures it's never undefined) +- [x] Root component wraps app tree in ProductProvider +- [ ] Build passes — BLOCKED by pre-existing nitro/unenv dependency issue (out of scope) + +## Key Files + +**Created:** +- `src/context/ProductContext.tsx` (28 lines) — Provider, useProduct hook, resolveConfig helper + +**Modified:** +- `src/routes/__root.tsx` (+3 lines) — added ProductProvider import + wrapping + +## Self-Check: PASSED + +- `src/context/ProductContext.tsx` — exists and verified +- `src/routes/__root.tsx` — contains ProductProvider import and usage +- `d8daaa9` — commit exists +- `8df6438` — commit exists + +## What Wave 3 Should Execute + +Wave 3 should proceed with **Phase 2a: Product Routing** (route layouts that pass product slugs to ProductProvider): + +1. **Create KDM route layout** (`src/routes/kdm.tsx` or similar) that wraps children in `` +2. **Create Docker Guard route layout** (`src/routes/docker-guard.tsx`) that wraps children in `` +3. **Create route definitions** in `src/router.tsx` or `src/routes/` to serve `/kdm/*` and `/docker-guard/*` paths +4. Each layout should use `useProduct()` to access its config for rendering product-specific content + +The product context is now ready for use — any component in the tree can call `useProduct()` to get the active product's configuration. From a8f3507d4e1ebf99635a2a9598cfd3230c8e2589 Mon Sep 17 00:00:00 2001 From: Yuvraj Sarathe Date: Sun, 31 May 2026 12:08:54 +0530 Subject: [PATCH 10/33] feat(03-navigation-01): parameterize Navbar with useProduct - Replaced hardcoded 'kdm' brand name with product.brandName - Replaced /docs Link with dynamic - Replaced hardcoded GitHub URLs with product.githubUrl - Both desktop and mobile Sheet docs/GitHub links are now product-aware --- src/components/Navbar.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 41c42db..0a9031d 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -1,6 +1,7 @@ import { Link } from "@tanstack/react-router"; import { Menu, Star } from "lucide-react"; +import { useProduct } from "@/context/ProductContext"; import { Sheet, SheetTrigger, @@ -9,17 +10,19 @@ import { } from "@/components/ui/sheet"; export const Navbar = () => { + const product = useProduct(); + return (