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 ? ` +
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.
+Free to set up · No app to install · Live in 2 minutes