#!/bin/bash echo "🚀 Setting up Transcreation Sandbox..." # Check if Node.js is installed if ! command -v node &> /dev/null; then echo "❌ Node.js is not installed. Please install Node.js (v16 or higher) first." exit 1 fi # Check if npm is installed if ! command -v npm &> /dev/null; then echo "❌ npm is not installed. Please install npm first." exit 1 fi echo "✅ Node.js and npm are installed" # Install root dependencies echo "📦 Installing root dependencies..." npm install # Install server dependencies echo "📦 Installing server dependencies..." cd server && npm install && cd .. # Install client dependencies echo "📦 Installing client dependencies..." cd client && npm install && cd .. # Create .env file if it doesn't exist if [ ! -f "server/.env" ]; then echo "📝 Creating .env file..." cp server/.env.example server/.env echo "✅ Created server/.env file. Please update it with your configuration." fi echo "" echo "🎉 Setup complete!" echo "" echo "To start the development servers:" echo " npm run dev" echo "" echo "Or start them separately:" echo " # Terminal 1: Backend server" echo " cd server && npm run dev" echo "" echo " # Terminal 2: Frontend server" echo " cd client && npm start" echo "" echo "Make sure MongoDB is running on localhost:27017" echo "The application will be available at http://localhost:3000"