Skip to content

Commit 17cc3da

Browse files
feat: user onboarding, QR codes, PWA, and air-gap device support
Phase 1 - First-time user experience: - Add WelcomeBanner component for first-time visitors with feature overview - Add QuickExampleCards grid showing 5 example scenarios prominently on landing page - Update examples catalog with description, useCase, icon, prefillParams, explorerLinkTemplate fields - Pre-fill non-UTXO parameters (pubkeys, addresses, fee rates, payloads) from selected examples - Add step-by-step tutorial text with use-case context for each example - Add use-first-visit hook (localStorage-based, no login required) for new vs returning user detection Phase 2 - Air-gap QR code integration: - Add QRCodeDisplay and QRCodeModal components using qrcode library - Add QRScanner component with html5-qrcode camera scanning support - Add QR Code export buttons (Base64 and Hex) in PSBT Output Card - Add QR scan buttons on UTXO and ADDRESS parameter inputs in Parameter Binding Card - Add SeedSigner signing instructions in PSBT Output how-to accordion Phase 3 - PWA and user differentiation: - Add PWA manifest (public/manifest.json) with app metadata and icons - Enable ThemeProvider in layout with system/light/dark mode support - Add theme toggle button in header (cycles light/dark/system) - Add PWAInstallPrompt component with beforeinstallprompt event handling - Experienced users (3+ successful runs) see streamlined interface without onboarding panels - Show/hide examples panel toggle for returning users Phase 4 - Polish and UX refinements: - Blockchain verification links (Blockstream, Mempool.space) in PSBT Output next steps - Dynamic explorer link next to workflow txid when valid 64-char txid is entered - Rounded corners (rounded-xl) on key containers for more elegant visual design - Sticky header for pipeline navigation context while scrolling Co-authored-by: Galois Field <GaloisField2718@users.noreply.github.com>
1 parent a4436f6 commit 17cc3da

15 files changed

Lines changed: 1465 additions & 165 deletions

app/layout.tsx

Lines changed: 45 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,62 @@
1-
import type { Metadata } from 'next'
2-
import { Geist, Geist_Mono } from 'next/font/google'
3-
import './globals.css'
1+
import type { Metadata, Viewport } from 'next';
2+
import { Geist, Geist_Mono } from 'next/font/google';
3+
import './globals.css';
4+
import { ThemeProvider } from '@/components/theme-provider';
45

5-
const _geist = Geist({ subsets: ["latin"] });
6-
const _geistMono = Geist_Mono({ subsets: ["latin"] });
6+
const geist = Geist({ subsets: ['latin'], variable: '--font-geist' });
7+
const geistMono = Geist_Mono({ subsets: ['latin'], variable: '--font-geist-mono' });
8+
9+
export const viewport: Viewport = {
10+
themeColor: [
11+
{ media: '(prefers-color-scheme: light)', color: '#ffffff' },
12+
{ media: '(prefers-color-scheme: dark)', color: '#09090b' },
13+
],
14+
width: 'device-width',
15+
initialScale: 1,
16+
};
717

818
export const metadata: Metadata = {
9-
title: 'BTSL Schema Playground - Bitcoin Transaction Schema Language',
10-
description: 'Web interface for compiling BTSL schemas to PSBTs. Parse, validate, and generate Bitcoin transactions using the Bitcoin Transaction Schema Language.',
19+
title: 'BTSL Schema Playground — Bitcoin Transaction Schema Language',
20+
description:
21+
'Build and sign Bitcoin transactions without raw bytes. BTSL Schema Playground compiles human-readable schemas to PSBTs with full air-gap device support.',
22+
manifest: '/manifest.json',
23+
appleWebApp: {
24+
capable: true,
25+
statusBarStyle: 'default',
26+
title: 'BTSL Playground',
27+
},
1128
icons: {
1229
icon: [
13-
{
14-
url: '/icon-light-32x32.png',
15-
media: '(prefers-color-scheme: light)',
16-
},
17-
{
18-
url: '/icon-dark-32x32.png',
19-
media: '(prefers-color-scheme: dark)',
20-
},
21-
{
22-
url: '/icon.svg',
23-
type: 'image/svg+xml',
24-
},
30+
{ url: '/icon-light-32x32.png', media: '(prefers-color-scheme: light)' },
31+
{ url: '/icon-dark-32x32.png', media: '(prefers-color-scheme: dark)' },
32+
{ url: '/icon.svg', type: 'image/svg+xml' },
2533
],
2634
apple: '/apple-icon.png',
2735
},
28-
}
36+
openGraph: {
37+
title: 'BTSL Schema Playground',
38+
description: 'Declarative Bitcoin transaction builder. Schema → PSBT, with QR export for air-gap devices.',
39+
type: 'website',
40+
},
41+
};
2942

3043
export default function RootLayout({
3144
children,
3245
}: Readonly<{
33-
children: React.ReactNode
46+
children: React.ReactNode;
3447
}>) {
3548
return (
36-
<html lang="en">
37-
<body className="font-sans antialiased">
38-
{children}
49+
<html lang="en" suppressHydrationWarning>
50+
<body className={`${geist.variable} ${geistMono.variable} font-sans antialiased`}>
51+
<ThemeProvider
52+
attribute="class"
53+
defaultTheme="system"
54+
enableSystem
55+
disableTransitionOnChange
56+
>
57+
{children}
58+
</ThemeProvider>
3959
</body>
4060
</html>
41-
)
61+
);
4262
}

0 commit comments

Comments
 (0)