48fcb00241
Major Achievements: - ✅ Full web interface (1,520+ lines of frontend code) - ✅ Interactive Leaflet.js map with marker clustering - ✅ Drag-and-drop upload system with GPS input - ✅ Search & filter UI with multi-criteria - ✅ Statistics dashboard with Chart.js - ✅ Responsive mobile-friendly design Backend: - ✅ FastAPI static file serving - ✅ Simplified server mode (main_simple.py) - ✅ Improved startup script with port auto-selection - ✅ PostgreSQL schema ready (requires setup) Database: - ✅ SQLite populated with 85 Flipper Zero signatures - ✅ Device matching system operational - ✅ Frequency-based search working Documentation: - ✅ PHASE_3_COMPLETE.md - Technical summary - ✅ WEB_INTERFACE_README.md - User guide - ✅ WEBAPP_STARTUP_GUIDE.md - Troubleshooting - ✅ POSTGRESQL_SETUP_EXPLANATION.md - DB setup guide - ✅ DATABASE_POPULATION_SUCCESS.md - Import report - ✅ DEVICE_IDENTIFICATION_REPORT.md - Matching analysis Files Created: - templates/index.html (260 lines) - static/css/main.css (500 lines) - static/js/*.js (760 lines total) - src/api/main_simple.py (simplified server) - start_web.sh (auto port selection) Status: Production MVP Ready Next: Phase 4 - API & Integration 🛰️ Generated with Claude Code https://claude.com/claude-code Co-Authored-By: Claude <noreply@anthropic.com>
82 lines
2.0 KiB
Bash
Executable File
82 lines
2.0 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# GigLez Web Interface Startup Script
|
|
#
|
|
|
|
echo "=========================================="
|
|
echo "GigLez - IoT RF Device Mapping Platform"
|
|
echo "=========================================="
|
|
echo ""
|
|
|
|
# Check Python
|
|
if ! command -v python3 &> /dev/null; then
|
|
echo "❌ Python 3 not found"
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ Python 3 found"
|
|
|
|
# Check if in project directory
|
|
if [ ! -f "src/api/main.py" ]; then
|
|
echo "❌ Not in project directory"
|
|
echo "Please run from /home/dell/coding/giglez"
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ Project directory confirmed"
|
|
|
|
# Check database
|
|
if [ -f "giglez.db" ]; then
|
|
echo "✅ SQLite database found (85 signatures)"
|
|
else
|
|
echo "⚠️ Database not found (run scripts/import_flipper_sqlite.py first)"
|
|
fi
|
|
|
|
echo ""
|
|
|
|
# Find available port (try 8000-8010)
|
|
PORT=8000
|
|
MAX_PORT=8010
|
|
|
|
echo "Checking for available port..."
|
|
while [ $PORT -le $MAX_PORT ]; do
|
|
# Check if port is in use
|
|
if lsof -Pi :$PORT -sTCP:LISTEN -t >/dev/null 2>&1 ; then
|
|
# Get PID using the port
|
|
PID=$(lsof -Pi :$PORT -sTCP:LISTEN -t)
|
|
PROCESS=$(ps -p $PID -o comm= 2>/dev/null)
|
|
echo "⚠️ Port $PORT in use (PID: $PID, Process: $PROCESS)"
|
|
PORT=$((PORT + 1))
|
|
else
|
|
echo "✅ Port $PORT is available"
|
|
break
|
|
fi
|
|
done
|
|
|
|
if [ $PORT -gt $MAX_PORT ]; then
|
|
echo ""
|
|
echo "❌ No available ports in range 8000-$MAX_PORT"
|
|
echo ""
|
|
echo "Running processes:"
|
|
lsof -i :8000-8010 -sTCP:LISTEN
|
|
echo ""
|
|
echo "To kill a process: kill -9 <PID>"
|
|
exit 1
|
|
fi
|
|
|
|
# Start server
|
|
echo ""
|
|
echo "=========================================="
|
|
echo "Starting GigLez Web Server..."
|
|
echo "=========================================="
|
|
echo ""
|
|
echo "Web Interface: http://localhost:$PORT"
|
|
echo "API Docs: http://localhost:$PORT/docs"
|
|
echo "Health Check: http://localhost:$PORT/health"
|
|
echo ""
|
|
echo "Press Ctrl+C to stop"
|
|
echo ""
|
|
|
|
# Run with uvicorn
|
|
python3 -m uvicorn src.api.main_simple:app --host 0.0.0.0 --port $PORT --reload
|