- 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
- 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
- To work on a feature:
- pull from origin/develop (git pull origin develop)
- create/switch to the feature branch (git checkout -b [feature_name])
- commit/push into the feature branch (git add [files] ; git commit ; git push -u origin [feature_name])
- repeat step.3 until you are done working on the feature
- create a pull request
- make sure your PR passes CI
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
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
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'
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
To build the project (SPA):
make build_spa
To build the project (electron):
make build_electron
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
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
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