Skip to content

OKN-CollabNext/CollabNext_public

Repository files navigation

CollabNext

A collaborative research discovery platform that enables multi-modal search across academic publications, institutions, and researchers using data from OpenAlex and SemOpenAlex.

Table of Contents

Local Development (Recommended)

Prerequisites

Set Up Local Development

  1. Clone the repository to your local machine
  2. Navigate to the frontend folder, and edit REACT_APP_BASE_URL to be http://localhost:5000
  3. Ensure Postgres is installed by testing the following commands:
pg_restore --version
psql --version
  1. Download the smaller local Postgres database, small_openalex.sql and navigate to the same directory
  2. Create the database locally
createdb -U postgres small_openalex
psql -U postgres -d small_openalex -f small_openalex.sql
  1. Ensure Docker Desktop is installed and running
  2. Navigate to the main directory with docker-compose.yml file
  3. Spin up the containers connected to the running local database:
docker compose build
docker compose up
  1. Navigate to http://localhost:3000/ to interact with the frontend.
  2. Stop the containers and remove the database:
docker compose down
dropdb small_openalex 

Legacy Manual Deployment

Prerequisites

Option 1: One-Command Deployment

Run this single command to deploy CollabNext to your Kubernetes cluster:

curl -s https://raw.githubusercontent.com/OKN-CollabNext/CollabNext_public/main/scripts/deploy-from-ghcr.sh | bash

This script will:

  • Download the latest Helm chart
  • Pull container images from GitHub Container Registry (GHCR)
  • Deploy the complete application stack
  • Show you how to access the application

Option 2: Manual Container Deployment

  1. Download the Helm chart:

    curl -L -o collabnext-alpha.tgz https://github.com/OKN-CollabNext/CollabNext_public/releases/latest/download/collabnext-alpha-0.1.0.tgz
  2. Install with Helm:

    helm install collabnext ./collabnext-alpha.tgz
  3. Access the application:

    # Get service information
    kubectl get services
    
    # If using NodePort (local development):
    kubectl get nodes -o wide  # Get node IP
    kubectl get svc collabnext-frontend -o jsonpath='{.spec.ports[0].nodePort}'  # Get port
    
    # If using port-forward:
    kubectl port-forward svc/collabnext-frontend 3000:80
    # Then visit: http://localhost:3000

Container Images: All images are available at GitHub Container Registry

Legacy Container Local Development

Container-based Development

For local development with containers (recommended for consistency):

  1. Start with Minikube:

    minikube start --driver=docker --memory=2048 --cpus=2
  2. Deploy using local values:

    # Download and extract the Helm chart
    curl -L -o collabnext-alpha.tgz https://github.com/OKN-CollabNext/CollabNext_public/releases/latest/download/collabnext-alpha-0.1.0.tgz
    tar -xzf collabnext-alpha.tgz
    
    # Install with local development values
    helm install collabnext-local ./collabnext-alpha -f ./collabnext-alpha/values-local.yaml
  3. Access the application:

    # Get the NodePort
    kubectl get svc collabnext-local-frontend
    
    # Get Minikube IP
    minikube ip
    
    # Visit: http://<minikube-ip>:<nodeport>

Legacy Local Development

Note: This is the old way of running the application without containers. The container-based approach above is recommended for new setups.

Click to expand legacy setup instructions

If you prefer to set up the environment manually without containers, follow these steps:

Quick Start Scripts (Legacy)

For Mac/Unix users:

  1. Open a terminal.
  2. Navigate to the project directory.
  3. Run the following commands:
    chmod +x setup.sh  # Only needed the first time
    ./setup.sh

For Windows users:

  1. Open Command Prompt.
  2. Navigate to the project directory.
  3. Run the following command:
    setup.bat

These scripts will automatically set up the backend and frontend environments and start the development servers.

Manual Setup (Legacy)

Building React.js/Flask application locally:

  1. Change directory to backend

    cd backend
  2. Python setup

    • Create a virtual environment:

      python3 -m venv .venv
    • Activate the virtual environment:

      source .venv/bin/activate
    • If the above command doesn't work on Windows, try:

      cd .venv\Scripts
      activate
      cd ..\..
    • Install the required packages:

      pip install -r requirements.txt
  3. Run Flask app locally

    • Execute the Python script containing your Flask application:
      python app.py
  4. Open a new terminal and change directory to frontend

    cd frontend
  5. Install React app dependencies

    • Run the following commands:
      npm install --legacy-peer-deps
      npm install @memgraph/orb
  6. Create .env.local file

    • In the frontend folder, copy everything from .env.example and paste it into .env.local.
  7. Run React app locally

    • Execute the start command:
      npm start

Note: If you encounter port issues on Mac, try:

  • System Settings > General > AirDrop & Handoff > turn off AirPlay Receiver

Contact Information

Contact Lew Lefton ([email protected]) for any more questions about this project.


Contributing

This is an open-source project. Contributions are welcome! Please feel free to submit issues and pull requests.

License

See LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 18