-
Notifications
You must be signed in to change notification settings - Fork 741
Expand file tree
/
Copy pathstart-dev.sh
More file actions
executable file
·96 lines (77 loc) · 2.26 KB
/
Copy pathstart-dev.sh
File metadata and controls
executable file
·96 lines (77 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/bin/bash
# Video Intelligence App - Development Startup Script
echo "🎬 Starting Video Intelligence App Development Environment"
echo "========================================================"
# Check if we're in the right directory
if [ ! -f "README.md" ]; then
echo "❌ Please run this script from the video-intelligence directory"
exit 1
fi
# Function to check if command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
# Check prerequisites
echo "📋 Checking prerequisites..."
if ! command_exists python; then
echo "❌ Python is not installed"
exit 1
fi
if ! command_exists node; then
echo "❌ Node.js is not installed"
exit 1
fi
if ! command_exists npm; then
echo "❌ npm is not installed"
exit 1
fi
echo "✅ Prerequisites check passed"
# Setup backend
echo ""
echo "🔧 Setting up backend..."
cd backend
# Check if virtual environment exists
if [ ! -d "venv" ]; then
echo "Creating Python virtual environment..."
python -m venv venv
fi
# Activate virtual environment
source venv/bin/activate
# Install dependencies
echo "Installing Python dependencies..."
pip install -r requirements.txt
# Check if .env file exists
if [ ! -f ".env" ]; then
echo "⚠️ .env file not found. Copying from .env.example"
cp .env.example .env
echo "📝 Please edit .env file with your API keys and MongoDB connection string"
fi
cd ..
# Setup frontend
echo ""
echo "🎨 Setting up frontend..."
cd frontend
# Install dependencies if node_modules doesn't exist
if [ ! -d "node_modules" ]; then
echo "Installing Node.js dependencies..."
npm install
fi
cd ..
echo ""
echo "🚀 Setup complete! To start the application:"
echo ""
echo "1. Start the backend (in terminal 1):"
echo " cd backend && source venv/bin/activate && python main.py"
echo ""
echo "2. Start the frontend (in terminal 2):"
echo " cd frontend && npm start"
echo ""
echo "📝 Don't forget to:"
echo " - Configure your .env file with API keys"
echo " - Set up MongoDB Atlas with vector search indexes"
echo " - Check the README.md for detailed setup instructions"
echo ""
echo "🌐 App will be available at:"
echo " Frontend: http://localhost:3000"
echo " Backend API: http://localhost:8000"
echo " API Docs: http://localhost:8000/docs"