> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/Antony-Figueroa/my-evershop-app/llms.txt
> Use this file to discover all available pages before exploring further.

# Extensions Overview

> Learn about the available extensions that enhance your EverShop store

## Available Extensions

This EverShop application includes several extensions that add powerful functionality to your e-commerce store. Extensions are modular components that can be enabled or disabled through the configuration system.

<CardGroup cols={2}>
  <Card title="Offline Payments" icon="money-bill" href="/extensions/offline-payments">
    Cash on delivery and bank transfer payment methods
  </Card>

  <Card title="Product Catalog" icon="box" href="/extensions/product-catalog">
    Enhanced product information for supplements
  </Card>

  <Card title="Product Reviews" icon="star" href="/extensions/product-reviews">
    Customer reviews and ratings for products
  </Card>

  <Card title="Sample Extension" icon="flask" href="/guides/creating-extensions">
    Example extension showing all capabilities
  </Card>
</CardGroup>

## Active Extensions

The following extensions are currently enabled in your EverShop application:

| Extension         | Status     | Purpose                                            |
| ----------------- | ---------- | -------------------------------------------------- |
| `offlinePayments` | ✅ Enabled  | Cash on delivery and bank transfer payment options |
| `productCatalog`  | ✅ Enabled  | Enhanced product information display               |
| `productReviews`  | ✅ Enabled  | Customer review system                             |
| `sample`          | 🧪 Example | Reference implementation for developers            |

## Extension Architecture

Extensions in EverShop follow a modular architecture where each extension can provide:

<Accordion title="API Endpoints">
  Extensions can add REST API endpoints to handle custom business logic. Each endpoint is defined with a `route.json` file and handler functions.

  See [Creating API Endpoints](/guides/api-endpoints) for details.
</Accordion>

<Accordion title="Page Components">
  Extensions can inject React components into specific areas of your store's pages. Components are registered with layout configuration specifying their area and sort order.

  See [Creating Page Components](/guides/page-components) for details.
</Accordion>

<Accordion title="Event Subscribers">
  Extensions can listen to system events like product creation, order placement, or customer registration to trigger custom actions.

  See [Event Subscribers](/guides/event-subscribers) for details.
</Accordion>

<Accordion title="GraphQL Types">
  Extensions can extend the GraphQL schema with custom types, queries, and mutations to expose additional data.

  See [GraphQL Concepts](/concepts/graphql) for details.
</Accordion>

<Accordion title="Cron Jobs">
  Extensions can schedule recurring background tasks to run at specific intervals.

  See [Cron Jobs](/guides/cron-jobs) for details.
</Accordion>

## Configuring Extensions

Extensions are configured in the `config/default.json` file:

```json theme={null}
{
  "system": {
    "extensions": [
      {
        "name": "offlinePayments",
        "resolve": "extensions/offlinePayments",
        "enabled": true
      },
      {
        "name": "productCatalog",
        "resolve": "extensions/productCatalog",
        "enabled": true
      },
      {
        "name": "productReviews",
        "resolve": "extensions/productReviews",
        "enabled": true
      }
    ]
  }
}
```

<Note>
  Extensions are loaded in the order they appear in the configuration. This can affect component rendering order and event handler execution.
</Note>

## Creating Your Own Extensions

To create a new extension:

<Steps>
  <Step title="Create extension directory">
    Create a new directory under `extensions/` with your extension name:

    ```bash theme={null}
    mkdir -p extensions/myExtension/src
    ```
  </Step>

  <Step title="Add package.json and tsconfig.json">
    Configure your extension's dependencies and TypeScript settings:

    ```json package.json theme={null}
    {
      "name": "myExtension",
      "version": "1.0.0",
      "type": "module"
    }
    ```
  </Step>

  <Step title="Register in configuration">
    Add your extension to `config/default.json`:

    ```json theme={null}
    {
      "name": "myExtension",
      "resolve": "extensions/myExtension",
      "enabled": true
    }
    ```
  </Step>

  <Step title="Add functionality">
    Create API endpoints, page components, subscribers, or GraphQL types as needed.

    See the [Creating Extensions Guide](/guides/creating-extensions) for complete details.
  </Step>
</Steps>

## Next Steps

<CardGroup cols={2}>
  <Card title="Offline Payments" icon="money-bill" href="/extensions/offline-payments">
    Learn about cash on delivery and bank transfer options
  </Card>

  <Card title="Product Catalog" icon="box" href="/extensions/product-catalog">
    Enhanced product information for supplements
  </Card>

  <Card title="Product Reviews" icon="star" href="/extensions/product-reviews">
    Customer review system documentation
  </Card>

  <Card title="Creating Extensions" icon="plus" href="/guides/creating-extensions">
    Build your own custom extensions
  </Card>
</CardGroup>
