# SHIRE 3D Manager — Standalone

Local-first business manager and SHIRE Merchant assistant for SHIRE 3D. It has no hosted builder, hosted database or paid AI dependency.

## Run it

Requirements: Node.js 20 or newer. Ollama is optional but recommended.

```bash
npm install
cp .env.example .env
npm run dev
```

Open `http://127.0.0.1:5173`. For production, use `npm run build`, then `npm start` and open `http://127.0.0.1:4173`.

## Local design

- React interface and local Node.js API
- JSON data in `data/`
- Product images in `data/uploads/`
- Marketplace tokens encrypted with AES-256-GCM and a local key
- SHIRE Merchant through Ollama (`ollama pull qwen2.5:7b`)
- Offline-safe copy and analysis if Ollama is unavailable
- Explicit Ray approval required for marketplace writes

The server binds to `127.0.0.1` by default and opens no public router port.

## Etsy

Copy `.env.example` to `.env`, enter the Etsy app key and shared secret, and register the exact callback URL `http://127.0.0.1:4173/etsy/callback`. During development, use port `5173` if that callback is registered. Etsy connects through OAuth with stored, expiring, single-use state. Draft creation is approval-gated and audited.

## ARMOR OS

The integration surface is:

- `GET /api/health`
- `GET /api/assistant/status`
- `POST /api/assistant/chat` with `{ "message": "..." }`

ARMOR OS should call it only through localhost or Tailscale. Etsy is the first working marketplace adapter. eBay and `shire3d.com` will sit behind the same catalogue, assistant and approval policy.

## Backup

Back up the entire `data/` folder privately. The `data/.secret-key` file is needed to decrypt marketplace tokens.
