Darak / start.sh
Antigravity AI
Update full system to Hugging Face
771f178
Raw
History Blame Contribute Delete
1.77 kB
#!/bin/bash
echo "======================================"
echo " Starting Darak AI Platform..."
echo "======================================"
cd "$(dirname "$0")"
# 1. Python Virtual Environment
if [ ! -d "venv" ]; then
echo "[*] Creating Python Virtual Environment..."
python3 -m venv venv
fi
echo "[*] Activating Virtual Environment..."
source venv/bin/activate
echo "[*] Upgrading pip..."
pip install --upgrade pip setuptools wheel -q
# 2. Install Backend Dependencies
echo "[*] Installing Backend Dependencies..."
pip install -r backend/requirements.txt -q
# 3. Start Backend API on port 8000
echo "[*] Starting AI Backend on port 8000..."
cd backend
uvicorn main:app --reload --host 0.0.0.0 --port 8000 &
BACKEND_PID=$!
cd ..
# 4. Start Frontend Dev Server on port 8765
echo "[*] Starting Frontend Server on port 8765..."
cd front
python3 -m http.server 8765 &
FRONTEND_PID=$!
cd ..
# 5. Start Aggregator Service on port 9000 (optional, if node_modules exist)
if [ -d "aggregator_service/node_modules" ]; then
echo "[*] Starting Aggregator Service on port 9000..."
cd aggregator_service
PORT=9000 node src/server.js &
AGGREGATOR_PID=$!
cd ..
else
echo "[!] Aggregator node_modules not found. Run: cd aggregator_service && npm install"
AGGREGATOR_PID=""
fi
echo "======================================"
echo " Darak AI Platform is LIVE!"
echo ""
echo " Frontend: http://localhost:8765"
echo " Backend API: http://localhost:8000"
echo " API Docs: http://localhost:8000/docs"
echo " Aggregator: http://localhost:9000"
echo "======================================"
echo "Press CTRL+C to stop all servers."
trap "echo 'Shutting down...'; kill $BACKEND_PID $FRONTEND_PID $AGGREGATOR_PID 2>/dev/null; exit" INT
wait