Requirements: Due to time limit we currently have plug-and-play feature for whole project build and installation for Linux & Unix Operating Systems only.
Get your coffee(☕) first time installation might take some minutes.
We tried to make your experience seamless, don't worry it takes time but not longer than docker to build. Note: If the project didn't started from plug-play, you still can go step by step from here. Also, don't forget to raise an issue on GitHub, we'll try to fix it asap.
#!/bin/bash# Function to check if a command existscommand_exists() {command-v"$1"&> /dev/null ;}# Step:1 Check if Rust is installedif!command_existsrustcthenecho"Rust is not installed. Installing Rust..."# Install Rust using rustup (recommended method)curl--proto'=https'--tlsv1.2-sSfhttps://sh.rustup.rs|sh-s---y# Add Cargo's bin directory to the PATH environment variablesource $HOME/.cargo/envecho"Rust has been successfully installed."elseecho"Rust is already installed. Skipping installation."fi# Display Rust versionecho"Rust version:"rustc--versioncargo--version# Optionally, display Cargo version too# Step 2 Install Caracal using Cargocargoinstall--githttps://github.com/crytic/caracal--profilerelease--force# Step 3 Set up Python virtual environment and install Slitherif [ -d"venv" ]; thenrm-rfvenvfipython3-mvenvvenvsource./venv/bin/activate# Upgrade pip and install dependenciespip3install--upgradepippip3installtransformers[torch]pip3installslither-analyzer# Verify the installation of transformersif!python3-c"from transformers import RobertaForSequenceClassification, Trainer, TrainingArguments, RobertaTokenizer"&> /dev/null; thenecho"Error: Transformers module is not installed correctly."exit1fi# Step 4 Navigate to the project root directory (assuming the script is run from the project root)cd"$(dirname "$0")"# Check if Node.js is installedif!command_existsnodethenecho"Node.js is not installed. Installing Node.js..."# Install Node.js (you can choose a different method if you prefer)curl-fsSLhttps://deb.nodesource.com/setup_16.x|sudo-Ebash-sudoapt-getinstall-ynodejsecho"Node.js has been successfully installed."elseecho"Node.js is already installed. Skipping installation."fi# Step 5: Check if bun is installedif!command_existsbunthenecho"bun is not installed. Installing bun..."# Install bun (ensure the script is correct for your system)curl-fsSLhttps://bun.sh/install|bash# Add bun to the PATHsource $HOME/.bun/bin/bunecho"bun has been successfully installed."elseecho"bun is already installed. Skipping installation."fi# Ensure bun is in the PATH for the current sessionexport PATH=$HOME/.bun/bin:$PATH# Clean up old node_modules and package-lock.jsonrm-rfnode_modulespackage-lock.json# Step 6: Install frontend dependencies using bunbuninstall# Run the frontendbunrundev&# Navigate to the server directory and run the backendcdserver# Clean up old node_modules and package-lock.json in server directoryrm-rfnode_modulespackage-lock.json# Install backend dependencies using bunbuninstall# Check if Express is installedif!bunlistexpress&> /dev/null; thenecho"Express is not installed. Installing Express..."bunaddexpressecho"Express has been successfully installed."elseecho"Express is already installed."finodeindex.js# Wait for both processes to complete (optional)wait