Duke-MatSci / materialsmine

MaterialsMine App
6 stars 1 forks source link

materialsmine

MaterialsMine App

:high_brightness: Installation

Make sure to install docker on your machine first, then git clone the repo and run commands below to instantiate or terminate the application.

Windows OS:

:warning: ADVISORY :warning:

Before running the steps below, follow the steps here to retrieve and deploy required environment variables

IMPORTANT NOTICE: Install nvm. For windows PC click windows, for Mac brew install nvm

:high_brightness: Testing

To avoid testing failure, install nvm & copy the command below and run in the project root directory.

npm i && cd app && npm i && cd ../resfulservice && npm i && cd ..

:high_brightness: Starting All Application Services Options 1

Make sure nvm is installed with node >= v16.20.0 or run the command below to install the right node version:

 nvm install 16

Run the following command to start the applications from the root directory:

 npm run dev:start

:high_brightness: Starting All Application Services Options 2

Run the following command from the root directory:

docker-compose build

Note: The build might stall at first try. If this occurs, repeat the previous step.

To start all services after the first or initial build

docker-compose up

If you prefer to start all services after the first or initial build in detachable mode

docker-compose up -d

To shutdown/terminate all services & unmount volumes

docker-compose down -v

:high_brightness: Folder Structure

:house: Root Directory
:open_file_folder: app Frontend Application Link
:open_file_folder: nginx A proxy server Link
:open_file_folder: restfulservice Backend Server Application Link
:open_file_folder: services Managed Services WIP
:open_file_folder: whyis Whyis Application Link

:high_brightness: Access services via:

:high_brightness: Contributing to MaterialsMine:

  1. File a new issue by selecting from and filling out one of our issue templates.
  2. Make a new branch off of develop (unless working on an existing, in progress feature). This can be done directly from GitHub's issue page.

    General branch naming convention: #<issue number>_short_but_specific_title .

  3. Before committing, run the full test suite by running npm run test from the root materialsmine directory.

    If you are adding a new feature, please create a unit test for that feature, either by using Vue Test Utils in /app/tests/unit for frontend features, or using Chai in /resfulservice/spec for backend.

  4. Commit messages should follow Angular’s formatting guidelines, described here.
  5. Push your branch to GitHub with git push origin your_branch_name .
  6. In GitHub, send a pull request to develop. In your PR, describe your changes and use a keyword to link the related issue (e.g., closes #999, fixes #001).