Skip to content

Duke-MatSci/materialsmine

Repository files navigation

materialsmine

MaterialsMine App

🔆 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:

  • Be sure to run the Docker installer as an administrator
  • If the Docker engine fails to start, install the latest WSL2 Linux kernel update package by following Step 4 here

⚠️ ADVISORY ⚠️

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

🔆 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 ..

🔆 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

🔆 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

🔆 Folder Structure

🏠 Root Directory
📂 app Frontend Application Link
📂 nginx A proxy server Link
📂 restfulservice Backend Server Application Link
📂 services Managed Services WIP
📂 whyis Whyis Application Link

🔆 Access services via:

🔆 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).