An open API service indexing awesome lists of open source software.

https://github.com/dennis-menge/watchdoo

Standalone Apple Watch app for the Cookidooยฎ shopping list, with self-hosted FastAPI backend.
https://github.com/dennis-menge/watchdoo

apple-watch cookidoo fastapi ios self-hosted shopping-list swiftui thermomix watchos

Last synced: about 4 hours ago
JSON representation

Standalone Apple Watch app for the Cookidooยฎ shopping list, with self-hosted FastAPI backend.

Awesome Lists containing this project

README

          


Watchdoo logo

Watchdoo


Your Cookidoo shopping list on the Apple Watch.


A standalone watchOS app that accesses the shopping list from the Cookidoo app (Thermomix/Vorwerk) through a self-hosted backend. UI languages: ๐Ÿ‡ฉ๐Ÿ‡ช German, ๐Ÿ‡ฌ๐Ÿ‡ง English.

## โš ๏ธ Disclaimer

This project uses an **unofficial API** (via [cookidoo-api](https://github.com/miaucl/cookidoo-api)). It is not affiliated with Vorwerk or Cookidoo. Use at your own risk โ€” it may violate Cookidoo's Terms of Service.

*Cookidooยฎ and Thermomixยฎ are registered trademarks of Vorwerk International AG. This project is not affiliated with, endorsed by, or sponsored by Vorwerk.*

## Architecture

```
Apple Watch (SwiftUI) โ†โ†’ Your Backend (FastAPI) โ†โ†’ Cookidoo Server
(Azure Container Apps)
```

- **Self-hosted**: each user runs their own backend
- **Cookidoo credentials** never leave your own server
- **Watch โ†” Backend**: secured via API key

## Features

- ๐Ÿ›’ View the shopping list (grouped by category or by recipe)
- โœ… Check items off as bought
- โž• Add your own custom items
- ๐Ÿ—‘๏ธ Delete custom items and recipe ingredients
- โŒš Standalone โ€” no iPhone required at runtime
- ๐Ÿ“ฑ iPhone companion app for one-time setup (server URL + API key sent via WatchConnectivity)

## Requirements

- Cookidoo account (with active subscription)
- Azure account (for Container Apps) or Docker for local hosting
- Xcode 15+ (for the Watch app)
- Apple Watch with watchOS 10+

## ๐Ÿš€ Quick Start

### 1. Run the backend locally

```bash
cd backend
cp .env.example .env
# Edit .env: enter your email, password, and an API key

pip install -r requirements.txt
uvicorn app.main:app --reload
```

Test it:
```bash
curl http://localhost:8000/api/v1/health
curl -H "X-API-Key: your-key" http://localhost:8000/api/v1/shopping-list
```

### 2. Deploy the backend to Azure

```bash
# Set environment variables
export COOKIDOO_EMAIL="you@email.com"
export COOKIDOO_PASSWORD="your-password"
export API_KEY=$(openssl rand -hex 32)

cd backend/deploy
./deploy.sh
```

The script prints the backend URL on completion.

### 3. Install the Watch app

1. Open `Watchdoo/Watchdoo/Watchdoo.xcodeproj` in Xcode
2. **Change the bundle identifiers** (in `Signing & Capabilities` for each target):
- Replace `com.example.Watchdoo*` with your own reverse-DNS ID (e.g. `dev.yourname.Watchdoo*`)
- Select your Apple Developer Team
3. Build & run the companion app on iPhone (scheme: `Watchdoo`)
4. Build & run the Watch app (scheme: `Watchdoo Watch App`)
5. On the iPhone: enter the server URL and API key โ†’ "Send to Watch"

> The `WKCompanionAppBundleIdentifier` link between the Watch and iPhone targets must stay consistent โ€” otherwise the Watch will not find its iPhone counterpart.

## API Endpoints

| Method | Endpoint | Description |
|----------|-----------------------------------------------------|-----------------------------------|
| `GET` | `/api/v1/health` | Health check (no auth) |
| `GET` | `/api/v1/shopping-list` | Full shopping list |
| `PATCH` | `/api/v1/shopping-list/ingredients` | Toggle ingredients as bought |
| `PATCH` | `/api/v1/shopping-list/additional-items/ownership` | Toggle custom items as bought |
| `POST` | `/api/v1/shopping-list/additional-items` | Add custom items |
| `PUT` | `/api/v1/shopping-list/additional-items` | Edit custom items |
| `DELETE` | `/api/v1/shopping-list/additional-items/{id}` | Delete a custom item |
| `DELETE` | `/api/v1/shopping-list/recipes/{recipe_id}` | Remove a recipe's ingredients |
| `POST` | `/api/v1/auth/refresh` | Refresh the Cookidoo token |

All endpoints (except `/health`) require the `X-API-Key` header.

## Project Layout

```
watchdoo/
โ”œโ”€โ”€ backend/
โ”‚ โ”œโ”€โ”€ app/
โ”‚ โ”‚ โ”œโ”€โ”€ main.py # FastAPI app
โ”‚ โ”‚ โ”œโ”€โ”€ config.py # Settings
โ”‚ โ”‚ โ”œโ”€โ”€ models.py # Pydantic models
โ”‚ โ”‚ โ”œโ”€โ”€ middleware.py # API-key auth
โ”‚ โ”‚ โ”œโ”€โ”€ routers/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ shopping_list.py # Shopping-list endpoints
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ auth.py # Auth endpoints
โ”‚ โ”‚ โ””โ”€โ”€ services/
โ”‚ โ”‚ โ””โ”€โ”€ cookidoo.py # Cookidoo API wrapper
โ”‚ โ”œโ”€โ”€ Dockerfile
โ”‚ โ”œโ”€โ”€ requirements.txt
โ”‚ โ””โ”€โ”€ deploy/
โ”‚ โ””โ”€โ”€ deploy.sh # Azure 1-click deploy
โ””โ”€โ”€ Watchdoo/ # Xcode workspace
โ””โ”€โ”€ Watchdoo/
โ”œโ”€โ”€ Watchdoo Watch App/ # watchOS target
โ”‚ โ”œโ”€โ”€ WatchdooApp.swift
โ”‚ โ”œโ”€โ”€ Models/
โ”‚ โ”œโ”€โ”€ Views/
โ”‚ โ”œโ”€โ”€ Services/
โ”‚ โ””โ”€โ”€ Connectivity/
โ””โ”€โ”€ Watchdoo/ # iOS companion target
โ”œโ”€โ”€ WatchdooCompanionApp.swift
โ”œโ”€โ”€ Views/
โ””โ”€โ”€ Services/
```

## Costs

- **Azure Container Apps**: ~โ‚ฌ3โ€“5 per month (scales to zero when idle)
- **Cookidoo subscription**: existing subscription required

## License

MIT โ€” see [LICENSE](LICENSE).

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md). Please report security issues per [SECURITY.md](SECURITY.md).

---

> Cookidooยฎ and Thermomixยฎ are registered trademarks of Vorwerk International AG.
> This project is an independent, community-built tool and is **not affiliated with, endorsed by, or sponsored by Vorwerk**. All trademarks remain the property of their respective owners.