diff --git a/AGENTS.md b/AGENTS.md index e5b597a..9948217 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -79,7 +79,8 @@ docs/ ├── DIRECTUS-SETUP.md # Directus Backend Setup ├── DIRECTUS-SCHEMA.md # Collection-Strukturen & Permissions ├── MONETIZATION.md # Monetarisierung & Anti-Abuse -└── pow-server/ # PHP PoW-Captcha Server (pow.dgray.io) +├── pow-server/ # PHP PoW-Captcha Server (pow.dgray.io) +└── og-proxy.php # Open Graph Meta-Tag Proxy (pow.dgray.io) css/ ├── fonts.css # @font-face Definitionen (Inter, Space Grotesk) @@ -88,7 +89,8 @@ css/ └── components.css # UI-Komponenten (Buttons, Cards, etc.) assets/ -└── fonts/ # Self-hosted Fonts (Inter, Space Grotesk) +├── fonts/ # Self-hosted Fonts (Inter, Space Grotesk) +└── press/ # Press Kit (Logos, OG-Image, Brand Guidelines) tests/ ├── index.html # Test-Runner UI (im Browser öffnen) diff --git a/README.md b/README.md index 2019f97..04bfdec 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ dgray.io ermöglicht es Nutzern, Kleinanzeigen zu schalten und Waren/Dienstleist ### Services - **Directus** Backend: `api.dgray.io` (Docker) -- **PoW Captcha + Payment Proxy**: `pow.dgray.io` (PHP, HMAC-signierte Challenges, BTCPay Proxy + Webhook) +- **PoW Captcha + Payment Proxy**: `pow.dgray.io` (PHP, HMAC-signierte Challenges, BTCPay Proxy + Webhook, OG Meta Proxy) - **BTCPay Server**: `pay.xmr.rocks` (Monero-Zahlungen, Trocador-Plugin) - **TweetNaCl**: Self-hosted in `js/vendor/` (E2E-Verschlüsselung) @@ -219,6 +219,7 @@ dgray/ - [x] PoW Captcha (server-seitig via pow.dgray.io, HMAC-signiert) - [x] TweetNaCl self-hosted (kein CDN) - [x] In-App Benachrichtigungen (Notifications-Service, Glocke mit Badge) +- [x] Open Graph & X Card Meta-Tags (dynamisch pro Listing) - [ ] Push-Benachrichtigungen (Web Push API) ### Phase 4: Payments diff --git a/docs/pow-server/og-proxy.php b/docs/pow-server/og-proxy.php new file mode 100644 index 0000000..b0bbc27 --- /dev/null +++ b/docs/pow-server/og-proxy.php @@ -0,0 +1,112 @@ + [ + 'Authorization: Bearer ' . DIRECTUS_TOKEN, + ], + CURLOPT_RETURNTRANSFER => true, + CURLOPT_TIMEOUT => 5, + ]); + $response = curl_exec($ch); + curl_close($ch); + + $data = json_decode($response, true); + $listing = $data['data'] ?? null; + + if ($listing) { + $title = htmlspecialchars($listing['title'] ?? '') . ' – dgray.io'; + $description = htmlspecialchars(mb_substr($listing['description'] ?? '', 0, 160)); + $url = $siteUrl . '/#/listing/' . $listing['id']; + $type = 'product'; + + $imageId = $listing['images'][0]['directus_files_id']['id'] + ?? $listing['images'][0]['directus_files_id'] + ?? null; + + if ($imageId) { + $image = DIRECTUS_URL . '/assets/' . $imageId . '?width=1200&height=630&fit=cover'; + } + + if (!empty($listing['price']) && !empty($listing['currency'])) { + $price = number_format((float)$listing['price'], 2); + $description .= " | {$price} {$listing['currency']}"; + } + } +} + +header('Content-Type: text/html; charset=utf-8'); +?> + + +
+ +Redirecting to = $title ?>
+ + diff --git a/index.html b/index.html index b453736..9c8c273 100644 --- a/index.html +++ b/index.html @@ -3,10 +3,29 @@ - + -