-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·72 lines (59 loc) · 1.67 KB
/
setup.sh
File metadata and controls
executable file
·72 lines (59 loc) · 1.67 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
#!/bin/bash
echo "🚀 Setting up AI-Powered Document Insight Tool"
# Check if we're in the right directory
if [ ! -f "README.md" ]; then
echo "❌ Please run this script from the project root directory"
exit 1
fi
# Backend setup
echo "📦 Setting up backend..."
cd backend
# Create virtual environment if it doesn't exist
if [ ! -d "venv" ]; then
echo "Creating Python virtual environment..."
python3 -m venv venv
fi
# Activate virtual environment
source venv/bin/activate
# Install dependencies
echo "Installing Python dependencies..."
pip install -r requirements.txt
# Create .env file if it doesn't exist
if [ ! -f ".env" ]; then
echo "Creating backend .env file..."
cp env.example .env
echo "⚠️ Please edit backend/.env with your configuration"
fi
cd ..
# Frontend setup
echo "📦 Setting up frontend..."
cd frontend
# Install dependencies
echo "Installing Node.js dependencies..."
npm install
# Create .env.local file if it doesn't exist
if [ ! -f ".env.local" ]; then
echo "Creating frontend .env.local file..."
cp env.example .env.local
echo "⚠️ Please edit frontend/.env.local with your configuration"
fi
cd ..
echo "✅ Setup complete!"
echo ""
echo "📝 Next steps:"
echo "1. Configure your environment variables:"
echo " - Edit backend/.env"
echo " - Edit frontend/.env.local"
echo ""
echo "2. Start the backend (in one terminal):"
echo " cd backend"
echo " source venv/bin/activate"
echo " uvicorn app.main:app --reload"
echo ""
echo "3. Start the frontend (in another terminal):"
echo " cd frontend"
echo " npm run dev"
echo ""
echo "4. Visit http://localhost:5173"
echo ""
echo "📚 For more details, see README.md"