Integrations
Build a custom storefront
Progare’s hosted templates cover most stores. When you need a fully custom design or a native app, build your own frontend on the same API — the merchant keeps managing products, orders and content in their dashboard.
How Progare’s own storefront works
There’s no per-store code. One storefront app serves every store, and works out which store to render from the request’s domain. You can use exactly the same approach:
- Read the request’s host (e.g.
mybrand.com). - Resolve it to a store slug.
- Fetch content and catalog for that slug, and render.
Resolve a domain to a store
/stores/resolve-host?host=mybrand.comPublicwww.) or a Progare subdomain. Returns null if no live store uses that host.{
"slug": "mahi-studio",
"storeName": "Mahi Studio",
"templateSlug": "boutique-rose",
"themeTokens": { "color-primary": "#551F35", "font-heading": "…" },
"layoutVariant": "classic"
}If your frontend serves only one store, skip this and hard-code the slug in an environment variable.
Templates
/templatesPublicthemeTokens (colors and fonts as CSS custom properties)./templates/{slug}PublicApply themeTokens as CSS variables to reuse a template’s palette in your own design.
Build it step by step
Set up the store
The merchant creates the store and adds products in the dashboard as usual. Note the store slug, and create a test store for development.
Render pages server-side
Fetch
/content/sitefor the header and footer,/content/homefor the home page, and/products,/products/{slug}and/categoriesfor the shop. Cache them — for example with Next.js revalidation — since content changes rarely.tsconst API = process.env.PROGARE_API_URL ?? "https://api.progare.com"; const SLUG = process.env.PROGARE_STORE_SLUG!; export async function getProduct(slug: string) { const res = await fetch(`${API}/storefront/${SLUG}/products/${slug}`, { next: { revalidate: 300 }, }); if (res.status === 404) return null; if (!res.ok) throw new Error(`Progare API ${res.status}`); return res.json(); }Add SEO
Use the SEO endpoints for meta tags and
sitemap.xml, and check/seo/redirectbefore returning a 404 so the merchant’s redirects keep working.Add cart, checkout and accounts
Follow Cart & checkout and Shopper accounts. Keep the cart session and shopper token on the device.
Go live
Point the domain at your own hosting. If the merchant previously connected it to Progare, they should remove it from their Progare store first.
Something unclear or out of date? Tell us