ATLAS-Backend / scripts /bootstrap.sh
Anish-530
feat: complete Day 1 bootstrap and directory scaffolding
8bd7c09
Raw History Blame Contribute Delete
1.44 kB
#!/bin/bash
echo -e "\033[0;36mATLAS Project Bootstrap (Linux/Mac)\033[0m"
echo -e "\033[0;36m---------------------------------\033[0m"
# Move to root dir
cd "$(dirname "$0")/.."
# 1. Check Python
if command -v python3 &>/dev/null; then
echo -e "\033[0;32m[OK] Python3 is installed.\033[0m"
else
echo -e "\033[0;31m[ERROR] Python3 is not installed or not in PATH.\033[0m"
exit 1
fi
# 2. Check Node
if command -v node &>/dev/null; then
echo -e "\033[0;32m[OK] Node.js is installed.\033[0m"
else
echo -e "\033[0;31m[ERROR] Node.js is not installed or not in PATH.\033[0m"
exit 1
fi
# 3. Create .env
if [ ! -f .env ]; then
cp .env.example .env
echo -e "\033[0;32m[OK] Copied .env.example to .env.\033[0m"
else
echo -e "\033[0;33m[INFO] .env already exists.\033[0m"
fi
# 4. Python venv
echo -e "\033[0;36mCreating Python virtual environment...\033[0m"
python3 -m venv .venv
# 5. Activate venv and install dependencies
echo -e "\033[0;36mInstalling backend dependencies...\033[0m"
source .venv/bin/activate
cd backend
pip install --upgrade pip
pip install -r requirements.txt
cd ..
# 6. Install frontend dependencies
echo -e "\033[0;36mInstalling frontend dependencies...\033[0m"
cd frontend
npm install
cd ..
echo -e "\033[0;36m---------------------------------\033[0m"
echo -e "\033[0;32mBootstrap Complete!\033[0m"
echo -e "To activate the virtual environment manually, run: source .venv/bin/activate"