/gephi-lite

A web-based, lighter version of Gephi

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0

Gephi Lite

Gephi Lite is a free and open-source web application to visualize and explore networks and graphs. It is a web-based, lighter version of Gephi. You can try it here:

gephi.org/gephi-lite

It is currently under active developments, so features can evolve quite quickly. Feel free to report bugs or ask for new features in the issues board.

You can read more about the intent of this project on the Gephi blog.

License

Gephi Lite source code is distributed under the GNU General Public License v3.

Run locally

Gephi Lite is a web application, written using TypeScript and React. The styles are written using SASS, and are based on Bootstrap v5.

Gephi Lite uses sigma.js for graph rendering, and graphology as the graph model as well as for graph algorithms. It has been bootstrapped with Create React App.

To build Gephi Lite locally, you first need a recent version of Node.js with NPM installed on your computer. You can then install the dependencies by running npm install in Gephi Lite's directory.

Now, in the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000/gephi-lite to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your Gephi Lite is ready to be deployed!

Deploy the application

To allow users to synchronize their data with GitHub, Gephi Lite needs a reverse proxy to avoid CORS issues. When working locally in development, we use http-proxy-middleware to make that work.

To deploy the application, you need to define the env variable REACT_APP_GITHUB_PROXY before building it, by following those steps:

$> REACT_APP_GITHUB_PROXY=mydomain.for.github.auth.proxy.com
$> npm install
$> npm run build

On gephi.org/gephi-lite we use this settings : REACT_APP_GITHUB_PROXY: "https://githubapi.gephi.org".

Then on our server, we configured NGINX with this following settings:

server {
    listen       443 ssl;
    server_name githubapi.gephi.org;

    ssl_certificate /etc/letsencrypt/live/githubapi.gephi.org/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/githubapi.gephi.org/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

   location /login {
     add_header Access-Control-Allow-Origin "https://gephi.org";
     add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
     add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept, user-agent";
     if ($request_method = OPTIONS) {
        return 204;
     }
     proxy_pass https://github.com/login;
   }

   location / {
     return 404;
   }
}

PS: On this configuration you should change the server_name with its ssl configuration, as well as the add_header Access-Control-Allow-Origin value.