Files
laca-website/start-dev.sh
PhongPham 07a93d44b4 🎯 MapView v2.0 - Global Deployment Ready
 MAJOR FEATURES:
• Auto-zoom intelligence với smart bounds fitting
• Enhanced 3D GPS markers với pulsing effects
• Professional route display với 6-layer rendering
• Status-based parking icons với availability indicators
• Production-ready build optimizations

🗺️ AUTO-ZOOM FEATURES:
• Smart bounds fitting cho GPS + selected parking
• Adaptive padding (50px) cho visual balance
• Max zoom control (level 16) để tránh quá gần
• Dynamic centering khi không có selection

🎨 ENHANCED VISUALS:
• 3D GPS marker với multi-layer pulse effects
• Advanced parking icons với status colors
• Selection highlighting với animation
• Dimming system cho non-selected items

🛣️ ROUTE SYSTEM:
• OpenRouteService API integration
• Multi-layer route rendering (glow, shadow, main, animated)
• Real-time distance & duration calculation
• Visual route info trong popup

📱 PRODUCTION READY:
• SSR safe với dynamic imports
• Build errors resolved
• Global deployment via Vercel
• Optimized performance

🌍 DEPLOYMENT:
• Vercel: https://whatever-ctk2auuxr-phong12hexdockworks-projects.vercel.app
• Bundle size: 22.8 kB optimized
• Global CDN distribution
• HTTPS enabled

💾 VERSION CONTROL:
• MapView-v2.0.tsx backup created
• MAPVIEW_VERSIONS.md documentation
• Full version history tracking
2025-07-20 19:52:16 +07:00

105 lines
2.5 KiB
Bash
Executable File

#!/bin/bash
# Smart Parking Finder - Development Start Script
echo "🚗 Starting Smart Parking Finder Development Environment..."
# Function to check if a command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
# Check required tools
echo "Checking required tools..."
if ! command_exists node; then
echo "❌ Node.js is not installed. Please install Node.js first."
exit 1
fi
if ! command_exists npm; then
echo "❌ npm is not installed. Please install npm first."
exit 1
fi
if ! command_exists docker; then
echo "❌ Docker is not installed. Please install Docker first."
exit 1
fi
# Check if Docker is running
if ! docker info >/dev/null 2>&1; then
echo "❌ Docker is not running. Please start Docker and try again."
exit 1
fi
echo "✅ All required tools are available"
# Start infrastructure services (PostgreSQL, Redis, Valhalla)
echo "🐳 Starting infrastructure services..."
docker-compose up -d postgres redis valhalla
# Wait for services to be ready
echo "⏳ Waiting for services to be ready..."
sleep 10
# Check if services are running
if docker-compose ps | grep -q "Up"; then
echo "✅ Infrastructure services are running"
else
echo "❌ Failed to start infrastructure services"
docker-compose logs
exit 1
fi
# Start backend in background
echo "🔧 Starting backend server..."
cd backend
npm run start:dev &
BACKEND_PID=$!
cd ..
# Wait a bit for backend to start
sleep 5
# Start frontend
echo "🌐 Starting frontend server..."
cd frontend
npm run dev &
FRONTEND_PID=$!
cd ..
echo ""
echo "🎉 Smart Parking Finder is starting up!"
echo ""
echo "📡 Backend API: http://localhost:3001"
echo " - Swagger API docs: http://localhost:3001/api"
echo " - Health check: http://localhost:3001/health"
echo ""
echo "🌐 Frontend App: http://localhost:3000"
echo ""
echo "🗄️ Database: PostgreSQL on localhost:5432"
echo " - PgAdmin: http://localhost:5050 (admin@admin.com / admin)"
echo ""
echo "⚡ Redis: localhost:6379"
echo " - Redis Commander: http://localhost:8081"
echo ""
echo "🗺️ Valhalla Routing: http://localhost:8002"
echo ""
echo "Press Ctrl+C to stop all services"
# Function to cleanup on exit
cleanup() {
echo ""
echo "🛑 Stopping all services..."
kill $BACKEND_PID 2>/dev/null
kill $FRONTEND_PID 2>/dev/null
docker-compose down
echo "✅ All services stopped"
exit 0
}
# Set trap to cleanup on script exit
trap cleanup SIGINT SIGTERM
# Keep script running
wait