# Google Search Console Integration - Hinweise von Opus

**LIES DAS BEVOR DU WEITERMACHST**

## Credentials

- **Pfad lokal:** `storage/app/google-credentials.json`
- **Pfad IONOS:** `~/hosts/soulsize.de/laravel/storage/app/google-credentials.json`
- **Service Account:** `soulsize-gsc@soulsize-seo.iam.gserviceaccount.com`
- **Projekt-ID:** `soulsize-seo`
- Die Datei ist SCHON DA, nicht neu anlegen!

## .env Variable setzen

```
GOOGLE_APPLICATION_CREDENTIALS=storage/app/google-credentials.json
GOOGLE_SEARCH_CONSOLE_SITE=https://soulsize.de
```

## IONOS-Einschraenkungen (WICHTIG!)

1. **Kein Redis** → `CACHE_STORE=file` — wenn du Caching fuer GSC-Daten baust, nutze File-Cache
2. **PHP auf IONOS ist `php8.4-cli`**, NICHT `php`
3. **Kein Node/NPM** auf Server — Assets lokal bauen
4. **MySQL 8.0** — kein `DELETE ... WHERE NOT EXISTS (SELECT FROM same_table)`

## Architektur-Vorschlag

- Config: `config/services.php` oder eigene `config/google.php`
- Service: `App\Services\SearchConsoleService`
- Artisan Command: `php artisan gsc:fetch` (fuer Cron)
- Daten in DB speichern (nicht nur Cache) — dann Filament-Widget draus bauen
- Migration: `search_console_data` Tabelle (date, query, clicks, impressions, ctr, position)

## .gitignore

`storage/app/google-credentials.json` ist NICHT in .gitignore — MUSS rein! Secrets gehoeren nicht ins Repo.

---
*Geschrieben von Opus-Session, 2026-04-12*
