- app/rest.py: FastAPI app wrapping search/diagnose/sources with CORS - web/: Vue 3 + Vite + UnoCSS + Pinia frontend at port 8535 - LogSearchView: sidebar filters (source, severity, limit) + FTS search - DiagnoseView: layered symptom investigation matching MCP diagnose tool - SourcesView: corpus table with entry count, error count, time range - LogEntryRow: severity badge, pattern chips, repeat count, timestamp - StatusDot: live API health indicator in nav - scripts/start_dev.sh: launch FastAPI (:8534) + Vite dev server (:8535) - .gitignore: add web/node_modules/ and web/dist/ - Caddy: /turnstone* route added to menagerie.circuitforge.tech block (API → :8534 with /turnstone strip, SPA fallback → :8535)
26 lines
695 B
Bash
Executable file
26 lines
695 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Start Turnstone dev instance: FastAPI on :8534, Vite on :8535
|
|
set -euo pipefail
|
|
|
|
REPO="$(cd "$(dirname "$0")/.." && pwd)"
|
|
DB="${TURNSTONE_DB:-$REPO/data/turnstone.db}"
|
|
|
|
echo "==> Turnstone dev instance"
|
|
echo " DB: $DB"
|
|
echo " API: http://localhost:8534"
|
|
echo " UI: http://localhost:8535"
|
|
echo ""
|
|
|
|
# FastAPI in background
|
|
TURNSTONE_DB="$DB" conda run --no-capture-output -n cf \
|
|
uvicorn app.rest:app --host 0.0.0.0 --port 8534 --reload \
|
|
--log-level info &
|
|
API_PID=$!
|
|
echo "==> FastAPI PID $API_PID"
|
|
|
|
# Vite dev server in foreground (Ctrl-C stops both)
|
|
cleanup() { kill "$API_PID" 2>/dev/null || true; }
|
|
trap cleanup EXIT INT TERM
|
|
|
|
cd "$REPO/web"
|
|
npm run dev
|