Skip to content

Commit

Permalink
blog
Browse files Browse the repository at this point in the history
  • Loading branch information
saadeghi committed Jan 23, 2025
1 parent 8008ea1 commit 80d7a76
Showing 1 changed file with 14 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "Introducing: Online store template for NextJS and daisyUI"
desc: Learn to create a professional online store using our Online Store Template, powered by Lemon Squeezy API and customizable product data.
title: "A daisyUI + Next.js template that converts your Lemon Squeezy API into an online store"
desc: Convert yout Lemon Squeezy API data into a professional online store.
published: true
date: 2025-01-18
date: 2025-01-23
thumbnail: https://img.daisyui.com/images/blog/online-store-template-thumbnail.webp
author: Abhijeet Biswal
tags:
Expand All @@ -11,15 +11,13 @@ tags:

## Introduction

Creating an online store has never been easier! With the ["Online Store Template"](https://www.daisyui.com/store/#426780) available at Official [daisyUI store](https://www.daisyui.com/store), you can quickly set up a professional store using Next.js, TypeScript, and the Lemon Squeezy API. This template allows for extensive customization with additional metadata stored in JSON files. Let’s dive in!
Setting up an online store can be a complex task or a really expensive one. We recently added a new ["Online Store Template"](https://www.daisyui.com/store/#426780) to daisyUI store which can help you build a professional online store with minimal effort. This template is built using Next.js and receives data from the Lemon Squeezy API. It is fully customizable and can be deployed to any platform that supports Next.js.

## 1. Installation

Begin by setting up the project dependencies.
Get the ["Online Store Template"](https://www.daisyui.com/store/#426780) from the daisyUI store and follow these steps to set up your online store:

### Step 1: Install Dependencies

Run the following command in your terminal to install the required dependencies:
Open the project and run the following command in your terminal to install the required dependencies:

```bash
npm install
Expand All @@ -31,13 +29,11 @@ To start the development server:
npm run dev
```

This will run your site in development mode at `http://localhost:3000`.

## 2. Configure Your Site
This will run your site in development mode at `http://localhost:3000`

### Adding Your Lemon Squeezy API
## 2. Configure your site

#### Step 1: Configure the API
### Add Lemon Squeezy API

By default, the site displays example data from the `data/lemonsqueezy-products.example.json` file. To connect your store to Lemon Squeezy, follow these steps:

Expand All @@ -61,9 +57,7 @@ Replace `your_api_key_here` with the API key you copied earlier.
3. **Test Your Integration**
Restart the development server to load the environment variables and see your products fetched from Lemon Squeezy.

### Extending Product Data

#### Step 2: Add Metadata
### Extending product data

The Lemon Squeezy dashboard allows limited customization of product data. To enhance your store’s functionality, use the `data/metadata.json` file for additional information. This includes:

Expand Down Expand Up @@ -95,17 +89,13 @@ Example `metadata.json` entry:
}
```

### Configure Your Site

#### Step 3: Customizing the Site
#### Customizing the site

To personalize your store’s content and design, edit the following files:

1. **`data/site.ts`**: Update the global site settings, including the site name, hero section, and footer content.
2. **`data/sidebar.ts`**: Modify the sidebar content, including categories and quick links.

#### Editing Pages

To customize the core pages of your store, update these files:

![pages route](https://img.daisyui.com/images/blog/pages-route-example.webp)
Expand Down Expand Up @@ -159,7 +149,7 @@ To customize the core pages of your store, update these files:
};
```

## 3. Build Your Store for Production
## 3. Build your site for production

Once you're happy with your store, it's time to build it for production:

Expand All @@ -169,7 +159,7 @@ npm run build

This command will optimize and generate your site’s static assets, ready for deployment.

## 4. Deployment Options
## 4. Deployment options

Now that your store is built, you can deploy it using one of the following platforms:

Expand All @@ -182,6 +172,6 @@ It can also be deployed anywhere Next.js works. For more details, refer to the [

The ["Online Store Template"](https://www.daisyui.com/store/#426780) by daisyUI simplifies the process of building and managing an online store. With Lemon Squeezy API and customizable JSON metadata, you have the flexibility to create a store that meets your unique needs. Start building your store today and take your business to the next level!

## Need Help?
## Need help?

If you have questions or need assistance, join our [Discord community](https://daisyui.com/discord/). We’re here to help you get started and troubleshoot any issues.

0 comments on commit 80d7a76

Please sign in to comment.