diff --git a/docs/about-andhub.md b/docs/about-andhub.md new file mode 100644 index 0000000..d24b12f --- /dev/null +++ b/docs/about-andhub.md @@ -0,0 +1,7 @@ +# About AndHub + +AndHub builds and maintains KeyForge. + +KeyForge is MIT-licensed, self-hosted software for issuing and managing signed licenses across a company's products. Teams run it on their own infrastructure and keep control of their data, signing keys and deployment. + +[View KeyForge on GitHub](https://github.com/zdevzone/keyforge). diff --git a/docs/index.md b/docs/index.md index a22324d..019d0ce 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,46 +1,46 @@ # KeyForge documentation -Deploy your own license server, issue licenses from priced plans, and connect your software to signed online and bounded offline authorization. +Self-hosted license management for software products. -**New to KeyForge? Start with the [beginner guide](getting-started.md).** It takes you from a source checkout to your first license activation and explains which secrets belong on the server and which configuration belongs in your app. +**New here?** Follow the [beginner guide](getting-started.md) to run the server and activate a license. ## Run a server -- [Setup and first license](getting-started.md): prerequisites, environment, generated secrets, first operator and verification. -- [Project CLI](../packages/create-keyforge/README.md): generate a deployment with your database, licensing model and host settings. -- [Configuration](configuration.md): environment variables, databases, deployment policy and defaults. -- [Deployment](deploy.md): Render, Docker, local/VPS, Fly.io, Railway, Koyeb and cPanel. -- [Backups and recovery](backups.md): encrypted archives, independent schedules, verification and restoration. -- [Database maintenance](database.md): SQLite/PostgreSQL selection, demo data and the admin-preserving reset. -- [Upgrade an existing installation](database.md#fresh-v1-baseline): backups, schema changes and older client compatibility. +- [Project CLI](../packages/create-keyforge/README.md) — generate a deployment. +- [Configuration](configuration.md) — environment variables and defaults. +- [Deployment](deploy.md) — Docker, VPS, Render, Fly.io, Railway, Koyeb, Vercel and cPanel. +- [Vercel deployment](vercel.md) — hosted setup and backups. +- [cPanel deployment](cpanel-guide.md) — prebuilt releases and Passenger. +- [Backups and recovery](backups.md) — create, verify and restore archives. +- [Database maintenance](database.md) — manage SQLite or PostgreSQL. ## Operate KeyForge -- [Licenses, requests and payments](license-sales.md): plans, automatic ETB sales, unpaid balances, payment recording and delivery. -- [CLI reference](cli.md): key generation, diagnostics, issuance, revocation, seat release and maintenance commands. -- [API reference](api.md): authentication, permissions, routes, request bodies and errors. -- [Package publishing](publishing.md): GitHub Actions releases and manual Bash/Windows PowerShell commands for the SDK and both CLIs. -- [Maintainer guide](maintaining.md): contributions, testing on Render, production promotion and rollback. +- [Licenses and payments](license-sales.md) — plans, issuance, balances and payment records. +- [CLI reference](cli.md) — issue, revoke and inspect licenses. +- [API reference](api.md) — routes, access rules and errors. +- [Package releases](publishing.md) — publish the SDK and command-line tools. +- [Maintainer guide](maintaining.md) — contribute, deploy and recover. ## Connect an application -- [Integration guide](dependent-app-integration.md): registration, activation, offline authorization, support and trusted metering. -- [Import licensing and recovery](import-licensing.md): additive paid allowances, permanent trial conversion, atomic local usage and staff-approved recovery. -- [TypeScript SDK](../packages/keyforge-client/README.md): secure storage, retries, signed-token verification and client methods. -- [Device recognition](device-identity.md): optional Windows, Linux and macOS signals, diagnostics and recovery. -- [Token verification](verify-token.md): the exact Ed25519 license/trial v1 contract for any language. -- [Client OpenAPI](client-openapi.json): download the language-independent client API contract. -- [Studio Proof contract review](studio-proof-contract.md): production verification, endpoint details, migration boundaries and outstanding product decisions. -- [AI integration context](dependent-app-ai-context.md): concise instructions for your app's coding assistant. +- [Integration guide](dependent-app-integration.md) — registration, activation and offline use. +- [Import licensing and recovery](import-licensing.md) — paid allowances and approved recovery. +- [TypeScript SDK](../packages/keyforge-client/README.md) — verify grants and call the API. +- [Device recognition](device-identity.md) — optional device signals and recovery. +- [Windows adapter](windows-device-identity.md) — Windows-specific identity details. +- [Studio Proof contract](studio-proof-contract.md) — the verified integration contract. +- [Token verification](verify-token.md) — the Ed25519 token contract. +- [Client OpenAPI](client-openapi.json) — download the API schema. +- [AI integration context](dependent-app-ai-context.md) — instructions for coding assistants. -## Understand the boundaries +## Reference -KeyForge is MIT-licensed, self-hosted software for one company managing multiple products. It does not currently provide multi-tenant vendor hosting, public operator sign-up, email delivery or a payment gateway. Sales and payments are manually recorded in ETB. New activation and trial authorization require internet; offline use only continues within a previously signed grant. +- [Architecture and limitations](integration-review.md) — current scope and boundaries. +- [Documentation maintenance](documentation-site.md) — update and publish these guides. -See [current limitations and architecture](integration-review.md) before making production or hosted-service commitments. +## Before you deploy -## About these guides +KeyForge is self-hosted for one company managing multiple products. It has no vendor-hosted multi-tenancy, public operator sign-up, email delivery or payment gateway. New activation requires internet; offline use continues only within a signed grant. -This site bundles an explicit selection of the repository's Markdown with each UI build. It does not fetch GitHub on each visit. Update the files, run the checks and rebuild/redeploy to update this site's content. GitHub remains the source and download location; the documentation shown here describes the code shipped with this deployment. - -Maintain the reader and its public file allowlist using the [documentation maintenance guide](documentation-site.md). +Read [architecture and limitations](integration-review.md) before making production or hosted-service commitments. diff --git a/docs/ui-component-inventory.md b/docs/ui-component-inventory.md index 947e6e3..b62c1c4 100644 --- a/docs/ui-component-inventory.md +++ b/docs/ui-component-inventory.md @@ -47,7 +47,7 @@ Registry inspection: `.artifacts/communication-registry.json`; upstream sources Inbox previews explicitly prefix internal messages with “Private note”. Notifications now retain personal product-scoped history, deletion tombstones. Operator preferences cover messages, assignments and expiration alerts at 30, 7 and 1 days; disabling them stops future captures without erasing history. Preferences live in Settings and persist on the server, while appearance is local to this browser. The page and dropdown refresh every 30 seconds while mounted; read actions and dependent-app preferences use authenticated APIs. Recording an initial or renewal sale does not change license access or expiry. -The final desktop/mobile browser pass covers Settings tabs, avatar workflow, persistent appearance, notification dropdown/table/bulk controls and confirmation, including dark appearance and overflow checks. Evidence is under `.artifacts/console-smoke/`; see `ui/.impeccable/surfaces/console-patterns.md` for the capture list. Both reduced-motion animation and transition duration use `0ms` in `ui/src/index.css`, verified by live computed colors after the dark contrast correction. No shipping raster was added. Shared SQLite setup and demo reset guidance is in `docs/database.md`. +The final desktop/mobile browser pass covers Settings tabs, avatar workflow, persistent appearance, notification dropdown/table/bulk controls and confirmation, including dark appearance and overflow checks. Evidence is under `.artifacts/console-smoke/`; the console design review notes contain the capture list. Both reduced-motion animation and transition duration use `0ms` in `ui/src/index.css`, verified by live computed colors after the dark contrast correction. No shipping raster was added. Shared SQLite setup and demo reset guidance is in `docs/database.md`. ## Plan issuance, preinstallation requests and payments (2026-10-15) @@ -66,6 +66,6 @@ Sources: `ui/src/IssueLicense.tsx`, `ui/src/components/PaymentFields.tsx`, `ui/s Finish disposition: **SHIP** for the sampled visible composition. All 11 `.artifacts/issuance-smoke/*.png` images were opened: the desktop public request entry, desktop/mobile private issued-key status, unpaid desktop issuance, paid desktop/mobile issuance including its lower payment controls, desktop Mark as paid, desktop financial report and desktop/mobile Account. `request-mobile.png` is the private status/retrieval view, not the public entry form. The focused browser workflow supplied by the implementation pass covered public request/private retrieval, unpaid and paid issuance, later payment, Settings and responsive Account. Detector output in `.artifacts/issuance-smoke/detector.json` is `[]`. -The extension reuses the incumbent panel, dialog, field, checkbox, selector and table language. No new typography, palette, token system or shipping raster was introduced, so `ui/DESIGN.md` and `ui/.impeccable/design.json` remain unchanged. This capture set contains no new dark appearance evidence; prior dark-system documentation remains the reference. The visual disposition does not independently guarantee backend atomicity, authorization, idempotency or financial correctness. +The extension reuses the incumbent panel, dialog, field, checkbox, selector and table language. No new typography, palette, token system or shipping raster was introduced, so `ui/DESIGN.md` and the component preview sidecar remain unchanged. This capture set contains no new dark appearance evidence; prior dark-system documentation remains the reference. The visual disposition does not independently guarantee backend atomicity, authorization, idempotency or financial correctness. Separate implementation verification reports 115 tests passed and 7 optional tests skipped; issuance smoke, console smoke, typechecks and `build:all` passed. A local server refresh retained all record counts, including 3 users and 5 sessions, with database integrity OK and zero foreign-key errors. `vp run check` remains blocked by six pre-existing formatting files; no new lint warnings were reported. These are implementation-pass results, not additional claims derived from the screenshot review. diff --git a/docs/ui-redesign.md b/docs/ui-redesign.md index cc91664..b35bece 100644 --- a/docs/ui-redesign.md +++ b/docs/ui-redesign.md @@ -48,13 +48,13 @@ Environment validation resolves `LICENSE_SERVER_URL` first, then `RENDER_EXTERNA ## Validation and design handoff -The token-bearing [visual system](../ui/DESIGN.md) and schemaVersion 2 [component preview sidecar](../ui/.impeccable/design.json) now describe the shipped Polaris palette, typography, square geometry, responsive layout and shared adapters. [The console surface brief](../ui/.impeccable/surfaces/console-patterns.md) retains the operational contracts and records the replacement visual authority. +The token-bearing [visual system](../ui/DESIGN.md) and schemaVersion 2 component preview sidecar describe the shipped Polaris palette, typography, square geometry, responsive layout and shared adapters. The console design review notes retain the operational contracts and record the visual authority. Validation passed: `vp run check`, `vp run test` (117 passed, seven optional skips), `vp run build:all`, and the console and issuance browser suites. The three warnings in inactive sources were corrected by tracking the upload error callback dependency and using native semantic elements for typing status and reaction controls. The required searchable-recipient and empty-ID manual-option paths passed. The finish reviewer accepted all twelve required fresh desktop/mobile light/dark captures with a **SHIP** disposition and no material fixes. Credential scanning found zero matches in changed files and built assets. The design detector ran once before documentation was refreshed and reported nine advisory type sizes outside the old Inter ramp. DESIGN now records the actual Polaris annotation, title and metric sizes, including 10/11/15/24/26/28/30px; no detector rerun is implied. Visual review establishes sampled composition and interaction evidence, not an independent proof of backend financial correctness or authorization. -The later [public welcome and device extension](../ui/.impeccable/surfaces/welcome.md) preserves this console system. Its fresh finish reviewer returned **SHIP** with all twelve required public/device captures valid and no material fixes. The extension's detector report (`.artifacts/windows-welcome-detect.json`) has no primary findings and five advisory findings for intentional public-only brand/display/section sizes; those roles are now scoped in DESIGN and the sidecar without changing console typography. The two shipped welcome rasters are light/dark captures of the real Plans composition with synthetic demo data. The welcome brief records their provenance, routing and product contracts, plus the exact review evidence paths. Earlier validation counts above remain historical rather than a claim about this extension's test run. +The later public welcome and device extension preserves this console system. Its fresh finish reviewer returned **SHIP** with all twelve required public/device captures valid and no material fixes. The extension's detector report (`.artifacts/windows-welcome-detect.json`) has no primary findings and five advisory findings for intentional public-only brand/display/section sizes; those roles are now scoped in DESIGN and the sidecar without changing console typography. The two shipped welcome rasters are light/dark captures of the real Plans composition with synthetic demo data. Design review notes record their provenance, routing and product contracts, plus the exact review evidence paths. Earlier validation counts above remain historical rather than a claim about this extension's test run. ## Source references diff --git a/packages/create-keyforge/src/template.mjs b/packages/create-keyforge/src/template.mjs index 48df5dd..348fd00 100644 --- a/packages/create-keyforge/src/template.mjs +++ b/packages/create-keyforge/src/template.mjs @@ -42,6 +42,8 @@ const PRUNE = [ "test/import-licensing.test.ts", // A dated review of upstream's deployment is not a new deployer's configuration. "docs/studio-proof-contract.md", + // Upstream's About page describes AndHub; generated projects use their own identity. + "docs/about-andhub.md", "test/scaffold-prompts.test.ts", "scripts/package-smoke.mjs", "scripts/release-packages.mjs", diff --git a/scripts/docs-smoke.mjs b/scripts/docs-smoke.mjs index 11c13c0..5909d24 100644 --- a/scripts/docs-smoke.mjs +++ b/scripts/docs-smoke.mjs @@ -102,6 +102,10 @@ try { }); assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth)); assert.equal(await page.locator("html").getAttribute("data-theme"), theme); + if (width <= 639) { + await page.getByRole("button", { name: "Toggle documentation navigation" }).click(); + await page.locator('[data-mobile="true"] a[aria-current="page"]').waitFor(); + } const contrast = await page.evaluate(() => { const canvas = document.createElement("canvas"), context = canvas.getContext("2d"); @@ -115,17 +119,20 @@ try { }); return rgb[0] * 0.2126 + rgb[1] * 0.7152 + rgb[2] * 0.0722; }; - const style = getComputedStyle( - document.querySelector('.docs-navigation a[aria-current="page"]'), - ); + const selector = + innerWidth <= 639 + ? '[data-mobile="true"] a[aria-current="page"]' + : '.docs-guide-sidebar a[aria-current="page"]'; + const style = getComputedStyle(document.querySelector(selector)); const a = luminance(style.color), b = luminance(style.backgroundColor); return (Math.max(a, b) + 0.05) / (Math.min(a, b) + 0.05); }); assert.ok(contrast >= 4.5, theme + " selected navigation contrast: " + contrast); + if (width <= 639) await page.keyboard.press("Escape"); await page.screenshot({ path: join(captures, name + ".png"), fullPage: true }); } - await page.getByRole("button", { name: "Open documentation navigation" }).click(); + await page.getByRole("button", { name: "Toggle documentation navigation" }).click(); await page.screenshot({ path: join(captures, "mobile-navigation.png") }); await page.keyboard.press("Escape"); await page.setViewportSize({ width: 1440, height: 1000 }); @@ -142,14 +149,16 @@ try { await page.getByRole("heading", { name: "Generate secrets", exact: true }).waitFor(); await page.screenshot({ path: join(captures, "beginner-secrets-" + name + ".png") }); } + await page.setViewportSize({ width: 1440, height: 1000 }); await page.goto(origin + "/docs"); - await page.getByRole("button", { name: "Open documentation navigation" }).click(); - await page.getByRole("dialog").getByRole("link", { name: "Beginner guide", exact: true }).click(); + await page + .locator(".docs-guide-sidebar") + .getByRole("link", { name: "Beginner guide", exact: true }) + .click(); await page.getByRole("heading", { name: "Beginner guide", exact: true }).waitFor(); - assert.equal(await page.getByRole("dialog").count(), 0); - await page.getByRole("button", { name: "On this page", exact: true }).click(); + await page.setViewportSize({ width: 390, height: 844 }); await page - .getByRole("navigation", { name: "On this page", exact: true }) + .locator(".docs-mobile-toc") .getByRole("link", { name: "Understand the keys and credentials" }) .click(); await page.waitForURL(/#understand-the-keys-and-credentials$/); diff --git a/ui/DESIGN.md b/ui/DESIGN.md index e23d8b0..1fd4961 100644 --- a/ui/DESIGN.md +++ b/ui/DESIGN.md @@ -300,7 +300,7 @@ The public welcome surface uses the scoped public-brand, public-display and publ **The Public Type Scope Rule.** Apply the public display and section roles within the welcome surface; retain operational title, metric and annotation roles in the console. -The public documentation surface extends Polaris with a scoped reading hierarchy: body text at (16px) with (1.75) line height and a maximum measure of (72ch), article titles at (32px) with (1.2) line height, second-level headings at (24px), third-level headings at (20px), and monospace code blocks at (13px). Below (640px), article titles use (28px) and second-level headings use (22px). The (32px) title is an intentional documentation reading role, rather than a change to the console ramp. Semantic color pairs, locally hosted Google Sans Flex, square controls and existing overlay behavior carry through; the responsive navigation, content boundary and finish evidence belong to [the documentation brief](.impeccable/surfaces/docs.md). +The public documentation surface extends Polaris with a scoped reading hierarchy: body text at (16px) with (1.75) line height and a maximum measure of (72ch), article titles at (32px) with (1.2) line height, second-level headings at (24px), third-level headings at (20px), and monospace code blocks at (13px). Below (640px), article titles use (28px) and second-level headings use (22px). The (32px) title is an intentional documentation reading role, rather than a change to the console ramp. Semantic color pairs, locally hosted Google Sans Flex and square controls carry through. The responsive reader adapts the paid Shadcnblocks Sidebar 20 documentation shell to the live guide catalog, search, breadcrumbs and per-page outline. ## Layout @@ -310,7 +310,7 @@ Summary cards form four columns on desktop and two on mobile. Lists use wrapping Below (768px), navigation becomes a drawer, search occupies its own row, page titles reduce, content padding becomes (24px 16px 36px), and detail and profile columns stack. Dense tables scroll inside their own containers; Settings tabs remain horizontally reachable. Dialogs stay centered, scroll internally and fit within (90dvh), with a large-screen maximum width of (42rem). Labels stay above their controls at every width. Related fields use the shared responsive form group: columns fit when each has at least (15rem), with a (20px) gap, and stack when the container is narrower. Route context hides below (1100px) to leave room for header controls. -The public welcome layout uses a centered maximum width of (1320px), a split copy/console-preview hero, and broader section spacing. At its tablet breakpoint the four-step walkthrough becomes two columns; on mobile the hero, walkthrough, feature, integration and FAQ layouts stack, navigation uses a Sheet and actions stretch across the available width. Its detailed composition belongs to [the welcome brief](.impeccable/surfaces/welcome.md). +The public welcome layout uses a centered maximum width of (1320px), a split copy/console-preview hero, and broader section spacing. At its tablet breakpoint the four-step walkthrough becomes two columns; on mobile the hero, walkthrough, feature, integration and FAQ layouts stack, navigation uses a Sheet and actions stretch across the available width. Detailed composition is recorded in the design review notes. ## Elevation & Depth @@ -338,7 +338,7 @@ The Polaris base radius is square. App-owned styling applies it to cards, button - **Command search:** GlobalCommand provides Ctrl/Cmd K navigation and API-backed license results within the active product, with loading/error feedback. It does not interrupt an edit dialog. Direct list filters remain local inputs. - **Dialogs and reports:** use the shared Radix-backed Modal for accessible titles, focus trapping, dismissal and focus return. Creation, edits, payments and confirmations use focused dialogs. Reports show real product/date/customer/status context, separate meter units and ETB amounts, and export all filtered rows through CSV or browser Print / Save PDF. Status reports are current-state; usage dates include whole overlapping buckets, and lifetime totals require no dates. -The complete screen inventory, source provenance, preserved behavior and known registry gaps are in [the redesign record](../docs/ui-redesign.md). Surface-specific workflow contracts remain in [the console brief](.impeccable/surfaces/console-patterns.md). +The complete screen inventory, source provenance, preserved behavior and known registry gaps are in [the redesign record](../docs/ui-redesign.md). Surface-specific workflow contracts remain in the console design review notes. ## Do's and Don'ts diff --git a/ui/src/docs/catalog.ts b/ui/src/docs/catalog.ts index d0c5ff1..eb34bdc 100644 --- a/ui/src/docs/catalog.ts +++ b/ui/src/docs/catalog.ts @@ -182,6 +182,14 @@ export const docCatalog: DocEntry[] = [ optional: true, description: "Contributions, staging, production promotion and recovery.", }, + { + slug: "about-andhub", + title: "About AndHub", + group: "About", + source: "docs/about-andhub.md", + optional: true, + description: "The team behind KeyForge.", + }, ]; export function docPath(slug: string) { return slug ? "/docs/" + slug : "/docs"; diff --git a/ui/src/docs/content.ts b/ui/src/docs/content.ts index aaa1311..cc48198 100644 --- a/ui/src/docs/content.ts +++ b/ui/src/docs/content.ts @@ -28,6 +28,7 @@ const sources = import.meta.glob( "../../../docs/documentation-site.md", "../../../docs/publishing.md", "../../../docs/maintaining.md", + "../../../docs/about-andhub.md", "../../../packages/keyforge-client/README.md", "../../../packages/create-keyforge/README.md", ], diff --git a/ui/src/index.css b/ui/src/index.css index d0ad197..d54ea03 100644 --- a/ui/src/index.css +++ b/ui/src/index.css @@ -464,6 +464,189 @@ } } +/* Shadcnblocks Sidebar 20, adapted for the live KeyForge guide catalog. */ +.docs-shell { + --sidebar-width: 17rem; + min-height: 100svh; + width: 100%; +} +.docs-guide-sidebar { + border-right: 1px solid var(--sidebar-border); +} +.docs-guide-header { + gap: 12px; + padding: 16px 12px 12px; +} +.docs-sidebar-mark { + display: grid; + width: 32px; + height: 32px; + flex: none; + place-items: center; + background: var(--primary); + color: var(--primary-foreground); +} +.docs-sidebar-mark svg { + width: 18px; + height: 18px; +} +.docs-guide-content { + gap: 8px; + overflow-x: hidden; + overflow-y: auto; + padding: 4px 8px 12px; +} +.docs-guide-content [data-sidebar="group-label"] { + min-height: 44px; + font-size: 12px; + font-weight: 600; + letter-spacing: 0.02em; +} +.docs-guide-content [data-slot="sidebar-menu-button"] { + min-height: 44px; +} +.docs-guide-content [data-slot="sidebar-menu-button"][data-active="true"] { + background: var(--sidebar-accent); + color: var(--sidebar-accent-foreground); + font-weight: 600; +} +.docs-inset { + min-width: 0; + min-height: 100svh; + outline: none; +} +.docs-inset:focus-visible { + outline: none; +} +.docs-header { + background: color-mix(in srgb, var(--background) 94%, transparent); + backdrop-filter: blur(12px); +} +.docs-header-inner { + max-width: none; + height: 64px; + gap: 12px; + margin: 0; + padding-inline: 24px; +} +.docs-header-separator { + height: 20px; + background: var(--border); +} +.docs-header-actions { + display: flex; + align-items: center; + gap: 12px; + margin-left: auto; +} +.docs-header-actions button { + min-width: 44px; + min-height: 44px; +} +.docs-sidebar-trigger { + width: 44px; + height: 44px; +} +.docs-search-trigger { + width: 100%; + margin: 0; +} +.docs-search-trigger kbd { + border: 1px solid var(--border); + border-radius: 4px; + padding: 1px 5px; +} +.docs-main { + width: 100%; + max-width: 1060px; + flex: 1; + margin-inline: auto; + padding: 48px clamp(24px, 5vw, 72px) 64px; +} +.docs-prose { + margin: 0 auto; +} +.docs-toc-sidebar { + position: sticky; + top: 0; + height: 100svh; + border-left: 1px solid var(--border); + background: var(--background); +} +.docs-toc-header { + min-height: 64px; + justify-content: center; + border-bottom: 1px solid var(--border); + padding-inline: 16px; + font-size: 13px; + font-weight: 600; +} +.docs-toc { + display: flex; + flex-direction: column; + gap: 8px; + padding: 8px; + font-size: 13px; + line-height: 1.5; +} +.docs-toc a { + border-radius: 4px; + padding: 5px 8px; +} +.docs-toc-nested { + margin-left: 10px; +} +.docs-mobile-toc { + display: none; +} +.docs-footer { + gap: 18px; + padding: 20px 24px; +} +@media (max-width: 1279px) { + .docs-toc-sidebar { + display: none; + } + .docs-mobile-toc { + display: flex; + flex-direction: column; + gap: 8px; + margin: 0 0 28px; + border-block: 1px solid var(--border); + padding-block: 16px; + font-size: 14px; + } + .docs-mobile-toc p { + margin: 0 0 4px; + color: var(--muted-foreground); + font-size: 12px; + font-weight: 600; + } + .docs-mobile-toc a { + width: fit-content; + color: var(--muted-foreground); + } +} +@media (max-width: 639px) { + .docs-header-inner { + height: 60px; + padding-inline: 12px; + } + .docs-header-actions { + gap: 8px; + } + .docs-header-actions > a { + padding-inline: 8px; + } + .docs-main { + padding: 32px 20px 48px; + } + .docs-footer { + gap: 12px 16px; + padding-inline: 20px; + } +} + /* Public KeyForge surface: hero1 split composition, using the console's Polaris tokens. */ .welcome-page { min-height: 100svh; diff --git a/ui/src/pages/Docs.tsx b/ui/src/pages/Docs.tsx index d60c350..455b678 100644 --- a/ui/src/pages/Docs.tsx +++ b/ui/src/pages/Docs.tsx @@ -3,10 +3,10 @@ import { ArrowRight, BookOpen, Check, + ChevronRight, Copy, ExternalLink, - KeyRound, - Menu, + FileText, Search, } from "lucide-react"; import { isValidElement, useEffect, useState, type ReactNode } from "react"; @@ -15,12 +15,15 @@ import { Link, useLocation, useNavigate, useParams } from "react-router-dom"; import remarkGfm from "remark-gfm"; import { - Accordion, - AccordionContent, - AccordionItem, - AccordionTrigger, -} from "@/components/ui/accordion"; + Breadcrumb, + BreadcrumbItem, + BreadcrumbLink, + BreadcrumbList, + BreadcrumbPage, + BreadcrumbSeparator, +} from "@/components/ui/breadcrumb"; import { Button } from "@/components/ui/button"; +import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible"; import { Command, CommandEmpty, @@ -36,41 +39,67 @@ import { DialogHeader, DialogTitle, } from "@/components/ui/dialog"; +import { Separator } from "@/components/ui/separator"; import { - Sheet, - SheetContent, - SheetDescription, - SheetHeader, - SheetTitle, - SheetTrigger, -} from "@/components/ui/sheet"; + Sidebar, + SidebarContent, + SidebarGroup, + SidebarGroupContent, + SidebarGroupLabel, + SidebarHeader, + SidebarInset, + SidebarMenu, + SidebarMenuButton, + SidebarMenuItem, + SidebarProvider, + SidebarTrigger, +} from "@/components/ui/sidebar"; import { ThemeControl } from "../components/ThemeControl"; import { docPath, resolveDocHref, sourceRepository } from "../docs/catalog"; import { articles, openApiUrl } from "../docs/content"; import { headingIds, searchDocs, type DocArticle } from "../docs/markdown"; -function Navigation({ current, close }: { current: string; close?: () => void }) { +function DocumentationNavigation({ current }: { current: string }) { return ( - + ); } function SearchDocs() { @@ -116,7 +145,7 @@ function SearchDocs() { @@ -199,29 +228,16 @@ function CodeBlock({ children }: { children?: ReactNode }) { ); } function MobileContents({ article }: { article: DocArticle }) { - const [expanded, setExpanded] = useState(""); if (!article.headings.length) return null; return ( - - - On this page - - - - - + ); } function Article({ article }: { article: DocArticle }) { @@ -269,7 +285,6 @@ export default function Docs() { const { slug = "" } = useParams(), location = useLocation(); const article = articles.find((a) => a.slug === slug); - const [menuOpen, setMenuOpen] = useState(false); useEffect(() => { document.title = (article?.title ?? "Guide not found") + " — KeyForge documentation"; if (location.hash) { @@ -293,128 +308,175 @@ export default function Docs() { Skip to documentation -
-
- -
-
-
- -
- {article ? ( - <> -
-
-
-
- Included with this deployment - - View Markdown source -
- - - ) : ( -
-

Guide not found

-

- This guide is not included in this deployment. Browse the documentation or search - for the topic you need. -

- -
- )} -
- {article && ( - - )} -
-
- KeyForge - MIT-licensed software for self-hosting - - GitHub - -
+ + + ) : ( +
+

Guide not found

+

+ This guide is not included in this deployment. Browse the documentation or search + for the topic you need. +

+ +
+ )} + + + + {article?.headings.length ? ( + + + On this page + + + + + + + + + + ) : null} + ); }