From dbee47f156ec57cec6a257f21b33ee3e40ac23e4 Mon Sep 17 00:00:00 2001 From: King Omar Date: Tue, 21 Jul 2026 20:32:04 +1000 Subject: [PATCH] Add live demo shops to landing page for visitors to test Co-Authored-By: Claude Opus 4.8 (1M context) --- src/routes/public.js | 45 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/src/routes/public.js b/src/routes/public.js index aa5c413..7f4dc88 100644 --- a/src/routes/public.js +++ b/src/routes/public.js @@ -7,9 +7,48 @@ import { genId } from '../lib/auth.js' const app = new Hono() +// Demo shops featured on the landing page so visitors can test the real flow +const DEMO_SLUGS = ['serenity-massage-bodywork', 'thai-lotus-massage'] + // ─── Marketing landing ─────────────────────────────────────────────────────── -app.get('/', (c) => { +app.get('/', async (c) => { const user = c.get('user') + + // Load featured demos (ignore any that have been removed) + const placeholders = DEMO_SLUGS.map(() => '?').join(',') + const demos = (await c.env.DB.prepare( + `SELECT s.name, s.slug, s.tagline, s.emoji, s.accent, s.suburb, s.state, + (SELECT COUNT(*) FROM services v WHERE v.shop_id = s.id AND v.is_active = 1) AS services, + (SELECT COUNT(*) FROM staff t WHERE t.shop_id = s.id AND t.is_active = 1) AS staff, + (SELECT MIN(price_cents) FROM services v WHERE v.shop_id = s.id AND v.is_active = 1) AS from_price, + s.currency + FROM shops s WHERE s.slug IN (${placeholders}) AND s.is_published = 1` + ).bind(...DEMO_SLUGS).all()).results || [] + + const demoSection = demos.length ? ` +
+
+ Try it — no signup +

See a real booking page

+

These are live example shops. Click through, pick a service and time, and make a test booking — exactly what your clients would do.

+
+ +

Want to see the owner side too? Log in with demo@kneadly.co / massage2026 to explore a live dashboard.

+
` : '' + return c.html(layout('Kneadly — Online booking for massage shops', ` ${siteNav(user)}
@@ -21,11 +60,13 @@ app.get('/', (c) => {

Free to set up · No app to install · Live in 2 minutes

+ ${demoSection} +
${[ ['🗓️', 'Book anytime', 'Clients pick a service, a therapist and a time. You wake up to a full calendar — no phone tag.'],