Public Mini Site
The public, Google-indexable brand and location pages at /s/[brandSlug], the owner settings that control them, and how custom domains are mapped to them.
13 min read
Overview
The mini site is a read-only public storefront for each brand. It needs no login. It lists the brand's locations, and each location page shows address, hours, public services, optional prices, optional staff, and a "Book an Appointment" button that hands off to the online booking page.

It is off by default. A brand owner or manager turns it on per brand in Settings → Mini site (brands.mini_site_enabled). While it is off, both /s/... routes return a 404.
A brand can also be served from its own domain. The mini site is what a custom domain actually serves (see the Custom domains section). The booking flow itself lives at /book/[slug], not under /s.
Related: Client Surfaces covers booking, portal and check-in. Settings lists the settings areas in general.
Public routes
Both routes live in the (public) route group. They share one layout: a centred max-w-3xl column with a "Powered by Kagami" footer. Neither route needs a session. Only the fields listed under "What is public" below are shown.
| Route | What it shows |
|---|---|
/s/[brandSlug] |
Brand header (logo, name, tagline), About paragraph, brand contact links, and a card per location. |
/s/[brandSlug]/[locationSlug] |
One location: About, address with a directions link, phone, email, website, Instagram and Facebook links, weekly hours, services grouped by category, team members, and a Book CTA. |
Brand page content
- Header: logo (from
brand_themes.logo_url),brands.name, optional tagline. - About:
brands.description, only if set. - Contact row: website, support phone (
tel:), support email (mailto:), and "Leave a review" (google_review_url). Each shows only if set. - Locations: every location of the brand that has a slug, ordered by name. Each card links to
/s/[brandSlug]/[locationSlug], shows address and phone, and a "Get directions" hint. If there are none, the page shows "No locations are open for booking yet". - Brand colours from
brand_themesare injected as--brand-primary,--brand-secondaryand--brand-accentCSS variables.
Location page content
| Block | Source | Notes |
|---|---|---|
| About | locations.description, falling back to brands.description |
Hidden if both are empty. |
| Address and map link | locations.address_*, city, state, pincode |
Link uses latitude and longitude when both are set, otherwise a Google Maps search on the address. |
| Contact | phone, email, website_url, instagram_url, facebook_url |
Each shown only if set. |
| Hours | location_hours |
One row per weekday, Sunday first. A missing, closed or half-filled day shows "Closed". Times render as 9 AM – 8:30 PM. |
| Services | service_categories + services |
Brand-wide list, not filtered by location. See the "What is public" section. |
| Prices | services.price_minor |
Shown only when brands.show_prices is true. Formatted as INR with no decimals. |
| Team | staff_members at this location |
Governed by brands.show_staff. Shows avatar (or initial), name, title, bio. |
| Book CTA | /book/[brandSlug]?location=<locationId>&source=mini_site |
Also a sticky bottom bar on mobile. The booking page does not record the source=mini_site value as an attribution source today. |
SEO and metadata
| Item | Brand page | Location page |
|---|---|---|
<title> |
{brand} | Book an appointment |
{brand} — {location} |
| Description | brands.description, else tagline, else a generic "Book an appointment at {brand}..." line |
locations.description (or "{brand} at {location}."), plus "Located at {address}." and "Book your appointment online." |
| Open Graph | title, description, and the brand logo as the image (if any) | same |
| JSON-LD | Organization (name, url, logo, description, telephone, email) |
BeautySalon (name, url, image, description, PostalAddress, telephone, email, openingHoursSpecification, sameAs social links) |
| Sitemap | /s/[brandSlug], priority 0.8 |
/s/[brandSlug]/[locationSlug], priority 1.0 |
Notes:
src/app/sitemap.tsisforce-dynamicand lists every brand withmini_site_enabled = true, plus every one of its locations that has a slug. URLs are built fromNEXT_PUBLIC_APP_URL(defaulthttps://app.kagamihq.com), never from a custom domain.- The JSON-LD
urluseswebsite_urlwhen set, else the/s/...URL on the app host. The pages do not set a<link rel="canonical">. - The pages set no
noindex. A disabled brand returns 404, so nothing is exposed. - The location page's
generateMetadatareturns just the brand name as title if the location slug does not exist, and the page then 404s.
Owner settings
Settings → Mini site
Page: /dashboard/settings/mini-site. Sidebar entry "Mini site", visible to MANAGER_ROLES (super admin, org owner, brand manager, location manager) and gated by the marketing feature flag.
If the org has several brands, a brand picker appears and each brand is configured separately. If it has none, the page shows the "no brand" empty state.
| Setting | Column | Detail |
|---|---|---|
| Enable mini site | brands.mini_site_enabled |
Master switch. When on, the editor shows the live URL https://<current host>/s/<brandSlug>. |
| Staff visibility | brands.show_staff |
all (default), selected (only staff flagged public) or none (team section hidden). DB check constraint enforces these three values. |
| Show prices | brands.show_prices |
Default true. |
| Tagline | brands.tagline |
Up to 120 characters in the form. |
| About | brands.description |
Up to 1000 characters in the form. |
| Custom domain | brand_custom_domains |
A simpler second entry point; see "Two custom domain screens" below. |
A live preview card on the right of the editor is built from the form values. Saving shows "Settings saved." or the error returned by the server.
Settings made elsewhere
| Where | What | Column |
|---|---|---|
| Staff list, "Mini site" toggle on each staff row | Appears only when the brand's staff visibility is selected, and only for active staff. |
staff_members.is_public (default true) |
| Services list, per-service toggle and bulk action | Hide a service from the public page without deactivating it. | services.is_public (default true) |
| Location settings (address, description, website, Instagram, Facebook, lat/long) | Fields shown on the location page. | locations.* |
| Location hours | Weekly hours. | location_hours |
| Brand profile and theme | Logo, colours, website, support phone and email, Google review link. | brands.*, brand_themes.* |
| Location slug | The [locationSlug] in the URL. Generated from the location name by a database trigger (-2, -3 suffixes for duplicates within a brand) if empty. |
locations.slug |
Custom domains
A brand can have one custom domain (brand_custom_domains.brand_id is unique, and so is domain).
What a custom domain does
The routing rule is in src/proxy.ts:
- Take the
Hostheader, drop any port. - If it is a first-party host, do nothing special. First-party means empty,
localhost,127.0.0.1,[::1],*.vercel.app, orAPP_HOSTNAMES(defaultmodernsalonowner.com,kagamihq.com,salonos.in) and any subdomain of those. - Otherwise look the host up in
brand_custom_domains, cached in memory for 5 minutes per host. - If a brand slug comes back, rewrite the request to
/s/<brandSlug>. The visitor's URL does not change.
The mini site's own mini_site_enabled check still applies after the rewrite. A custom domain whose brand has the mini site off shows a 404.
Setup, step by step
Recommended path is the dedicated screen, Settings → Custom domain (/dashboard/settings/custom-domain, owners only).
- Decide on a subdomain of a domain you control, for example
book.yoursalon.com. The screen warns that a root (apex) domain cannot use a CNAME. - Enter it in "Your domain" and press Save domain. The server lowercases it, validates the format (
name.tld, letters, digits, dots, hyphens) and stores a row with statuspending. Bad input returns "Invalid domain format". - The "DNS setup" card shows the record to add:
- Type:
CNAME - Host: the first label of the domain (for
book.yoursalon.com,book) - Value: the row's
cname_target(database defaultapp.salonos.in) - TTL: Automatic
- Type:
- Add that record at your DNS provider.
- Press Check DNS. The server resolves the CNAME for the domain and compares it with
cname_target.- Match: status becomes
verified,dns_verified_atis set, message "DNS verified successfully!". - No match or lookup error: status becomes
failed, message "DNS not yet propagated — try again in a few minutes." Check again later; a later successful check moves it back toverified.
- Match: status becomes
- Traffic to the domain is served by the app once the host reaches the app server and has a valid certificate. The certificate for a custom domain is set up on the server outside the dashboard, so ask your administrator to arrange HTTPS for the new domain before you share it with clients.
Remove the domain with Remove domain (confirmation dialog). The row is deleted and routing stops after the 5-minute cache expires.
Status values
| Status | Set by | Meaning in code |
|---|---|---|
pending |
Saving a domain | New or changed domain, DNS not checked. |
verified |
Check DNS, CNAME matches | DNS points at the target. |
failed |
Check DNS, no match | DNS did not match on the last check. |
A domain whose last DNS check failed stops routing traffic to the mini site.
Two custom domain screens
| Settings → Custom domain | Settings → Mini site → Custom domain | |
|---|---|---|
| Roles | Owners only | Managers |
| Brand | The caller's first brand by name only | The brand chosen in the picker |
| Validation | Regex name.tld; errors "Invalid domain format" |
Strips http(s)://; "Domain is required"; "Enter just the domain name, not a full URL" if it contains / |
| DNS check | Yes (Check DNS button) | No button; shows the status badge only |
| CNAME value shown | brand_custom_domains.cname_target |
The current app host (window host, e.g. the host you are browsing the dashboard on) |
| Wording | "booking page" | "mini site" |
Both write to the same table. Saving from either screen resets the status to pending. Use the dedicated Custom domain screen: it shows the DNS record to add and lets you run Check DNS.
What is public
Everything below is readable by anyone who knows or guesses the URL, once the brand's mini site is enabled.
| Data | Public? | Controlled by |
|---|---|---|
| Brand name, tagline, description, website, support phone and email, Google review link | Yes | Brand profile; tagline and description from Mini site settings |
| Brand logo and colours | Yes | brand_themes |
| Location name, slug, description, address, lat/long, phone, email, website, social links | Yes, for every location with a slug | Location settings. There is no per-location "hide" switch, and is_active is not checked. |
| Location weekly hours | Yes | location_hours |
| Services (name, description, duration, price) | Only is_active and is_public services that belong to a category; categories with no public service are hidden |
services.is_public, show_prices |
| Staff (display name, title, bio, avatar) | Per show_staff; only active staff at the location; selected additionally requires is_public |
brands.show_staff, staff_members.is_public |
| Client data, appointments, revenue, staff phone/email, internal notes | Never queried by the mini site | n/a |
Service prices are the brand-level price_minor. Location-level price overrides are not applied on this page, and the service list on a location page is the same brand-wide list for every location.
Services with no category_id are skipped entirely, so an uncategorised public service never appears.
Caching and revalidation
- Both pages export
revalidate = 3600: each rendered page is cached for up to one hour. - Saving Mini site settings refreshes the brand page and the sitemap straight away. Location pages pick up a settings change within an hour.
- Location profile edits and location hours edits (in
lib/locations/admin-actions.ts) callrevalidatePathfor/s/<brandSlug>/<locationSlug>and/s/<brandSlug>. - Staff visibility, service visibility (including bulk), brand name or theme changes do not trigger revalidation. They appear within one hour.
- Custom domain lookups are cached in memory per server process for 5 minutes (
DOMAIN_TTL_MS). Each of the two app servers has its own cache, so adding, changing or removing a domain can take up to 5 minutes to take effect, and not at the same moment on each server. A "no match" result is also cached for 5 minutes. - The sitemap is
force-dynamic(built on every request).
Data model
| Table / column | Purpose | Migration |
|---|---|---|
brands.mini_site_enabled (bool, default false) |
Master switch | 0092 |
brands.show_staff (text: all / selected / none, default all) |
Staff visibility | 0092 |
brands.show_prices (bool, default true) |
Price visibility | 0092 |
brands.tagline, brands.description |
Page copy | 0092, 0093 |
staff_members.is_public (bool, default true) |
Per-staff flag used when show_staff = 'selected' |
0092 |
services.is_public (bool, default true) |
Per-service flag | 0093 |
locations.slug (unique per brand, partial index where not null) |
URL segment; auto-generated by trigger | 0092, 0134 |
locations.description, website_url, instagram_url, facebook_url |
Location page content | 0093 |
brand_custom_domains |
One row per brand: domain (unique), cname_target (default app.salonos.in), status (domain_status enum), dns_verified_at, tls_provisioned_at, last_checked_at |
0068, 0098 |
tls_provisioned_at is reserved and not used by the app today.
Permissions
| Action | Where enforced | Who |
|---|---|---|
View /s/... |
No auth | Anyone |
| Open Mini site settings | Sidebar and marketing feature gate |
MANAGER_ROLES |
| Open Custom domain settings | Sidebar | OWNER_ROLES (super admin, org owner) |
| Save mini site settings | Signed-in user whose organisation owns the brand | Org admins |
| Toggle staff or service visibility | Signed-in user whose organisation owns the brand | Managers and owners |
| Custom domain (dedicated screen) | Settings page for owners | OWNER_ROLES |
| Custom domain (Mini site screen) | Settings page for managers | MANAGER_ROLES |
Edge cases and failure behaviour
Messages shown to users
| Situation | Message |
|---|---|
| Not signed in or no membership (mini site actions) | "Not authenticated" |
| Brand not in the caller's org | "Brand not found" |
| Settings save fails | "Could not save mini-site settings. Please try again." |
| Staff or service toggle fails | "Could not update staff visibility. Please try again." / "Could not update service visibility. Please try again." |
| Staff toggle throws | "Could not update mini-site visibility." |
| Domain empty | "Domain is required" |
| Domain contains a path | "Enter just the domain name, not a full URL" |
| Domain format wrong (dedicated screen) | "Invalid domain format" |
| Domain save fails (mini site screen) | "Could not save the custom domain. Please try again." (includes the case where another brand already owns that domain, because domain is unique; the real cause is logged server-side only) |
| Domain remove fails | "Could not remove the custom domain. Please try again." |
| Settings page cannot load brands or domains | "Could not load mini-site settings (...). Refresh the page to try again." |
| DNS not yet matching | "DNS not yet propagated — try again in a few minutes." |
Server-side errors are sent to captureError with tags such as mini_site.save_settings and mini_site.set_custom_domain.
Behaviour to be aware of
- Disabled or unknown brand: both routes 404. The slug is matched exactly against
brands.slug. - Brand with no slugged locations: the brand page shows the "No locations are open for booking yet" card.
- Location not found: 404, even if the brand exists.
- A custom domain shows the brand page. Share location and booking links using the app domain (
/s/<brandSlug>/<locationSlug>and/book/<brandSlug>), not the custom domain. - HTTPS: the app does not issue certificates for custom domains. Ask your administrator to arrange one for each new domain.
- Apex domains fail the CNAME check and are reported as DNS not propagated.
- Multiple brands: the dedicated Custom domain screen always manages the first brand by name. Use the Mini site screen to set a domain for another brand.
- Staff and
selectedmode: a staff member's "Mini site" toggle is hidden unless the brand's visibility isselected. Staff default to public, so switching toselectedshows everyone until individual flags are turned off. - Disabling the mini site immediately blocks new renders, but cached pages can linger up to an hour (the settings save does revalidate the brand page).
Source
| Area | Path |
|---|---|
| Public brand page | web/src/app/(public)/s/[brandSlug]/page.tsx |
| Public location page | web/src/app/(public)/s/[brandSlug]/[locationSlug]/page.tsx |
| Public layout | web/src/app/(public)/layout.tsx |
| Public read queries | web/src/lib/mini-site/queries.ts |
| Types, formatting, JSON-LD hours | web/src/lib/mini-site/types.ts, web/src/lib/mini-site/utils.ts |
show_staff guard |
web/src/lib/mini-site/show-staff.ts |
| Mini site server actions (settings, staff and service visibility, domain) | web/src/lib/mini-site/admin-actions.ts |
| Mini site settings UI | web/src/app/(tenant)/dashboard/settings/mini-site/ |
| Custom domain library and actions | web/src/lib/custom-domains/index.ts, web/src/lib/custom-domains/admin-actions.ts |
| Custom domain settings UI | web/src/app/(tenant)/dashboard/settings/custom-domain/ |
| Domain routing | web/src/proxy.ts (resolveDomain), web/src/lib/routing/app-hosts.ts |
| Sitemap | web/src/app/sitemap.ts |
| Revalidation on location edits | web/src/lib/locations/admin-actions.ts |
| Navigation entries | web/src/lib/nav/sections.ts |
| Migrations | web/supabase/migrations/0068_custom_domains_imports.sql, 0092_mini_site.sql, 0093_mini_site_extras.sql, 0098_custom_domain_public_read.sql, 0134_location_slug_trigger.sql |