From 440cc37e1c263bb0f2acb051d811df08dd9b2a4c Mon Sep 17 00:00:00 2001 From: jwinterm Date: Mon, 16 Nov 2026 23:40:27 -0500 Subject: [PATCH] feat(website): add compact navigation and educational swap demos --- README.md | 17 +++- src/app/demos/basicswap/page.tsx | 11 +++ src/app/demos/eigenswap/page.tsx | 11 +++ src/app/demos/page.tsx | 11 +++ src/app/globals.css | 6 ++ src/app/layout.tsx | 7 +- src/app/premium/page.tsx | 10 ++ src/components/SiteLinks.tsx | 9 ++ src/components/SwapWalkthrough.tsx | 35 +++++++ src/lib/swap-demos.test.ts | 28 ++++++ src/lib/swap-demos.ts | 143 +++++++++++++++++++++++++++++ 11 files changed, 286 insertions(+), 2 deletions(-) create mode 100644 src/app/demos/basicswap/page.tsx create mode 100644 src/app/demos/eigenswap/page.tsx create mode 100644 src/app/demos/page.tsx create mode 100644 src/app/premium/page.tsx create mode 100644 src/components/SiteLinks.tsx create mode 100644 src/components/SwapWalkthrough.tsx create mode 100644 src/lib/swap-demos.test.ts create mode 100644 src/lib/swap-demos.ts diff --git a/README.md b/README.md index 32ee246..79a9bdc 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This website serves as a hub for Smirk wallet users to: - **Manage social tips** - view sent/received, clawback unclaimed - **Public stats** - platform growth metrics at /stats -**Important**: This site is ONLY accessible to users with the Smirk extension installed. Authentication happens via cryptographic signatures from the user's wallet keys. +Public landing, download, demo, and Premium information pages need no extension. Account features require the Smirk extension and authenticate with wallet signatures. ## Architecture @@ -127,3 +127,18 @@ src/ - [smirk-extension](../smirk-extension) - Browser extension (injects `window.smirk`) - [smirk-backend](../smirk-backend) - Rust backend API + +## Public navigation and demos + +The landing page keeps its existing composition. Compact navigation links to `/downloads`, `/demos`, the Smirk Wallet forum category, and `/premium`. The existing official desktop release parser remains the source of download metadata; development versions are not announced as shipped. + +`/demos/basicswap` explains the LTC/WOW protocol-8 target. `/demos/eigenswap` is an unreleased v0.3.3 compatibility preview for the BTC-paying, XMR-receiving taker. Both are browser-local educational simulations with distinct recovery and unknown states. They make no wallet, quote, signing, or payment requests. `/premium` explains the current in-wallet Feed purchase path; it does not implement checkout or grant forum membership. + +Run focused source checks with Node 24 or newer: + +```sh +node --test src/lib/swap-demos.test.ts src/lib/public-tip.test.ts src/lib/username.test.ts tests/desktop-downloads.test.mjs +node node_modules/typescript/bin/tsc --noEmit --incremental false +``` + +Production remains the existing reviewed Fleet website artifact and check/diff procedure. A local preview or source merge is not deployment. diff --git a/src/app/demos/basicswap/page.tsx b/src/app/demos/basicswap/page.tsx new file mode 100644 index 0000000..437a1e2 --- /dev/null +++ b/src/app/demos/basicswap/page.tsx @@ -0,0 +1,11 @@ +import Link from 'next/link'; +import SwapWalkthrough from '@/components/SwapWalkthrough'; +import { SWAP_DEMOS } from '@/lib/swap-demos'; +export const metadata = { title: "BasicSwap-compatible swaps" }; +export default function Demo() { + const demo = SWAP_DEMOS.find(value => value.slug === "basicswap")!; + return
← All demos +

{demo.badge} · Interactive simulation

{demo.title}

+

{demo.intro}

{demo.support} No wallet connection or real funds.

+
; +} diff --git a/src/app/demos/eigenswap/page.tsx b/src/app/demos/eigenswap/page.tsx new file mode 100644 index 0000000..4964ebd --- /dev/null +++ b/src/app/demos/eigenswap/page.tsx @@ -0,0 +1,11 @@ +import Link from 'next/link'; +import SwapWalkthrough from '@/components/SwapWalkthrough'; +import { SWAP_DEMOS } from '@/lib/swap-demos'; +export const metadata = { title: "EigenSwap" }; +export default function Demo() { + const demo = SWAP_DEMOS.find(value => value.slug === "eigenswap")!; + return
← All demos +

{demo.badge} · Interactive simulation

{demo.title}

+

{demo.intro}

{demo.support} No wallet connection or real funds.

+
; +} diff --git a/src/app/demos/page.tsx b/src/app/demos/page.tsx new file mode 100644 index 0000000..8faef68 --- /dev/null +++ b/src/app/demos/page.tsx @@ -0,0 +1,11 @@ +import Link from 'next/link'; +import { SWAP_DEMOS } from '@/lib/swap-demos'; +export const metadata = { title: 'Swap demos', description: 'Interactive explanations of BasicSwap-compatible and EigenSwap protocols. Simulations only, with no wallet connection or real funds.' }; +export default function Demos() { + return

Learn by stepping through

Swap demos

+

See how two peers exchange assets, and what recovery means when a swap stops. These interactive simulations never connect to a wallet or move funds.

+
{SWAP_DEMOS.map(demo => +

{demo.badge}

{demo.title}

{demo.intro}

Explore the walkthrough →

+ )}

Educational previews, not a live swap interface or an announcement of a new wallet release.

+
; +} diff --git a/src/app/globals.css b/src/app/globals.css index b94583c..63455e5 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -105,3 +105,9 @@ body { background: transparent; } } + +/* Dedicated educational pages preserve the landing page composition. */ +.demo-page { width: 100%; max-width: 56rem; margin: 0 auto; padding: 3rem 1.5rem 5rem; } +.demo-assets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; } +a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--smirk-yellow); outline-offset: 4px; } +@media (max-width: 380px) { .demo-page { padding-left: 1rem; padding-right: 1rem; } .demo-assets { gap: .5rem; } } diff --git a/src/app/layout.tsx b/src/app/layout.tsx index fbbcb1e..a87c468 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,6 +1,7 @@ import type { Metadata } from "next"; import { Geist_Mono } from "next/font/google"; import "./globals.css"; +import SiteLinks from "@/components/SiteLinks"; import { SmirkBridgeBootstrap } from "./SmirkBridgeBootstrap"; const geistMono = Geist_Mono({ @@ -48,8 +49,11 @@ export default function RootLayout({ +
{children}
-