#!/bin/bash

# Start Documentation Server
# Quick launcher for your dev environment docs

DOCS_DIR="$HOME/Development/tooling/dev-docs-server"

if [ ! -d "$DOCS_DIR" ]; then
    echo "❌ Documentation server not found at: $DOCS_DIR"
    echo "   Run the installer first: python3 install.py"
    exit 1
fi

cd "$DOCS_DIR"

echo "🚀 Starting documentation server..."
echo "📖 Opening at: http://localhost:8000"
echo ""
echo "Press Ctrl+C to stop"
echo ""

# Open browser after 2 seconds
(sleep 2 && open http://localhost:8000 2>/dev/null || xdg-open http://localhost:8000 2>/dev/null || start http://localhost:8000 2>/dev/null) &

# Start server
mkdocs serve
