#!/usr/bin/env bash # Setup script for Rzmy7/hotel-and-restaurant-review-management-system on macOS, from https://gitmanual.com/Rzmy7/hotel-and-restaurant-review-management-system # Read it before you run it: the commands come from the repo's own README and files. # Run: bash setup.sh set -eo pipefail trap 'echo "Setup stopped at the step above. Steps and fixes: https://gitmanual.com/Rzmy7/hotel-and-restaurant-review-management-system" >&2' ERR step() { printf '\n\033[1m==> %s\033[0m\n' "$1"; } have() { command -v "$1" >/dev/null 2>&1; } # Installers put programs here; make them usable right away. export PATH="$HOME/.local/share/mise/shims:$HOME/.cargo/bin:$HOME/.local/bin:$HOME/.deno/bin:$HOME/.bun/bin:$PATH" # nvm is a shell function, so load it into this script when it's installed. export NVM_DIR="${NVM_DIR:-$HOME/.nvm}" load_nvm() { [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" || { have brew && [ -s "$(brew --prefix nvm 2>/dev/null)/nvm.sh" ] && mkdir -p "$NVM_DIR" && . "$(brew --prefix nvm)/nvm.sh"; }; } have_nvm() { load_nvm >/dev/null 2>&1; type nvm >/dev/null 2>&1; } step '1/3 Clone the repository' [ -d 'hotel-and-restaurant-review-management-system' ] || git clone https://github.com/Rzmy7/hotel-and-restaurant-review-management-system.git cd 'hotel-and-restaurant-review-management-system' step '2/3 Install the required tools' # Docker, Python 3, Node.js # Docker Desktop have docker || brew install --cask docker have python3 || brew install python have node || brew install node step '3/3 Follow the README: 🚀 Quick Start Guide' # In the maintainers' order. Do the README instructions above first — they cover steps outside the terminal. python -m venv venv venv\Scripts\activate pip install -r requirements.txt playwright install chromium [ -f .env ] || cp .env.example .env python -c "import tests.test_db_connectivity" npm install npm install docker build -t embedding-service . docker run -d -p 8002:8000 -v chroma_data:/data/chroma --name reviewmate-embedding embedding-service pip install -r requirements.txt playwright install chromium python api/main.py python launcher.py .\dist\System-Launcher.exe echo 'Set up Rzmy7/hotel-and-restaurant-review-management-system.' echo 'Next, from the project folder:' echo ' uvicorn app.main:app --reload --host 0.0.0.0 --port 8000' echo ' npm run dev' echo ' npm run dev' echo 'Manual: https://gitmanual.com/Rzmy7/hotel-and-restaurant-review-management-system'