Skip to main content

Installation

This guide will help you set up Zygotrix for local development or production deployment.

Prerequisites

Required Software

SoftwareVersionPurpose
Python3.11+Backend API
Node.js22+Frontend builds
MongoDB6.0+Database
Redis7.0+Caching & sessions
CMake3.16+C++ engine builds
GCC/G++12+C++ compilation

Optional Software

SoftwarePurpose
DockerContainerized deployment
libeigen3-devGWAS statistical analysis
libomp-devOpenMP parallel processing

Step 1: Clone the Repository

git clone https://github.com/Nouman64-cat/Zygotrix.git
cd Zygotrix

Step 2: Backend Setup

Create Virtual Environment

cd backend
python -m venv .venv

# Activate (Windows)
.venv\Scripts\activate

# Activate (Linux/Mac)
source .venv/bin/activate

Install Python Dependencies

pip install -r requirements.txt

Configure Environment

# Copy the example config
cp .env.example .env

# Edit with your values
nano .env

Required environment variables:

# MongoDB connection
MONGODB_URI=mongodb://localhost:27017
MONGODB_DB_NAME=zygotrix

# Authentication
AUTH_SECRET_KEY=your-secure-random-key

# AI Chatbot (get from Anthropic)
ANTHROPIC_API_KEY=sk-ant-...

See .env.example for all available options.

Step 3: C++ Engine Setup

The C++ engines provide high-performance calculations for genetics operations.

Linux (Production)

# Install dependencies
sudo apt update
sudo apt install cmake build-essential libeigen3-dev libomp-dev

# Build the engines
cd zygotrix_engine_cpp
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release
cmake --build build

# Verify build (should see multiple executables)
ls -la build/zyg_*

Windows (Development)

cd zygotrix_engine_cpp

# Using MinGW
cmake -B build -S . -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release
cmake --build build

# Verify
dir build\*.exe
No Configuration Needed

The backend automatically finds the C++ binaries. No environment variables required!

Step 4: Start the Services

Start MongoDB

# Linux
sudo systemctl start mongodb

# macOS (Homebrew)
brew services start mongodb-community

# Docker
docker run -d -p 27017:27017 --name mongodb mongo:6

Start Redis

# Linux
sudo systemctl start redis

# macOS (Homebrew)
brew services start redis

# Docker
docker run -d -p 6379:6379 --name redis redis:7

Start Backend

cd backend
source .venv/bin/activate # or .venv\Scripts\activate on Windows

# Development (with hot reload)
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

Start Frontend (Optional)

cd zygotrix_ai
npm install
npm run dev

Step 5: Verify Installation

  1. Backend API: Open http://localhost:8000/docs
  2. Frontend: Open http://localhost:5173
  3. Test GWAS: Upload a VCF file through the chatbot

Next Steps