Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 69 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,85 @@
<!--
Get your module up and running quickly.
# 🛍️ Laioutr Emporix Integration

Find and replace all on all files (CMD+SHIFT+F):
- Name: My Laioutr App
- Package name: my-laioutr-app
- Description: My new Laioutr App
-->
This repository contains the official Emporix integration for the **Laioutr** framework. This connector provides a comprehensive set of features to connect your Laioutr application with an Emporix backend, enabling full e-commerce functionality.

# My Laioutr App
This connector handles sessions, customer data, cart management, product retrieval, reviews, and more.

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]
---

My new Laioutr App for doing amazing things using Nuxt.
## ✨ Features

- [✨ &nbsp;Release Notes](/CHANGELOG.md)
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-laioutr-app?file=playground%2Fapp.vue) -->
<!-- - [📖 &nbsp;Documentation](https://example.com) -->
This integration provides a robust bridge to Emporix, supporting the following features:

## Features
### 👤 Customer & Session Management

<!-- Highlight some of the features your module provide here -->
- **Anonymous Sessions:** Track users and persist carts before they log in.

- ⛰ &nbsp;Foo
- 🚠 &nbsp;Bar
- 🌲 &nbsp;Baz
### 🛒 Cart Management

## Quick Setup
- **Get Current Cart:** Retrieve the active shopping cart for the current session.
- **Add Item to Cart:** Seamlessly add products and variants to the user's cart.

Before installing dependencies, you need to create a copy of the `.npmrc.config` file called `.npmrc` and fill in the `NPM_LAIOUTR_TOKEN` with your npm token. You can find this token in your [project settings](https://cockpit.laioutr.cloud/o/_/p/_/settings).
### 🗂️ Category & Navigation

- `pnpm i`
- `npx @laioutr/cli project fetch-rc -p <organization slug>/<project slug> -s <project secret key>` - This will load the `laioutrrc.json` file with the current remote project configuration.
- `pnpm dev:prepare`
- `pnpm orchestr-dev`
- **Category List:** Fetch a flat list of all available categories.
- **Category Tree by Alias:** Retrieve a nested category structure by its alias (e.g., for building navigation menus).

That's it! You can now use My Laioutr App in your Laioutr Frontend ✨
### 📦 Product & Catalog

## Contribution
- **Get Product by Slug:** Retrieve detailed information for a single product.
- **Products by Category ID:** Get a list of all products within a specific category using its ID.
- **Products by Category Slug:** Get a list of all products within a specific category using its URL slug.
- **Product Variants:** Fetch all available variants (e.g., size, color) for a product.

Follow the [setup guide](https://docs.laioutr.io/developer-guide/setup) to get started.
---

<!-- Badges -->
## 🚀 Installation

[npm-version-src]: https://img.shields.io/npm/v/my-laioutr-app/latest.svg?style=flat&colorA=020420&colorB=00DC82
[npm-version-href]: https://npmjs.com/package/my-laioutr-app
[npm-downloads-src]: https://img.shields.io/npm/dm/my-laioutr-app.svg?style=flat&colorA=020420&colorB=00DC82
[npm-downloads-href]: https://npm.chart.dev/my-laioutr-app
[license-src]: https://img.shields.io/npm/l/my-laioutr-app.svg?style=flat&colorA=020420&colorB=00DC82
[license-href]: https://npmjs.com/package/my-laioutr-app
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
[nuxt-href]: https://nuxt.com
_(You can replace this with your actual installation instructions)_

```bash
# Using npm
npm install @laioutr/emporix-connector

# Using yarn
yarn add @laioutr/emporix-connector
```

---

## ⚙️ Configuration & Usage

To get started, you need to configure the connector with your Emporix API credentials inside `nuxt.config.ts`. We recommend using environment variables:

```typescript
defineNuxtConfig({
/* [...] */
modules: ["@laioutr-app/emporix"],
/* [...] */
"@laioutr-app/emporix": {
baseURL: "https://api.emporix.io",
clientId: import.meta.env.EMPORIX_CLIENT_ID,
clientSecret: import.meta.env.EMPORIX_CLIENT_SECRET,
tenant: "laioutr",
},
/* [...] */
});
```

---

## 🤝 Contributing

Contributions are welcome\! Please feel free to submit a Pull Request or open an issue for bugs, feature requests, or improvements.

1. Fork the repository.
2. Create your feature branch (`git checkout -b feature/AmazingFeature`).
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`).
4. Push to the branch (`git push origin feature/AmazingFeature`).
5. Open a Pull Request.

---

## 📄 License

This project is licensed under the [LICENSE\_NAME] License. See the `LICENSE` file for details.
Loading