Giter Club home page Giter Club logo

panorama's Introduction

Panorama header

Panorama

๐Ÿ“– Description

The Panorama project aims to shine light on the amount of work that contributors have carried out on a group project. A deployed version of the project can be found at https://panorama.fran.codes/.

โ˜•๏ธ Requirements

Panorama has the following requirements:

  • Node โ‰ฅ 15.12.0 and NPM โ‰ฅ 7.6.3;
  • Redis;
  • A MySQL server;
  • OpenSSL or another utility capable of generating RSA keys.

โš™๏ธ Set-up

You should build the frontend component first, as the script will also transfer the necessary files to the compilation directory.

It's worth noting that these instructions assume a ๏ฃฟ macOS or ๐Ÿง Linux environment, so your mileage may vary.

Prerequisites

GitHub

Panorama requires GitHub OAUTH tokens to use the GitHub API.

  • Navigate to GitHub and log into your account.
  • Navigate to Settings > Developer Settings > OAuth Apps.
  • Click the New OAuth App button.
  • Fill-in the required fields including the application's name.
  • Ensure that the Authorization Callback URL field is set to "<protocol>://<host>/api/github/callback", replacing <protocol> with either "http" or "https" depending on your hosting, and <host> with the IP address or the URL on which you wish to host Panorama.
  • Click Register Application.
  • Copy the Client ID and Client Secret tokens and store them in a safe place (you may be asked to generate a new Client Secret token).

RSA Key

You will need a valid RSA private key which will be used in Panorama's cryptographic modules. To generate one, run:

openssl genrsa -out assets/crypto/key.pem

Dependencies

Install Panorama's dependencies by running:

npm install

Additionally, if you haven't already, install required packages globally:

npm install -g typescript webpack-cli

Database

Import the MySQL schema located in deployment/panorama-db.sql into your MySQL database using your preferred database management system.

Frontend

To compile the frontend using Webpack, which will also take care of compiling the TypeScript code, simply run:

npm run build-client

Running Webpack in production mode will drastically reduce file size and optimise the output, but may take a long time to complete. To do so, run the following command:

npm run build-client-prod

Backend

Configuration

Create a new panorama.json file by running:

cp src/server/panorama.default.json src/server/panorama.json

Edit the new config file in your preferred editor to include the Client ID and Client Secret tokens you generated for your app, MySQL database and Redis connection details. For reference, open the Config.ts file in src/server to read a description of every property.

nano src/server/panorama.json

Compiling

Then, compile the TypeScript code using the compiler:

npm run build-server

Make sure you let node-gyp compile sqlite3 to a native module. If you get an error about this, just run:

npm rebuild

๐Ÿƒโ€โ™‚๏ธ Running

The server can be executed by running:

node dist/server/index.js

๐Ÿงช Testing

All test suites can be executed by running:

npm test

It is highly recommended to create a panorama.test.json config file which points to a test database to prevent tests from conflicting with your production environment. If the test suite does not find this file, it will fall back to panorama.json and panorama.default.json.

๐Ÿ‘จโ€๐Ÿ’ป Credits

Project

  • Francesco Compagnoni - Engineering.
  • Dr Jeroen Keppens - Project supervisor.
  • Dr Christian Urban - Guidance with lexing system.

Notable works

panorama's People

Contributors

frannyfx avatar

Stargazers

 avatar

Watchers

 avatar

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.