#!/bin/bash

# Setup script for Employee Directory System
# This script installs dependencies and seeds the database

set -e  # Exit on any error

echo "Setting up Employee Directory System..."

# Change to repo directory if not already there
if [ ! -f "main.py" ]; then
    echo "Error: This script should be run from the repository root directory"
    exit 1
fi

# Install dependencies
echo "Installing dependencies..."
# This application uses only Python standard library modules
# Check if Python 3 is available
if ! command -v python3 &> /dev/null; then
    echo "Error: Python 3 is required but not found"
    exit 1
fi

echo "Python 3 found - no external dependencies required"

# Seed the database
echo "Seeding database..."
./script/seed

echo "Setup complete! You can now run the application with: python3 main.py"