# wails3_init_updater

This example started from the upstream scaffold generated on March 12, 2026 with:

```bash
go run github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-alpha.74 init \
  -n updater-example \
  -t vanilla-ts \
  -d examples/wails3_init_updater \
  -q \
  -skipgomodtidy
```

It has been adapted to consume the local updater library from this repository.

## What it demonstrates

- a Wails 3 app binding the updater controller through a thin Wails service
- an authenticated HTTP manifest provider
- generated Wails bindings for updater methods
- a mock update server for local testing

## Running the mock server

```bash
go run ./cmd/mockupdateserver
```

The server listens on `http://127.0.0.1:18765` and expects:

- `Authorization: Bearer test-token`

## Running the app

```bash
wails3 task dev
```

The app reads:

- `UPDATER_MANIFEST_URL`
- `UPDATER_TOKEN`

Defaults:

- `UPDATER_MANIFEST_URL=http://127.0.0.1:18765/manifest.json`
- `UPDATER_TOKEN=test-token`

## Backend verification

```bash
go test ./...
```

The example test covers controller/service construction against the mock authenticated feed without launching a GUI.
