Spaces:
Runtime error
Runtime error
File size: 1,835 Bytes
8bd7c09 | 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 | $ScriptPath = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location "$ScriptPath\.."
Write-Host "ATLAS Project Bootstrap (Windows)" -ForegroundColor Cyan
Write-Host "---------------------------------" -ForegroundColor Cyan
# 1. Check Python
if (Get-Command python -ErrorAction SilentlyContinue) {
Write-Host "[OK] Python is installed." -ForegroundColor Green
} else {
Write-Host "[ERROR] Python is not installed or not in PATH." -ForegroundColor Red
exit 1
}
# 2. Check Node
if (Get-Command node -ErrorAction SilentlyContinue) {
Write-Host "[OK] Node.js is installed." -ForegroundColor Green
} else {
Write-Host "[ERROR] Node.js is not installed or not in PATH." -ForegroundColor Red
exit 1
}
# 3. Create .env
if (-not (Test-Path .env)) {
if (Test-Path .env.example) {
Copy-Item .env.example .env
Write-Host "[OK] Copied .env.example to .env." -ForegroundColor Green
} else {
Write-Host "[ERROR] .env.example not found!" -ForegroundColor Red
}
} else {
Write-Host "[INFO] .env already exists." -ForegroundColor Yellow
}
# 4. Python venv
Write-Host "Creating Python virtual environment..." -ForegroundColor Cyan
python -m venv .venv
# 5. Activate venv and install dependencies
Write-Host "Installing backend dependencies..." -ForegroundColor Cyan
& .\.venv\Scripts\Activate.ps1
Set-Location backend
python -m pip install --upgrade pip
pip install -r requirements.txt
Set-Location ..
# 6. Install frontend dependencies
Write-Host "Installing frontend dependencies..." -ForegroundColor Cyan
Set-Location frontend
npm install
Set-Location ..
Write-Host "---------------------------------" -ForegroundColor Cyan
Write-Host "Bootstrap Complete!" -ForegroundColor Green
Write-Host "To activate the virtual environment manually, run: .\.venv\Scripts\Activate.ps1"
|