Giter VIP home page Giter VIP logo

collab-dashboard's Introduction

Collab Dashboard

Dashboard displaying metrics for Collab.

Prerequisites

  • Please set up Collab before setting up the dashboard. This will take care of the databases and various shared dependencies.
  • Use Node v8 to setup

Development Setup

  1. Clone repository to Collab-tools root folder.

    $ git clone https://github.com/collab-tools/collab-dashboard.git
  2. Create config/local-dev.json using the config/_local-template.json template. If unsure, please contact a fellow engineer!

    cp config/_local-template.json config/local-dev.json
  3. Enter config details in local-dev.json (DB details same as that provided for collab config)

  4. Link collab-db-applications and collab-db-logging. Run the following command from the root folder of collab-dashboard.

    $ sudo npm link collab-db-application collab-db-logging```
    
  5. Install dependencies

    # Install server dependencies
    $ sudo npm install
    # Install client dependencies
    $ cd public/
    $ sudo npm install
    $ sudo npm install -g grunt-cli bower
    $ bower install
  6. Build the server

    $ cd ../
    $ sudo npm install babel-preset-env
    $ sudo npm run compile
  7. Run the server. Server should start on port 4000.

    npm run dev
  8. Create an admin user (username: admin ; password : veryverysecretpassword) by running the following in a new terminal.

    # (Assuming the email of the admin is [email protected] and developer_key is set to 12341234 in config/local-dev.json)
    $ curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'devKey=12341234&[email protected]' "http://localhost:4000/api/auth"
  9. Serve the client files

    • Use nginx for reverse proxying /api/* requests to the server. To install nginx :

      $ sudo apt-get install nginx
    • You might have to stop apache before starting this service, if both services run on the same port.

      $ sudo service apache2 stop```
    • Add the following to root\etc\nginx\nginx.conf (within http{}) and root\etc\nginx\sites-available\default

      server {
          listen 9000;
      
          # Replace this with the path to your collab-dashboard/public/dist/ directory
          root /vagrant/collab-dashboard/public/dist/;
          index index.html index.htm;
      
          # Make site accessible from http://localhost/
          server_name localhost;
      
          location /api/ {
              proxy_pass http://127.0.0.1:4000;
          }
      
          location ~* ^/app {
              try_files /$uri /app/index.html;
          }
      
          location / {
              try_files $uri $uri/ /app/$uri /app/index.html;
          }
      }
    • Start nginx service :

      $ sudo service nginx restart```
      
  10. If run in local server:

  • start server at /collab-dashboard by running npm run dev
  • start client at /collab-dashboard/public by running grunt buildandgrunt watch
  1. Open http://localhost:4000 on your browser and login with admin credentials.

Additional Notes

  • grunt build to build client assets.
  • grunt watch to watch for changes and build client assets.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.