From 8464ee07e664f95e807515813868133cb60ce70a Mon Sep 17 00:00:00 2001 From: Sparsh Sam <110058692+sparshsam@users.noreply.github.com> Date: Sat, 4 Jul 2026 22:25:03 -0400 Subject: [PATCH] =?UTF-8?q?feat:=20v0.9.3=20=E2=80=94=20Installed=20PWA=20?= =?UTF-8?q?App=20Experience?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add usePwaMode() hook for display-mode detection - Add /app workbench route with app splash screen - Add PWA app shell (compact header, no marketing footer) - Add mobile bottom tab navigation (Create, Verify, History, More) - Add app sub-routes: /app/history, /app/more - Add conditional shell routing (website vs PWA shell) - Update manifest to launch at /app?source=pwa - Add docs/pwa-mode.md - Bump version to v0.9.3 across package.json, README, CHANGELOG --- CHANGELOG.md | 25 ++++++++ README.md | 1 + docs/pwa-mode.md | 53 +++++++++++++++ package.json | 2 +- public/manifest.json | 2 +- src/app/app/history/page.tsx | 14 ++++ src/app/app/layout.tsx | 7 ++ src/app/app/more/page.tsx | 54 ++++++++++++++++ src/app/app/page.tsx | 96 ++++++++++++++++++++++++++++ src/app/app/verify/page.tsx | 5 ++ src/app/create/page.tsx | 2 +- src/app/layout.tsx | 5 +- src/components/app-splash.tsx | 77 ++++++++++++++++++++++ src/components/conditional-shell.tsx | 16 +++++ src/components/pwa-bottom-nav.tsx | 44 +++++++++++++ src/components/pwa-shell.tsx | 58 +++++++++++++++++ src/components/pwa-status-badge.tsx | 24 +++++++ src/lib/use-pwa-mode.ts | 84 ++++++++++++++++++++++++ 18 files changed, 564 insertions(+), 5 deletions(-) create mode 100644 docs/pwa-mode.md create mode 100644 src/app/app/history/page.tsx create mode 100644 src/app/app/layout.tsx create mode 100644 src/app/app/more/page.tsx create mode 100644 src/app/app/page.tsx create mode 100644 src/app/app/verify/page.tsx create mode 100644 src/components/app-splash.tsx create mode 100644 src/components/conditional-shell.tsx create mode 100644 src/components/pwa-bottom-nav.tsx create mode 100644 src/components/pwa-shell.tsx create mode 100644 src/components/pwa-status-badge.tsx create mode 100644 src/lib/use-pwa-mode.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 945fc08..b41ee6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,31 @@ All notable changes to OpenProof are documented here. +## 0.9.3 — Installed PWA App Experience + +### PWA App Shell +- New `/app` route — focused workbench for installed PWA users +- App splash screen using existing icon assets (light/dark, respects reduced motion) +- Compact app header with online/offline status, Base Sepolia badge, theme toggle +- Mobile bottom tab navigation: Create, Verify, History, More +- App sub-routes: `/app/history` (combined registered + verified), `/app/more` (About, Docs, GitHub) +- `/app/verify` redirects to existing `/verify` page + +### Display-Mode Detection +- New `usePwaMode()` hook — detects `display-mode: standalone`, `fullscreen`, `minimal-ui`, iOS standalone, and `?source=pwa`/`?mode=pwa` fallback +- Returns `isPwa`, `displayMode`, `isMobile`, `isDesktop`, `prefersReducedMotion` +- Safe client-only detection with media query listeners + +### Manifest +- `start_url` changed from `/` to `/app?source=pwa` — installed PWA launches into the workbench +- Website mode still serves the public marketing site from `/` + +### Architecture +- Route group `src/app/app/` uses its own layout with `PwaShell` (no marketing footer) +- Public routes (`/`, `/about`, `/privacy`, `/terms`, `/create`, `/verify`, `/proof/[hash]`, `/bundle/[hash]`) continue using the website `AppShell` +- History system reused — no new backend, no accounts, no sync +- Existing CSP, wallet compatibility, accessibility preserved + ## 0.9.2 — GeneratedAssets & PWA Refresh ### Assets diff --git a/README.md b/README.md index 103534f..88aa635 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ OpenProof is part of a broader direction: software that helps people prove thing | v0.9.0 | 2026-06-25 | Native Platform Readiness — MSIX packaging, Android (Capacitor), PWA polish, domain migration | | v0.9.1 | 2026-07-02 | Open Product Family branding — lockup alignment, Kovina Collection footer, dual-theme icon overhaul | | v0.9.2 | 2026-07-04 | GeneratedAssets replacement, Kovina footer, PWA icon refresh, README overhaul | +| v0.9.3 | 2026-07-04 | Installed PWA App Experience — `/app` workbench, splash screen, bottom nav, compact header, display-mode detection | ## Quick Links diff --git a/docs/pwa-mode.md b/docs/pwa-mode.md new file mode 100644 index 0000000..a48b7ff --- /dev/null +++ b/docs/pwa-mode.md @@ -0,0 +1,53 @@ +# Website Mode vs Installed PWA Mode + +OpenProof supports two interaction models sharing the same product identity. + +## Website Mode (default) + +- Accessed via any browser at `https://proof.kovina.org` +- Full marketing/editorial pages: Home, About, Privacy, Terms, Docs +- SEO-optimized metadata and OpenGraph tags +- Traditional website footer with navigation links +- Create, Verify, and proof explorer pages with explanatory copy +- PWA install prompt available but optional + +**Routes:** +- `/` — Marketing homepage +- `/create` — Create proof (with explanatory copy) +- `/verify` — Verify proof (with receipt import) +- `/about`, `/privacy`, `/terms`, `/docs` — Editorial pages +- `/proof/[hash]` — Public proof page +- `/bundle/[hash]` — Bundle proof page + +## Installed PWA Mode + +- Accessed after installing OpenProof as a PWA (Chrome, Safari, Edge) +- Launches at `/app?source=pwa` (configured in manifest.json) +- Focused workbench with minimal copy — action-first +- No marketing footer or editorial framing +- Compact app header with online/offline status +- Mobile bottom tab navigation (Create, Verify, History, More) +- Desktop: same workbench with keyboard-friendly layout +- App splash screen on first load (light/dark theme-aware) + +**Routes:** +- `/app` — App workbench (quick actions + recent proofs + testnet notice) +- `/app/verify` — Redirects to `/verify` +- `/app/history` — Combined registered + verified proof history +- `/app/more` — About, Docs, GitHub links + +## Detection + +The app detects PWA mode via `usePwaMode()` which checks: +- `display-mode: standalone` CSS media query +- `display-mode: fullscreen` / `minimal-ui` +- iOS `navigator.standalone` +- URL parameter `?source=pwa` / `?mode=pwa` (fallback) + +## Key Constraints + +- No accounts, analytics, telemetry, backend, sync, or notifications +- All proof history remains in browser localStorage only +- Same wallet (RainbowKit/wagmi) and chain (Base Sepolia) +- Same CSP and security headers +- Static export / Capacitor compatible diff --git a/package.json b/package.json index 178c17d..6cb07e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openproof", - "version": "0.9.2", + "version": "0.9.3", "private": true, "license": "AGPL-3.0-only", "scripts": { diff --git a/public/manifest.json b/public/manifest.json index c64487b..58b1004 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -2,7 +2,7 @@ "name": "OpenProof", "short_name": "OpenProof", "description": "Privacy-first proof-of-existence for files. Hash files locally, register only the SHA-256 fingerprint on Base Sepolia. No uploads, no accounts, no backend.", - "start_url": "/", + "start_url": "/app?source=pwa", "display": "standalone", "display_override": [ "window-controls-overlay", diff --git a/src/app/app/history/page.tsx b/src/app/app/history/page.tsx new file mode 100644 index 0000000..cdd7d02 --- /dev/null +++ b/src/app/app/history/page.tsx @@ -0,0 +1,14 @@ +"use client"; + +import { ProofHistory } from "@/components/proof-history"; + +export default function AppHistoryPage() { + return ( +
+ OpenProof runs on Base Sepolia (testnet). + All proofs are for experimental and verification purposes only. +
++ OpenProof v0.9.3 · AGPL-3.0 +
+ + +Create proof
++ Hash a file and register on Base Sepolia +
+Verify proof
++ Check a fingerprint against the registry +
+Bundle proofs
++ Register multiple files as a single combined proof +
++ Base Sepolia testnet +
++ OpenProof runs on Base Sepolia — a test network. Proofs here are + for experimentation and verification. No real value is involved. +
+— OpenProof v0.9.2 —
+— OpenProof v0.9.3 —
) : null} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e1a5dd2..a8c8805 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -2,6 +2,7 @@ import type { Metadata } from "next"; import { Geist_Mono } from "next/font/google"; import "@fontsource-variable/stack-sans-notch"; import { AppShell } from "@/components/app-shell"; +import { ConditionalShell } from "@/components/conditional-shell"; import { ThemeProvider } from "@/components/providers/theme-provider"; import { ErrorBoundary } from "@/components/error-boundary"; import { OfflineNotice } from "@/components/offline-notice"; @@ -112,9 +113,9 @@ export default function RootLayout({ }} />+ Proof without surrender. +
+ +