Skip to content

SethCram/linguists-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linguists-client

Responsive user interface for an NL-to-SQL system. Empowers non-technical users with direct database access.

Read the paper

Linguists_Client

Comprehensive conceptual view

Linguists Project Conceptual View

Developer Setup

  1. clone the repo git clone https://github.com/SethCram/linguists-client.git
  2. install the JavaScript runtime environment Node.js v16 and npm, the Javascript package manager
    1. on Windows (recommended), download Node.js off their website which comes with npm pre-installed
    2. on Ubuntu-based distributions
      sudo apt install -y nodejs
      sudo apt install -y npm
    3. on RHEL-based distributions
      sudo yum install -y nodejs
  3. run "npm install" in the root folder to install the project dependencies
    cd linguists-client
    npm install
  4. run npm start in the root folder to get the frontend up and running
    1. if an issue is encountered, try installing nvm and updating to the right node.js version:
      curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
      command -v nvm
      If "command -v nvm" doesn't output "nvm", logout and relogin, and then:
      nvm install 16.17.1
  5. make a change to the project and notice how it's immediately reflected in the development server after saving
  6. head over to the backend at https://github.com/SethCram/Linguists-NLP-to-SQL/blob/main/README.md#setup and follow the setup steps

Deployment Instructions (on Linux)

  1. first, setup the backend: backend deployment instructions
  2. install setup software Node.js and npm
    1. on Ubuntu-based distributions
      sudo apt install -y nodejs
      sudo apt install -y npm
    2. on RHEL-based distributions
      sudo yum install -y nodejs
  3. clone the repository git clone https://github.com/SethCram/linguists-client.git
  4. install the project dependencies
    cd linguists-client
    npm install
  5. try running the frontend sudo npm start
    1. if an issue is encountered, try installing nvm and updating to the right node.js version:
      curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
      command -v nvm
      If "command -v nvm" doesn't output "nvm", logout and relogin, and then:
      nvm install 16.17.1
  6. cancel the process with Ctrl-C now that we verified that it launched okay
  7. redirect the server traffic to the web application
    sudo vi /etc/nginx/nginx.conf
    add this inside the "server" block, replacing "root" with:
    root /var/www/html;
    
    verify the syntax of the config file is okay and start nginx using it
    sudo nginx -t
    sudo service nginx restart
  8. create the proper folders, copy the production build files to it, and make sure SELinux doesn't interfere
    sudo mkdir -p /var/www/html
    sudo cp -r ./build/* /var/www/html
    restorecon -r /var/www/html
  9. navigate to the public IP address using http (e.g. http://[publicIPAddress]) and the frontend should be visible or use curl to verify curl http://[publicIPAddress]
  10. verify that it's connected to the backend at port 8000 by clicking on the dropdown and seeing if it breaks