> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# StateSet Demo App

> Demo application showcasing StateSet platform workflows, agent interactions, and commerce integrations.

# StateSet Demo App

The StateSet Demo App is a reference application that demonstrates core platform capabilities — order management, return processing, AI agent interactions, and third-party integrations — in a working frontend.

## What's Included

* **Order workflows** — Create, fulfill, ship, and manage orders through the full lifecycle.
* **Return processing** — Initiate returns, generate RMAs, and process refunds.
* **AI agent interaction** — Chat with a StateSet Response agent that retrieves live commerce data.
* **Inventory management** — View stock levels, adjust quantities, and transfer between locations.
* **Integration demos** — Working examples of Shopify, Stripe, and Gorgias integrations.

## Run Locally

### Prerequisites

* Node.js v18+
* A StateSet API key

### Setup

```bash theme={null}
git clone https://github.com/stateset/stateset-demo-app.git
cd stateset-demo-app
npm install
```

### Configure Environment

```env theme={null}
STATESET_API_KEY=your_api_key
NEXT_PUBLIC_APP_URL=http://localhost:3000
```

### Start the App

```bash theme={null}
npm start
```

Open [http://localhost:3000](http://localhost:3000).

## Demo Scenarios

| Scenario           | Description                                                        |
| ------------------ | ------------------------------------------------------------------ |
| **Order-to-cash**  | Create an order, capture payment, fulfill, and ship                |
| **Return flow**    | Customer-initiated return through inspection and refund            |
| **Agent chat**     | Ask the AI agent about order status, return policies, or inventory |
| **Inventory sync** | Update stock across multiple warehouse locations                   |

## Architecture

```
Demo App (Next.js)
    │
    ├── StateSet One API (orders, returns, inventory)
    ├── StateSet Response API (AI agents)
    ├── Shopify (product data)
    └── Stripe (payments)
```

## Related Documentation

* [Demo App README](/stateset-demo-app/README)
* [API Reference](/api-reference/introduction)
* [Orders Quickstart](/guides/orders-quickstart)
* [Response Quickstart](/guides/response-quickstart)
