Launch a Markkët site with Astro

Launch with Headless Markkët and Astro

What if your content team could manage products, pages, images, and articles from a dashboard, while your website remained a completely custom application?

That's the idea behind Markkët's headless architecture. Markkët handles the content and commerce layer. Your frontend is just a client of the API

In this tutorial, we'll take the Markkët Astro template, connect it to a Markkët store, run it locally, and deploy it as a static site with GitHub Actions

By the end, you'll have a workflow that looks like this:

Markkët Dashboard
       │
       │ content, images, products
       ▼
   Markkët API
       │
       ▼
 Astro JS site
       │
       ▼
 GitHub Actions
       │
       ▼
 Static deployment

The important part is that your content and your frontend are decoupled

1. Create your Markkët store

Start by creating a store in Markkët

From the dashboard you can manage the content that your application will consume:

  • Pages
  • Articles
  • Images and media
  • Products
  • Collections
  • Store information
  • Commerce data

Every store has a unique slug

You'll use that slug to tell your Next.js application which Markkët store it should connect to.

For example:

my-awesome-store

2. Clone the Astro starter

The easiest way to get started is with the Markkët Next.js template:

Clone it locally:

git clone https://github.com/calimania/markketplace-astro.git
cd markketplace-astro

Install the dependencies:

npm install

3. Connect the application to your store

Create a local environment file:

.env.local

Then add your Markkët store slug:

STORE_SLUG=my-awesome-store

Replace my-awesome-store with the slug of your actual Markkët store

4. Run it locally

Start the development server:

npm run dev

5. Customize the frontend

You can change the layout, styles, navigation, components, typography, animations, and anything else you would normally change in an application, or use it as reference to start with any Astro template compatible with the content layer

6. Products and checkout

If your Markkët store has products, the application can use the commerce components provided by the template

A typical flow looks like:

Product
   ↓
Product page
   ↓
Add to cart
   ↓
Checkout
   ↓
Payment
   ↓
Order Receipt & Email

7. Preview before publishing

You can make changes in Markkët while running your application locally

That gives you a simple preview loop:

Edit content
     ↓
Save in Markkët
     ↓
Restart the app to pull new content
     ↓
Make frontend changes if needed
     ↓
Commit
     ↓
Deploy

8. Deploy it anywhere

You can deploy the generated site to platforms such as GitHub Pages or Cloudflare's static hosting, depending on your project's configuration

A different way to build commerce

With Markkët, you can start right now with a working application and gradually take control of the parts that matter.

headless

From this store

headless

Markkët headless CMS dashboard, for reviewing stores and creating new ones that won't display in the /mall at markket.place