#!/bin/bash # SAAP Frontend Startup Script # Starts the Vue.js + Vite development server set -e # Exit on error echo "🚀 SAAP Frontend Startup" echo "========================" # Navigate to script directory cd "$(dirname "$0")" # Navigate to frontend directory cd frontend # Check if package.json exists if [ ! -f "package.json" ]; then echo "❌ Error: frontend/package.json not found!" exit 1 fi # Install dependencies if node_modules doesn't exist if [ ! -d "node_modules" ]; then echo "📦 Installing frontend dependencies..." npm install echo "✅ Dependencies installed successfully!" else echo "✅ Dependencies already installed (node_modules found)" fi echo "" echo "🌟 Starting SAAP Frontend Development Server..." echo " - Vue 3 + Vite" echo " - Hot Module Replacement (HMR) enabled" echo "" echo "🌐 Frontend will be available at: http://localhost:5173" echo "" echo "Press Ctrl+C to stop the server" echo "" # Start the frontend dev server npm run dev