Minisites
Per-organization marketing sites rendered by Astro at the org’s custom host (apps/minisites). Distinct from FitKit’s own marketing site (apps/marketing); both share the Astro stack but the minisites app is multi-tenant and dynamic.
What
Each FitKit organization can publish a single-page site that combines:
- Owner-authored content (hero copy, about-us, gallery, testimonials, FAQ, contact).
- Live platform data fetched from the FitKit API at request time (
programs,upcomingSessions,plans,courses,coaches).
The site resolves itself from the incoming Host header against the minisite_content table — either a custom domain (fit.gymname.com) or a *.fitkit.fit subdomain.
Why
- Gym owners can publish a public site without leaving the FitKit dashboard or buying a separate Squarespace plan.
- Live data (class schedule, plans, courses) stays in sync automatically — no double-entry between FitKit and a separate CMS.
- Astro keeps each page <100KB and CDN-cacheable.
Who
- Gym owners edit content via the FitKit dashboard minisite editor; publishing flips the
is_publishedflag and snapshotscontent→published_content. - Prospective members land on the minisite from search, social, or QR codes — see schedule, pricing, and submit a contact form that lands as a lead.
Persona impact
| Persona | Impact |
|---|---|
| Gym owner | Owns their public web presence inside FitKit, no third-party site needed. |
| Coach | Surfaced on the trainers section; their availability + program affiliation shows automatically. |
| Prospect | Discovers a gym’s offering and books an intro through the contact form (lead → CRM). |
Capabilities
- Multi-tenant resolution from
Hostheader — eithercustom_domainorsubdomain. - Section composition: hero, about, classes, schedule, pricing, courses, trainers, contact, gallery, testimonials, FAQ. Each toggled per-org.
- Theme controls — primary / secondary colors, font family, button style, favicon, SEO title/description.
- Draft / publish workflow —
contentis the working draft,published_contentis the live snapshot. - Locale-aware (
he/en/ru) — defaults to the org’s locale; falls back to Hebrew. - Floating WhatsApp button when the contact section provides a number.
- Hero image preloaded via
<link rel="preload">to shorten LCP.
Related features
marketing-site— shares the Astro toolchain.webhooks— Clerk doesn’t gate minisite reads; they’re fully public.minisitesschema lives inlibs/db/src/lib/schema/minisites.ts.- API resolve endpoint:
GET /minisites/resolve?host=...(public).
Status
Shipped. Editor lives in the dashboard. Minisite rendering app deploys independently to Vercel.
Gaps
- No A/B testing harness — every visitor sees
published_contentas-is. - No analytics page-level (PostHog page views only). Conversion funnel through the contact form lacks lifecycle attribution.
- No multi-page support — single-page composition only. Blog / case studies / classes detail pages live in the dashboard / web, not the minisite.
- Theme tokens are coarse — no per-section font overrides, no CSS variable escape hatch for power users.
- Custom domain SSL relies on Vercel’s automated provisioning; misconfigured CNAMEs surface a generic 404, not a setup hint.