#!/bin/bash # Telegram Marketing Intelligence Agent - Simple Start (Frontend Only) echo "🚀 Starting Telegram Marketing Intelligence Agent (Simple Mode)" echo "=============================================================" echo "" # Colors GREEN='\033[0;32m' RED='\033[0;31m' YELLOW='\033[1;33m' BLUE='\033[0;34m' NC='\033[0m' # Create logs directory mkdir -p logs echo "1. Installing Frontend Dependencies..." echo "-------------------------------------" cd frontend if [ ! -d "node_modules" ]; then echo "Installing dependencies..." npm install else echo -e "${GREEN}✓ Dependencies already installed${NC}" fi echo "" echo "2. Starting Frontend Development Server..." echo "-----------------------------------------" # Kill any process on port 5173 lsof -ti:5173 | xargs kill -9 2>/dev/null # Start frontend npm run dev & echo "" echo -e "${YELLOW}âŗ Waiting for frontend to start...${NC}" sleep 5 echo "" echo "3. Service Status..." echo "-------------------" if lsof -Pi :5173 -sTCP:LISTEN -t >/dev/null 2>&1; then echo -e "Frontend: ${GREEN}✓ Running${NC} on port 5173" echo "" echo -e "${GREEN}✅ System started successfully!${NC}" echo "" echo "📌 Access the application at: ${BLUE}http://localhost:5173${NC}" echo "" echo "📝 Default Admin Credentials:" echo " Email: admin@example.com" echo " Password: admin123" echo "" echo "â„šī¸ Note: This is frontend-only mode. Backend services are not running." echo " The UI will be available but API calls will fail." echo "" echo "🛑 To stop: Press Ctrl+C or run 'lsof -ti:5173 | xargs kill -9'" else echo -e "Frontend: ${RED}✗ Failed to start${NC}" echo "" echo "Check the error messages above or try running:" echo " cd frontend && npm run dev" fi