Skip to content
This repository was archived by the owner on Jun 16, 2023. It is now read-only.

Rocketwf/Schala

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Documentation

Contribute

Human language policy

  • Try to use technical terminology in your commits
  • Try to use proper spelling
  • The language of the project is American English with en_US.UTF-8

Codestyle policy

  • Write typed code, using TypeScript
  • Split larger changes into smaller commits
  • Commit message should be written with care, and with proper punctuation.
  • Commit message shouldn't exceed 80 characters
  • Following lines can provide more details about the commit
  • Write the commits in the imperative mood

Workflow

  • To work on a feature:
  1. pull from origin/develop (git pull origin develop)
  2. create/switch to the feature branch (git checkout -b [feature_name])
  3. commit/push into the feature branch (git add [files] ; git commit ; git push -u origin [feature_name])
  4. repeat step.3 until you are done working on the feature
  5. create a pull request
  6. make sure your PR passes CI

Development

Prerequisites

Make sure you have all the following dependencies
On Debian based systems e.g., Ubuntu and WSL:
First, update your local repos:

sudo apt update

It's also recommended to upgrade your system:

sudo apt upgrade

NodeJS >=18

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install nodejs

Next, install make:

sudo apt install make

Using the following command install @quasar/cli and yarn:

sudo npm i -g @quasar/cli yarn typescript

SemanticScholar API key

If you have an SemanticScholar API key you can use it by ecporting it as a global variable (Replace API_KEY with your key)

export SCHALA_API_KEY='API_KEY'

Build/Install: necessary steps

Export back-end url/port:

export API_URL=url
export API_PORT=port

First time you need to the following command to install all dependencies:

make all

To run the project for testing/development (skip testing):

make run

To run the core tests only (backend should be up and running):

make core_test

To run the server tests only:

make server_test

To run the gui tests only (backend should be up and running):

make gui_test

Build/Install: spa/electron

To build the project (SPA):

make build_spa

To build the project (electron):

make build_electron

Build/Install: Android

Install Java 8:

apt install openjdk-8-jdk

Download and install Android Studio: Android Studio. Add Android SDK to the path:

export ANDROID_HOME="$HOME/Android/Sdk"
export ANDROID_SDK_ROOT="$HOME/Android/Sdk"
export PATH=$PATH:$ANDROID_SDK_ROOT/tools; PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools

Install Gradle 4.10.3

wget https://downloads.gradle-dn.com/distributions/gradle-4.10.3-all.zip
unzip gradle-4.10.3-all.zip
export PATH=$PATH:$PWD/gradle-4.10.3/bin/

Install Cordova:

sudo npm install -g cordova

Build (in the project directory): Change directory to src-cordova:

cd src-cordova

Add android platform:

cordova platform add android

Go back to schala-gui:

cd ../schala-gui

Run the quasar build command to generate cordova files:

quasar build -m android

Change directory to src-cordova:

cd src-cordova

Build using cordova:

cordova build android

Docker

You can build the docker image, by running the following:

sudo docker build --file=schala-gui/Dockerfile -t schala-gui .

And then run the build by:

sudo docker run -d \
-p 8000:80 \
--build-arg API_URL=backend-host \
--build-arg API_PORT=3000 \
schala-gui

Same goes for the backend (build):

sudo docker build --file=server/Dockerfile -t schala-server .

And then run the build by:

sudo docker run -d \
-p 3000:80 \
-e SCHALA_API_KEY=key \
-e NODE_PORT=80 \
schala-server

docker-compose

Or you can use docker-compose, with the provided docker-compose, for that create a copy of .env-example (.env), and set the environment variables:

cp .env-example .env

Start front- and back-end with:

sudo docker-compose --env-file .env -f docker-compose.yml up --build --detach

Stop front- and back-end with:

sudo docker-compose -f docker-compose.yml down

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •