# Klaar voor integratie — galerij

## Tien kant-en-klare projecten voor typische scenario's

Elk recept is één bestand, zonder build-stap. Plak je API-sleutel erin → voer uit met `npx tsx` of `python` → klaar.

Alle recepten hieronder zijn kopiëren-plakken-klaar: sleutel via `X-Api-Key`-header, verzoeken via standaard `fetch` of `requests`. SDK's voor TypeScript / Python zijn gepland — voor nu is dit voldoende.

## Wat vind je in de galerij

| # | Recept | Stack | Use case |
|---|---|---|---|
| 1 | Dagelijkse horoscoop per SMS | Twilio + Node.js | Cron die dagelijkse horoscopen naar gebruikers stuurt via SMS |
| 2 | Discord-bot `/chart` | discord.js | Slash-commando — iedereen in de chat kan een natal chart maken |
| 3 | OpenAI function-calling | openai + Node.js | GPT haalt zelf charts op via tool-calls |
| 4 | Slack-bot `/synastry` | @slack/bolt | Kantoorcommando om compatibiliteit met één regel te checken |
| 5 | Notion-verrijking | @notionhq/client | Geboortedatum in database → volledige natal chart automatisch |
| 6 | Cloudflare Worker cache | CF Workers KV | Edge-cache voor identieke verzoeken tot 30 dagen |
| 7 | Claude MCP tools | @astroway/mcp | Claude Desktop / Code roept API aan als native tool |
| 8 | Export van voorspelling naar CSV | Python + pandas | 12-maanden voorspelling → CSV voor BI / Tableau |
| 9 | UI voor rectificatie in Streamlit | Python + Streamlit | Interactieve UI voor rectificatie van geboortetijd |
| 10 | Compatibiliteitsservice op FastAPI | Python + FastAPI | HTTP-service voor dating-apps: 2 charts → score |

## Hoe gebruik je ze

1. Kopieer het gewenste bestand naar je project.
2. Installeer de afhankelijkheden uit de kop van het bestand (`npm install ...` of `pip install ...`).
3. Stel de env-variabelen in (minimaal `ASTROWAY_API_KEY`).
4. Voer uit.

## Patronen in de galerij

- **Eénmalig script** (1, 5, 8) — batchverwerking in cron-stijl.
- **Langlevende bot** (2, 4) — permanente verbinding, luistert naar slash-commando's.
- **HTTP-service** (10) — drop-in REST naar jouw autorisatie.
- **Edge-functie** (6) — cachelaag tussen client en API.
- **LLM-integratie** (3, 7) — endpoints als functies voor AI.
- **UI** (9) — interactieve front-ends.

## Nog niet gedekt

Als jouw scenario niet in de lijst staat (bijv. Telegram-bot, n8n-workflow, Zapier-actie, ingebouwde widget op een website) — **mail dan naar [api@astroway.info](mailto:api@astroway.info?subject=Integration%20recipe)** met een beschrijving. We voegen recepten toe op basis van echte verzoeken, we raden niet.
