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.

+
+
+ ${demos.map(d => ` +
+
${esc(d.emoji)}
+
${esc(d.name)}
+
${esc([d.suburb, d.state].filter(Boolean).join(', '))}
+
+
+ ${d.tagline ? `
${esc(d.tagline)}
` : ''} +
${d.services} services · ${d.staff} therapist${d.staff === 1 ? '' : 's'}${d.from_price != null ? ` · from ${money(d.from_price, d.currency)}` : ''}
+
Book a test appointment →
+
+
`).join('')} +
+

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) => {

Create your booking page → - See how it works + Try a live demo

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.'],