Postbox
Social-Media-Profil-Tracking-Plattform für YouTube und Instagram. Postbox sammelt, analysiert und vergleicht Profil-Metriken über beide Plattformen hinweg und bietet Dashboards, Scores und Discovery-Features.
Tech-Stack
| Komponente | Technologie | Version |
|---|---|---|
| Framework | Laravel | 12 (Starterkit) |
| UI | Livewire V3 + Flux UI (Pro) | 3.x |
| Datenbank | PostgreSQL | 16 |
| Auth | Laravel Fortify + Socialite (Google OAuth) + 2FA + Turnstile | — |
| Cache/Queue | Database (Redis für Reverb) | — |
| WebSockets | Laravel Reverb | 1.x |
| API Auth | Laravel Sanctum | 4.x |
| AI | Google Gemini 2.5 Flash Lite | API |
| Error Tracking | Flare (spatie/laravel-flare) | PHP |
| Observability | Nightwatch (laravel/nightwatch) | Logs, Requests, Jobs |
| Queue Monitoring | Vantage | Custom Package |
| Tests | Pest | 3.x |
| PHP | PHP | 8.4 |
| Linting | Rector + Laravel Pint | PHP 8.4 + Laravel Preset |
Key Concepts
| Konzept | Beschreibung | Code-Ort |
|---|---|---|
| Watchers | Tracking-Einträge für Social Profiles in Workspaces | app/Livewire/Watchers/ |
| Social Profiles | Zentrale Profile-Tabelle (YouTube + Instagram) | app/Models/SocialProfile.php |
| Collector API | REST-API für Browser-Extension (Instagram-Scraping) | app/Http/Controllers/Api/CollectorJobController.php |
| Daily Scrape | Tägliche YouTube-Datenaktualisierung via API | app/Console/Commands/SocialScrapeDailyFollowers.php |
| Dashboard Rollups | Vorberechnete Leaderboard-Snapshots | app/Console/Commands/BuildDashboardDailyRollups.php |
| Postbox Score | Composite-Score 0-100 (Growth, Momentum, Consistency, Engagement) | app/Services/Scoring/ProfileScoreCalculator.php |
| Video Score | Video Performance Score 0-100 pro YouTube-Video | app/Services/Scoring/VideoScoreCalculator.php |
| Explore | Discovery-Feature mit Trending, Growth, Rising Stars | app/Livewire/Explore/ |
| Favorites | Globale Favoriten mit Workspace-Spiegelung | app/Services/Favorites/FavoriteManager.php |
| Admin Workspace | Spezial-Workspace (ID 999999999999) mit allen Profilen | app/Services/Workspaces/AdminWorkspaceManager.php |
| Notifications | Dual-System: Toast + Nachrichtenzentrale via Reverb | app/Services/Notifications/NotificationService.php |
Zahlen-Überblick
| Bereich | Anzahl |
|---|---|
| Eloquent Models | 72 |
| Livewire Components | 73 |
| Artisan Commands | 86 |
| Queue Jobs | 32 |
| Broadcast Events | 15 |
| Services | 75 |
| Migrations | ~166 |
| Factories | 11 |
| Queues | 13 |
Plattformen
| Plattform | Datenquelle | Scrape-Methode |
|---|---|---|
| YouTube | YouTube Data API v3 | Direkte API-Calls (Multi-Key-Pool) |
| Collector API | Browser-Extension via Sanctum-Token |
YouTube-Profile werden direkt über die YouTube Data API v3 abgefragt. Instagram-Profile werden über eine Browser-Extension (Collector) gescraped, die Jobs via REST-API least und Ergebnisse zurückmeldet.
Dokumentations-Struktur
Diese Dokumentation ist in folgende Bereiche gegliedert:
| Bereich | Inhalt |
|---|---|
| 01 Architektur | Verzeichnisstruktur, Routes, Middleware, Auth, Broadcasting, Config |
| 02 Datenbank | Models, Relations, Scopes, Migrations |
| 03 Features | Watchers, Dashboard, Explore, Scoring, Notifications |
| 04 Integrationen | YouTube, Instagram, Collector API, Google API, AI, Flare |
| 05 Commands | Alle Artisan Commands nach Domäne |
| 06 Scheduler | Zeitplan aller Scheduled Tasks |
| 07 Jobs & Events | Queue Jobs, Broadcast Events, Listeners |
| 08 Services | Alle Business-Logic Services |
| 09 Livewire | Alle Livewire Components |
| 10 Entwicklung | Setup, Testing, Deployment, Debugging |
| 11 Technical Debt | TODOs, FIXMEs, Known Issues |