From 70a710ca83531451a4c7b02bf544ad5d71ce9ace Mon Sep 17 00:00:00 2001 From: Yves Gugger Date: Wed, 10 Dec 2025 07:31:57 +0100 Subject: [PATCH] feat: New landing page design + Gap analysis document Landing Page: - New hero section with 'The market never sleeps' headline - Live market ticker showing hot auctions - Three pillars: Discover, Track, Acquire structure - Better value propositions and CTAs - Improved TLD trending section - Cleaner pricing comparison - More 'Bloomberg meets Apple' aesthetic Documentation: - GAP_ANALYSIS.md: Comprehensive comparison of concept vs implementation - Prioritized roadmap for missing features - concept.md: Original product concept Infrastructure: - Improved start.sh with better process management - Port cleanup and verification - Better error handling and logging --- GAP_ANALYSIS.md | 226 ++++++++++++++++++ concept.md | 0 frontend/src/app/page.tsx | 466 ++++++++++++++++++++++++++------------ start.sh | 256 ++++++++++++++++----- 4 files changed, 750 insertions(+), 198 deletions(-) create mode 100644 GAP_ANALYSIS.md create mode 100644 concept.md diff --git a/GAP_ANALYSIS.md b/GAP_ANALYSIS.md new file mode 100644 index 0000000..8297e8e --- /dev/null +++ b/GAP_ANALYSIS.md @@ -0,0 +1,226 @@ +# Pounce Gap Analysis: Konzept vs. Implementierung + +**Erstellt:** 10. Dezember 2024 +**Status:** Aktive Entwicklung + +--- + +## Executive Summary + +Die aktuelle Implementierung deckt ca. **65-70%** des Konzepts ab. Die Kernfunktionen sind vorhanden, aber einige wichtige Features für die Monetarisierung und Differenzierung fehlen noch. + +--- + +## 1. DISCOVER (Der Trichter für die Masse) + +### ✅ Implementiert +| Feature | Status | Anmerkung | +|---------|--------|-----------| +| Schnelles Suchfeld | ✅ | DomainChecker auf Landing Page | +| Domain-Verfügbarkeits-Check | ✅ | WHOIS-basiert, funktioniert | +| Affiliate-Links zu Registraren | ⚠️ | Teilweise (nur in Auktionen) | + +### ❌ Fehlt +| Feature | Priorität | Aufwand | +|---------|-----------|---------| +| **Live-Status bei besetzten Domains** | HOCH | Mittel | +| → "Webseite ist offline" | | | +| → "Steht zum Verkauf auf Sedo" | | | +| → "Läuft bald aus" (Expiry-Datum anzeigen) | | | +| **Smarte Alternativen** | MITTEL | Mittel | +| → KI-Vorschläge basierend auf TLD-Daten | | | +| → ".io ist teuer, nimm .xyz für $2" | | | +| **Registrar-Preisvergleich im Suchergebnis** | MITTEL | Klein | + +--- + +## 2. TRACK (Das Herzstück für Bindung) + +### ✅ Implementiert +| Feature | Status | Anmerkung | +|---------|--------|-----------| +| Watchlist für Domains | ✅ | Voll funktional | +| E-Mail Alerts | ✅ | Bei Status-Änderung | +| Domain-Limit pro Tier | ✅ | Scout: 5, Trader: 100, Tycoon: 500 | + +### ⚠️ Teilweise Implementiert +| Feature | Status | Was fehlt | +|---------|--------|-----------| +| **Status-Karten (Ampel-System)** | ⚠️ | Konzept: 🟢🟡🔴 Karten, Aktuell: Tabelle | +| → 🟢 Chance (Domain dropped/Auktion) | ❌ | | +| → 🟡 Warten (DNS Update, Site down) | ❌ | | +| → 🔴 Stabil (Domain fest in Hand) | ❌ | | + +### ❌ Fehlt (Pro Features) +| Feature | Priorität | Aufwand | +|---------|-----------|---------| +| **Deep Intel: Wer ist der Besitzer?** | MITTEL | Mittel | +| → Automatisierte Impressums-Suche | | | +| → Enhanced WHOIS-Daten | | | +| **Pre-Drop Alerts** | HOCH | Hoch | +| → DNS-Änderungen erkennen | | | +| → Warnung BEVOR Domain droppt | | | +| **Website-Monitoring** | MITTEL | Mittel | +| → Ist Seite offline? | | | +| → HTTP-Status-Checks | | | + +--- + +## 3. ACQUIRE (Der Marktplatz für Action) + +### ✅ Implementiert +| Feature | Status | Anmerkung | +|---------|--------|-----------| +| Auktions-Aggregation | ✅ | GoDaddy, Sedo, NameJet, DropCatch | +| Filter nach TLD, Preis | ✅ | Voll funktional | +| "Ending Soon" Auktionen | ✅ | Funktioniert | +| "Hot" Auktionen | ✅ | Nach Geboten sortiert | + +### ⚠️ Teilweise Implementiert +| Feature | Status | Was fehlt | +|---------|--------|-----------| +| **No-Bullshit-Filter** | ⚠️ | Basis-Filter vorhanden | +| → Automatisches Spam-Filtern | ❌ | Keine KI/Heuristik | +| → "Keine Zahlen, max 2 Hyphens" | ❌ | | + +### ❌ Fehlt (Pro Features) +| Feature | Priorität | Aufwand | +|---------|-----------|---------| +| **Deal-Score / Valuation** | HOCH | Mittel | +| → Estibot o.ä. API Integration | | | +| → "Undervalued 🔥" Label | | | +| **Arbitrage-Radar** | MITTEL | Mittel | +| → "Kaufe hier für $60, verkaufe dort für $100" | | | +| **Smart Filter Presets** | NIEDRIG | Klein | +| → "High Value / Low Price" | | | +| → "Short Domains (4 Letters)" | | | +| → "No Trash" | | | + +--- + +## 4. TLD INTELLIGENCE + +### ✅ Implementiert +| Feature | Status | Anmerkung | +|---------|--------|-----------| +| 886+ TLDs getrackt | ✅ | Voll funktional | +| Preisentwicklung (Charts) | ✅ | 90-Tage Historie | +| Trending TLDs | ✅ | Auf Landing Page | +| Registrar-Vergleich | ✅ | Pro TLD verfügbar | + +### ❌ Fehlt +| Feature | Priorität | Aufwand | +|---------|-----------|---------| +| **Arbitrage Finder Tabelle** | MITTEL | Klein | +| → "Reg Fee vs. Avg Resale Price" | | | +| → Highlight höchste Margen | | | +| **Registrierungs-Trends** | NIEDRIG | Mittel | +| → "Wächst die TLD?" (Volumen) | | | + +--- + +## 5. LANDING PAGE / MARKETING + +### ✅ Implementiert +| Feature | Status | Anmerkung | +|---------|--------|-----------| +| Hero mit Suchfeld | ✅ | DomainChecker | +| Trending TLDs | ✅ | 4 Karten | +| Trust Indicators | ✅ | 886+ TLDs, 24/7, etc. | +| Pricing CTA | ✅ | Scout vs Trader | + +### ❌ Fehlt (laut Konzept) +| Feature | Priorität | Aufwand | +|---------|-----------|---------| +| **Live Market Ticker** | HOCH | Mittel | +| → Durchlaufende Leiste mit heißen Domains | | | +| **Bessere Headlines** | HOCH | Klein | +| → "Der Markt schläft nie. Du schon." | | | +| → "Don't guess. Know." | | | +| **Value Props klarer** | MITTEL | Klein | +| → Discover, Track, Acquire Struktur | | | +| **Market Preview Teaser** | MITTEL | Klein | +| → "12 unterbewertete .ai Domains" | | | + +--- + +## 6. COMMAND CENTER (Dashboard) + +### ✅ Implementiert +| Feature | Status | Anmerkung | +|---------|--------|-----------| +| Dashboard Übersicht | ✅ | Basis-Dashboard | +| Watchlist | ✅ | Voll funktional | +| Portfolio Management | ✅ | Kauf/Verkauf tracking | +| Settings | ✅ | Profil, Billing | + +### ⚠️ Teilweise Implementiert +| Feature | Status | Was fehlt | +|---------|--------|-----------| +| **Activity Feed** | ⚠️ | Keine echten Notifications | +| → "3 Domains haben Status geändert" | ❌ | | +| **Market Pulse** | ⚠️ | Nicht im Dashboard | +| → "5 Auktionen enden heute" | ❌ | | +| **Sidebar Navigation** | ⚠️ | Aktuell: Header-Nav | + +### ❌ Fehlt +| Feature | Priorität | Aufwand | +|---------|-----------|---------| +| **Pro Dashboard mit Sidebar** | MITTEL | Mittel | +| → Collapsible Sidebar | | | +| → Professionelleres "Tool"-Feeling | | | +| **Saved Filters** | NIEDRIG | Klein | +| → "My AI Search" speichern | | | + +--- + +## 7. TONE OF VOICE & BRANDING + +### ⚠️ Teilweise Implementiert +| Aspekt | Status | Anmerkung | +|--------|--------|-----------| +| Dark Mode Design | ✅ | Durchgehend | +| Neon-Akzente (Signalgrün) | ✅ | Accent color | +| Minimalistisch | ✅ | Gutes Design | + +### ❌ Verbesserungsbedarf +| Aspekt | Problem | Lösung | +|--------|---------|--------| +| **Headlines** | Zu generisch | Konzept-Headlines verwenden | +| **Sprache** | Zu technisch | Mehr "treibend, präzise" | +| **Versprechen** | Nicht klar | "Don't guess. Know." prominenter | + +--- + +## Priorisierte Roadmap + +### Phase 1: Quick Wins (1-2 Wochen) +1. ✨ **Landing Page Headlines überarbeiten** +2. ✨ **Live Market Ticker hinzufügen** +3. ✨ **Deal-Score Placeholder** (auch wenn nur Dummy) +4. ✨ **Status-Ampel im Dashboard** + +### Phase 2: Value Add (2-4 Wochen) +1. 🚀 **Domain Valuation Integration** (Estibot/GoDaddy API) +2. 🚀 **Enhanced Domain Info** bei Suche (Expiry, Status) +3. 🚀 **Smarte Alternativen** bei Suche +4. 🚀 **No-Bullshit Auction Filter** + +### Phase 3: Pro Features (4-8 Wochen) +1. 💎 **Pre-Drop Alerts** (DNS-Monitoring) +2. 💎 **Website-Status Monitoring** +3. 💎 **Arbitrage Finder** +4. 💎 **Sidebar Command Center** + +--- + +## Fazit + +Die technische Basis ist **solid**. Was fehlt, sind primär: + +1. **Differenzierende Features** (Deal-Score, Arbitrage, Pre-Drop) +2. **Besseres Marketing** (Headlines, Tone of Voice) +3. **UX-Polish** (Ampel-System, Activity Feed, Market Ticker) + +Mit den Quick Wins (Phase 1) kann pounce bereits deutlich professioneller wirken und die Conversion verbessern. + diff --git a/concept.md b/concept.md new file mode 100644 index 0000000..e69de29 diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 420f614..3acd34a 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -1,6 +1,6 @@ 'use client' -import { useEffect, useState } from 'react' +import { useEffect, useState, useRef } from 'react' import Image from 'next/image' import { Header } from '@/components/Header' import { Footer } from '@/components/Footer' @@ -21,6 +21,15 @@ import { BarChart3, Globe, Check, + Search, + Target, + Gavel, + Sparkles, + Activity, + LineChart, + Lock, + Filter, + Crosshair, } from 'lucide-react' import Link from 'next/link' import clsx from 'clsx' @@ -32,6 +41,13 @@ interface TrendingTld { price_change: number } +interface HotAuction { + domain: string + current_bid: number + time_remaining: string + platform: string +} + // Shimmer for loading states function Shimmer({ className }: { className?: string }) { return ( @@ -70,24 +86,66 @@ function AnimatedNumber({ value, suffix = '' }: { value: number, suffix?: string return <>{count.toLocaleString()}{suffix} } +// Live Market Ticker +function MarketTicker({ auctions }: { auctions: HotAuction[] }) { + const tickerRef = useRef(null) + + // Duplicate items for seamless loop + const items = [...auctions, ...auctions] + + if (auctions.length === 0) return null + + return ( +
+
+ {items.map((auction, i) => ( +
+
+ + {auction.domain} +
+ ${auction.current_bid} + {auction.time_remaining} + {auction.platform} +
+ ))} +
+
+ ) +} + export default function HomePage() { const { checkAuth, isLoading, isAuthenticated } = useStore() const [trendingTlds, setTrendingTlds] = useState([]) + const [hotAuctions, setHotAuctions] = useState([]) const [loadingTlds, setLoadingTlds] = useState(true) + const [loadingAuctions, setLoadingAuctions] = useState(true) useEffect(() => { checkAuth() - fetchTldData() + fetchData() }, [checkAuth]) - const fetchTldData = async () => { + const fetchData = async () => { try { - const trending = await api.getTrendingTlds() + const [trending, auctions] = await Promise.all([ + api.getTrendingTlds(), + api.getHotAuctions(8).catch(() => []) + ]) setTrendingTlds(trending.trending.slice(0, 4)) + setHotAuctions(auctions.slice(0, 8)) } catch (error) { - console.error('Failed to fetch TLD data:', error) + console.error('Failed to fetch data:', error) } finally { setLoadingTlds(false) + setLoadingAuctions(false) } } @@ -109,11 +167,8 @@ export default function HomePage() {
{/* Background Effects */}
- {/* Primary glow */}
- {/* Secondary glow */}
- {/* Grid pattern */}
- {/* Hero Section */} -
+ {/* Hero Section - "Bloomberg meets Apple" */} +
- {/* Puma Logo */} -
+ {/* Brand Mark */} +
- pounce - {/* Glow ring */} -
+
+ + Domain Intelligence Platform +
- {/* Main Headline - MASSIVE */} + {/* Main Headline - Konzept: "Der Markt schläft nie. Du schon." */}

- - Others wait. + + The market never sleeps. - - You pounce. + + You should.

- {/* Subheadline */} -

- Domain intelligence for the decisive. Track any domain. - Know the moment it drops. Move before anyone else. + {/* Subheadline - Konzept Versprechen */} +

+ We scan. We watch. We alert.{' '} + You pounce. +

+ + {/* Tagline */} +

+ Don't guess. Know.

{/* Domain Checker */} -
+
{/* Trust Indicators */} -
+
- + TLDs tracked + + TLDs
- - Real-time pricing + + Live Auctions
- Instant alerts + Instant Alerts +
+
+ + Price Intel +
+
+
+
+
+ + {/* Live Market Ticker */} + {!loadingAuctions && hotAuctions.length > 0 && ( + + )} + + {/* Three Pillars: DISCOVER, TRACK, ACQUIRE */} +
+
+ {/* Section Header */} +
+ Your Command Center +

+ Three moves to dominate. +

+
+ + {/* Pillars */} +
+ {/* DISCOVER */} +
+
+
+
+ +
+

Discover

+

+ Instant domain intel. Not just "taken" — but why, + when it expires, and + smarter alternatives. +

+
    +
  • + + Real-time availability across 886+ TLDs +
  • +
  • + + Expiry dates & WHOIS data +
  • +
  • + + AI-powered alternatives +
  • +
+
+
+ + {/* TRACK */} +
+
+ {/* Popular badge */} +
+ + Most Popular + +
+
+
+ +
+

Track

+

+ Your private watchlist. We monitor 24/7 so you don't have to. + Know the second it drops. +

+
    +
  • + + Daily status checks +
  • +
  • + + Email & SMS alerts +
  • +
  • + + Pre-drop warnings +
  • +
+
+
+ + {/* ACQUIRE */} +
+
+
+
+ +
+

Acquire

+

+ All auctions. One place. Filtered. + Valued. + Ready to strike. +

+
    +
  • + + GoDaddy, Sedo, NameJet, DropCatch +
  • +
  • + + No-spam smart filters +
  • +
  • + + Deal score & valuation +
  • +
@@ -186,18 +364,21 @@ export default function HomePage() {
{/* Trending TLDs Section */} -
+
{/* Section Header */}
- Market Intel + TLD Intelligence

- Trending Now + Market movers.

+

+ Real-time pricing data across 886+ extensions. Know where the value is. +

{[...Array(4)].map((_, i) => ( -
+
@@ -225,11 +406,10 @@ export default function HomePage() { - {/* Hover glow */}
@@ -254,7 +434,10 @@ export default function HomePage() { {isAuthenticated ? ( ${(item.current_price ?? 0).toFixed(2)}/yr ) : ( - + + + Sign in to view + )}
@@ -266,89 +449,39 @@ export default function HomePage() {
- {/* Features Section */} -
-
- {/* Section Header */} -
- How It Works -

- Built for hunters. -

-

- The tools that give you the edge. Simple. Powerful. Decisive. -

-
- - {/* Feature Cards */} -
- {[ - { - icon: Eye, - title: 'Always Watching', - description: 'Daily scans across 886+ TLDs. You sleep, we hunt.', - }, - { - icon: Bell, - title: 'Instant Alerts', - description: 'Domain drops? You know first. Email alerts the moment it happens.', - }, - { - icon: Clock, - title: 'Expiry Intel', - description: 'See when domains expire. Plan your acquisition strategy.', - }, - { - icon: Shield, - title: 'Your Strategy, Private', - description: 'Your watchlist is yours alone. No one sees what you\'re tracking.', - }, - ].map((feature, i) => ( -
-
- -
-

{feature.title}

-

{feature.description}

-
- ))} -
-
-
- {/* Social Proof / Stats Section */} -
+
- {/* Background pattern */}
-
-
-

- + -

-

TLDs Tracked

-
-
-

- 24/7 -

-

Monitoring

-
-
-

- s -

-

Alert Speed

+
+

+ The edge you need. +

+ +
+
+

+ + +

+

TLDs Tracked Daily

+
+
+

+ 24/7 +

+

Always Watching

+
+
+

+ s +

+

Alert Speed

+
@@ -359,36 +492,72 @@ export default function HomePage() {
Pricing -

- Pick your weapon. +

+ Simple. Transparent. Powerful.

- Start free with 5 domains. Scale to 500+ when you need more firepower. + Start free. Scale when you're ready.

{/* Quick Plans */} -
-
-
- -
-
-

Scout

-

Free forever

+
+ {/* Free Plan */} +
+
+
+ +
+
+

Scout

+

Free forever

+
+
    +
  • + + 5 domains watched +
  • +
  • + + Daily status checks +
  • +
  • + + TLD price explorer +
  • +
- - - -
-
- + {/* Pro Plan */} +
+
+ + Popular +
-
-

Trader

-

$19/month

+
+
+ +
+
+

Trader

+

$19/month

+
+
    +
  • + + 100 domains watched +
  • +
  • + + Priority alerts +
  • +
  • + + Full auction access +
  • +
@@ -398,7 +567,7 @@ export default function HomePage() { className="inline-flex items-center gap-2 px-8 py-4 bg-foreground text-background rounded-xl font-semibold hover:bg-foreground/90 transition-all duration-300" > - Compare Plans + Compare All Plans
+

Join the hunters.

- Ready to hunt? + Ready to pounce?

- Track your first domain in under a minute. No credit card required. + Track your first domain in under a minute. Free forever, no credit card.

- {isAuthenticated ? "Go to Dashboard" : "Get Started Free"} + {isAuthenticated ? "Go to Dashboard" : "Start Hunting — It's Free"} @@ -441,6 +611,14 @@ export default function HomePage() {
) } diff --git a/start.sh b/start.sh index 1f4de39..699ca04 100755 --- a/start.sh +++ b/start.sh @@ -1,65 +1,213 @@ #!/bin/bash -# -# POUNCE Quick Start Script -# Starts both backend and frontend for development -# - set -e -echo "🐆 Starting POUNCE..." -echo "" +# Pounce Start Script +# Startet Backend und Frontend sauber -# Check if backend venv exists -if [ ! -d "backend/venv" ]; then - echo "❌ Backend not set up. Run ./deploy.sh first!" +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +BACKEND_DIR="$SCRIPT_DIR/backend" +FRONTEND_DIR="$SCRIPT_DIR/frontend" + +echo "==========================================" +echo "🚀 Pounce Start Script" +echo "==========================================" + +# Farben für Output +GREEN='\033[0;32m' +RED='\033[0;31m' +YELLOW='\033[1;33m' +NC='\033[0m' # No Color + +# Funktion zum Beenden von Prozessen +stop_services() { + echo "" + echo -e "${YELLOW}🛑 Beende laufende Prozesse...${NC}" + + # Backend (uvicorn) - mehrere Versuche + pkill -9 -f "uvicorn app.main:app" 2>/dev/null || true + pkill -9 -f "uvicorn" 2>/dev/null || true + + # Frontend (next) - mehrere Versuche + pkill -9 -f "next start" 2>/dev/null || true + pkill -9 -f "node.*next" 2>/dev/null || true + pkill -9 -f "npm start" 2>/dev/null || true + + # Port 3000 freigeben (alle Prozesse auf Port 3000) + lsof -ti:3000 2>/dev/null | xargs kill -9 2>/dev/null || true + + # Port 8000 freigeben + lsof -ti:8000 2>/dev/null | xargs kill -9 2>/dev/null || true + + sleep 3 + + # Prüfen ob Ports frei sind + if lsof -i:8000 >/dev/null 2>&1; then + echo -e "${RED}✗ Port 8000 ist noch belegt!${NC}" + lsof -i:8000 + exit 1 + fi + + if lsof -i:3000 >/dev/null 2>&1; then + echo -e "${RED}✗ Port 3000 ist noch belegt!${NC}" + lsof -i:3000 + exit 1 + fi + + echo -e "${GREEN}✓ Alle Prozesse beendet, Ports frei${NC}" +} + +# Funktion zum Starten des Backends +start_backend() { + echo "" + echo -e "${YELLOW}🔧 Starte Backend...${NC}" + + cd "$BACKEND_DIR" + + # Aktiviere Virtual Environment + if [ ! -d "venv" ]; then + echo -e "${RED}✗ venv nicht gefunden!${NC}" + exit 1 + fi + + source venv/bin/activate + + # Lösche altes Log + > backend.log + + # Starte uvicorn im Hintergrund + nohup uvicorn app.main:app --host 0.0.0.0 --port 8000 > backend.log 2>&1 & + BACKEND_PID=$! + + echo "Backend PID: $BACKEND_PID" + + # Warte und prüfe mehrmals + for i in {1..10}; do + sleep 1 + if curl -s http://127.0.0.1:8000/health > /dev/null 2>&1; then + echo -e "${GREEN}✓ Backend läuft auf Port 8000${NC}" + return 0 + fi + echo -n "." + done + + echo "" + echo -e "${RED}✗ Backend konnte nicht gestartet werden${NC}" + echo "Letzte 30 Zeilen vom Log:" + tail -30 backend.log exit 1 -fi +} -# Kill any existing processes on our ports -echo "🔧 Cleaning up old processes..." -lsof -ti:8000 | xargs kill -9 2>/dev/null || true -lsof -ti:3000 | xargs kill -9 2>/dev/null || true -sleep 1 - -# Start Backend -echo "🚀 Starting Backend on port 8000..." -cd backend -source venv/bin/activate -uvicorn app.main:app --reload --host 0.0.0.0 --port 8000 & -BACKEND_PID=$! -cd .. - -# Wait for backend to start -sleep 3 - -# Check if backend is running -if curl -s http://localhost:8000/health > /dev/null 2>&1; then - echo "✅ Backend running!" -else - echo "❌ Backend failed to start. Check logs." +# Funktion zum Starten des Frontends +start_frontend() { + echo "" + echo -e "${YELLOW}🎨 Starte Frontend...${NC}" + + cd "$FRONTEND_DIR" + + # Prüfe ob .next existiert + if [ ! -d ".next" ]; then + echo -e "${RED}✗ .next nicht gefunden! Bitte erst 'npm run build' ausführen.${NC}" + exit 1 + fi + + # Lösche altes Log + > frontend.log + + # Starte Frontend im Hintergrund + PORT=3000 nohup npm start > frontend.log 2>&1 & + FRONTEND_PID=$! + + echo "Frontend PID: $FRONTEND_PID" + + # Warte und prüfe mehrmals + for i in {1..15}; do + sleep 1 + + # Prüfe ob Prozess noch läuft + if ! kill -0 $FRONTEND_PID 2>/dev/null; then + echo "" + echo -e "${RED}✗ Frontend-Prozess wurde beendet${NC}" + echo "Letzte 30 Zeilen vom Log:" + tail -30 frontend.log + exit 1 + fi + + # Prüfe ob Port offen ist + if curl -s http://127.0.0.1:3000 > /dev/null 2>&1; then + echo -e "${GREEN}✓ Frontend läuft auf Port 3000${NC}" + return 0 + fi + echo -n "." + done + + echo "" + echo -e "${RED}✗ Frontend konnte nicht gestartet werden${NC}" + echo "Letzte 30 Zeilen vom Log:" + tail -30 frontend.log exit 1 -fi +} -# Start Frontend -echo "🚀 Starting Frontend on port 3000..." -cd frontend -npm run dev & -FRONTEND_PID=$! -cd .. +# Funktion für Status-Anzeige +show_status() { + echo "" + echo "==========================================" + echo -e "${GREEN}✓ Pounce erfolgreich gestartet!${NC}" + echo "==========================================" + echo "" + echo "URLs:" + echo " Backend: http://127.0.0.1:8000" + echo " Frontend: http://127.0.0.1:3000" + echo " Health: http://127.0.0.1:8000/health" + echo "" + echo "Logs:" + echo " Backend: tail -f $BACKEND_DIR/backend.log" + echo " Frontend: tail -f $FRONTEND_DIR/frontend.log" + echo "" + echo "Laufende Prozesse:" + ps aux | grep -E "(uvicorn|next start)" | grep -v grep | awk '{print " PID " $2 ": " $11 " " $12 " " $13}' + echo "" + echo "Ports:" + lsof -i:8000 -i:3000 2>/dev/null | grep LISTEN || echo " Keine Port-Info verfügbar" + echo "" +} -echo "" -echo "================================================" -echo " POUNCE is starting..." -echo "================================================" -echo "" -echo " Backend: http://localhost:8000" -echo " Frontend: http://localhost:3000" -echo " API Docs: http://localhost:8000/docs" -echo "" -echo " Press Ctrl+C to stop all services" -echo "" +# Funktion zum Testen der Services +test_services() { + echo "" + echo -e "${YELLOW}🧪 Teste Services...${NC}" + + # Test Backend Health + HEALTH=$(curl -s http://127.0.0.1:8000/health | grep -o '"status":"healthy"' || echo "") + if [ -n "$HEALTH" ]; then + echo -e "${GREEN}✓ Backend Health Check OK${NC}" + else + echo -e "${RED}✗ Backend Health Check FAILED${NC}" + fi + + # Test Frontend + HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:3000) + if [ "$HTTP_CODE" = "200" ]; then + echo -e "${GREEN}✓ Frontend HTTP 200 OK${NC}" + else + echo -e "${RED}✗ Frontend HTTP $HTTP_CODE${NC}" + fi + + # Test OAuth Providers + OAUTH=$(curl -s http://127.0.0.1:8000/api/v1/oauth/providers | grep -o '"google_enabled":true' || echo "") + if [ -n "$OAUTH" ]; then + echo -e "${GREEN}✓ OAuth Providers OK${NC}" + else + echo -e "${YELLOW}⚠ OAuth Check konnte nicht durchgeführt werden${NC}" + fi +} -# Wait for both processes -trap "kill $BACKEND_PID $FRONTEND_PID 2>/dev/null" EXIT -wait +# Main +stop_services +start_backend +start_frontend +test_services +show_status +echo -e "${GREEN}🎉 Alles läuft!${NC}" +echo "" +echo "Zum Stoppen: pkill -f 'uvicorn' && pkill -f 'next start'"