diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..5d0edb36 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,29 @@ +{ + "image": "ghcr.io/juliushaertl/nextcloud-dev-php82:latest", + "forwardPorts": [80], + "containerEnv": { + "NEXTCLOUD_AUTOINSTALL_APPS": "health", + "XDEBUG_MODE": "debug" + }, + "customizations": { + "vscode": { + "extensions": [ + "felixfbecker.php-intellisense", + "octref.vetur" + ], + "settings": { + "php.suggest.basic": false, + "git.alwaysSignOff": true + } + } + }, + "workspaceMount": "source=${localWorkspaceFolder},target=/var/www/html/apps-extra/health,type=bind", + "workspaceFolder": "/var/www/html/apps-extra/health", + "overrideCommand": true, + "postAttachCommand": "bash ./.devcontainer/setup.sh", + "portsAttributes": { + "80": { + "label": "Webserver" + } + } +} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100644 index 00000000..23f43006 --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +( + cd /tmp && /usr/local/bin/bootstrap.sh apache2ctl start +) + +composer install --no-dev +npm ci +npm run dev diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 00000000..7192abe0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,37 @@ +name: Bug +description: Have you encountered a bug? Submit a report and help us improve Nextcloud health. +labels: ["bug", "0. Needs triage"] +body: + - type: textarea + id: reproduce + attributes: + label: Steps to reproduce + description: | + Describe the steps to reproduce the bug. + The better your description is _(go 'here', click 'there'...)_ the fastest you'll get an _(accurate)_ answer. + value: | + 1. + 2. + 3. + validations: + required: true + - type: textarea + id: expected-behavior + attributes: + label: Expected behavior + description: Tell us what should happen + - type: textarea + id: actual-behavior + attributes: + label: Actual behavior + description: Tell us what happens instead + - type: input + id: health-app-version + attributes: + label: Health app version + description: See apps admin page, e.g. 0.5.3 + - type: textarea + id: additional-info + attributes: + label: Additional info + description: Any additional information related to the issue (ex. screenshots, browser console errors, software versions, db backend, php version, ...). diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 00000000..71301ff5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,22 @@ +name: Feature request +description: You have a neat idea that should be implemented? +labels: ["enhancement", "0. Needs triage"] +body: + - type: textarea + id: description-problem + attributes: + label: Is your feature request related to a problem? Please describe. + description: | + A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + - type: textarea + id: description-solution + attributes: + label: Describe the solution you'd like + description: | + A clear and concise description of what you want to happen. + - type: textarea + id: additional-context + attributes: + label: Additional context + description: | + Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index b42b300f..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Build app on code push - -on: [push] - -env: - APP_NAME: health - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - path: ${{ env.APP_NAME }} - - name: Run build - run: cd ${{ env.APP_NAME }} && make appstore - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: release-bundle - path: ${{ env.APP_NAME }}/build/artifacts/appstore/health.tar.gz diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml deleted file mode 100644 index c5183cd1..00000000 --- a/.github/workflows/build_release.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Build and publish app release - -on: - release: - types: [published] - -env: - APP_NAME: health - -jobs: - build_and_publish: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - path: ${{ env.APP_NAME }} - - name: Run build - run: cd ${{ env.APP_NAME }} && make appstore - - name: Upload app tarball to release - uses: svenstaro/upload-release-action@v2 - id: attach_to_release - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ env.APP_NAME }}/build/artifacts/appstore/${{ env.APP_NAME }}.tar.gz - asset_name: ${{ env.APP_NAME }}.tar.gz - tag: ${{ github.ref }} - overwrite: true - - name: Upload app to Nextcloud appstore - uses: R0Wi/nextcloud-appstore-push-action@v1 - with: - app_name: ${{ env.APP_NAME }} - appstore_token: ${{ secrets.APPSTORE_TOKEN }} - download_url: ${{ steps.attach_to_release.outputs.browser_download_url }} - app_private_key: ${{ secrets.APP_PRIVATE_KEY }} - nightly: ${{ github.event.release.prerelease }} diff --git a/.gitignore b/.gitignore index 1a39154f..7b7822c9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ node_modules /.idea \.idea/ /js +/.php-cs-fixer.cache +/releaseNotes.md diff --git a/README.md b/README.md index cfe4e7cb..1faf9678 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,7 @@ -# Health -##### version 1.6.1 -### Track your health. Use the advantages of a trusted platform. +# Nextcloud Health +### Track your health privately. -The app provides different modules to track your health data. - -Following modules are served: +Track your health data within the following provided modules: - Weight - Feeling - Measurement @@ -12,3 +9,94 @@ Following modules are served: - Smoking - Activities - Medication + +![Health - Track your personal health data privately.](https://raw.githubusercontent.com/nextcloud/health/main/screenshots/health-weight.png "Track weight") + +## Issues +### Security +If you found a security related issue, please don't create an issue on github. But please write me an mail at dev@d10t.de. That way we can take this into account without telling an attacker where to look for. + +### Bugs +You found a bug? Great, please create here an issue for it: [https://github.com/nextcloud/health/issues/new?assignees=&labels=bug%2C0.+Needs+triage&projects=&template=bug-report.yml](https://github.com/nextcloud/health/issues/new?assignees=&labels=bug%2C0.+Needs+triage&projects=&template=bug-report.yml) +If you don't have a Github account feeld free to send me an mail to dev@d10t.de. + +### Feature requests +Feels free to create issues for feature requests. But first have a look if there is already a issue for it by searching for this. Second, this is a more or less free time project. So don't expect that we will implement this by time or at all. +https://github.com/nextcloud/health/issues/new?assignees=&labels=enhancement%2C0.+Needs+triage&projects=&template=feature-request.yml + +## Installation/Update +The app can be installed through the app store within Nextcloud. You can also download the latest release from the [release page](https://github.com/nextcloud/health/releases). + +## Developing + +There are multiple ways to develop on Deck. As you will need a Nextcloud server running, the individual options are described below. + +### General build instructions + +General build instructions for the app itself are the same for all options. + +To build you will need to have [Node.js](https://nodejs.org/en/) and [Composer](https://getcomposer.org/) installed. + +- Install PHP dependencies: `composer install --no-dev` +- Install JS dependencies: `npm ci` +- Build JavaScript for the frontend + - Development build `npm run dev` + - Watch for changes `npm run watch` + - Production build `npm run build` + +### GitHub Codespaces / VS Code devcontainer + +- Open code spaces or the repository in VS Code to start the dev container +- The container will automatically install all dependencies and build the app +- Nextcloud will be installed from the master development branch and be available on a port exposed by the container + +### Running tests +You can use the provided Makefile to run all tests by using: + + make test + +### Documentation + +The documentation for our REST API can be found at [https://github.com/nextcloud/health/wiki/API](https://github.com/nextcloud/health/wiki/API) + +## Contribution Guidelines + +Please read the [Code of Conduct](https://nextcloud.com/community/code-of-conduct/). This document offers some guidance to ensure Nextcloud participants can cooperate effectively in a positive and inspiring atmosphere, and to explain how together we can strengthen and support each other. + +For more information please review the [guidelines for contributing](https://github.com/nextcloud/server/blob/master/.github/CONTRIBUTING.md) to this repository. + +### Apply a license + +All contributions to this repository are considered to be licensed under +the GNU AGPLv3 or any later version. + +Contributors to the Deck app retain their copyright. Therefore we recommend +to add following line to the header of a file, if you changed it substantially: + +``` +@copyright Copyright (c) , () +``` + +For further information on how to add or update the license header correctly please have a look at [our licensing HowTo][applyalicense]. + +### Sign your work + +We use the Developer Certificate of Origin (DCO) as a additional safeguard +for the Nextcloud project. This is a well established and widely used +mechanism to assure contributors have confirmed their right to license +their contribution under the project's license. +Please read [developer-certificate-of-origin][dcofile]. +If you can certify it, then just add a line to every git commit message: + +```` + Signed-off-by: Random J Developer +```` + +Use your real name (sorry, no pseudonyms or anonymous contributions). +If you set your `user.name` and `user.email` git configs, you can sign your +commit automatically with `git commit -s`. You can also use git [aliases](https://git-scm.com/book/tr/v2/Git-Basics-Git-Aliases) +like `git config --global alias.ci 'commit -s'`. Now you can commit with +`git ci` and the commit will be signed. + +[dcofile]: https://github.com/nextcloud/server/blob/master/contribute/developer-certificate-of-origin +[applyalicense]: https://github.com/nextcloud/server/blob/master/contribute/HowToApplyALicense.md diff --git a/appinfo/info.xml b/appinfo/info.xml index 5eb3bc65..e7882832 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -16,12 +16,17 @@ Health is everything.]]> 1.6.3 agpl - Florian Steffens - Health + Florian Steffens + Health + + https://github.com/nextcloud/health/wiki + https://github.com/nextcloud/health/wiki/API + tools organization - https://github.com/datenangebot/health - https://github.com/datenangebot/health/issues + https://github.com/nextcloud/health + https://github.com/nextcloud/health/issues/new + https://github.com/nextcloud/health.git https://raw.githubusercontent.com/nextcloud/health/main/screenshots/health-start.png https://raw.githubusercontent.com/nextcloud/health/main/screenshots/health-person-start.png https://raw.githubusercontent.com/nextcloud/health/main/screenshots/health-weight.png diff --git a/composer.json b/composer.json index 9c15a8f4..7f027175 100644 --- a/composer.json +++ b/composer.json @@ -1,12 +1,12 @@ { - "name": "datenangebot/health", - "description": "Lint config for datenangebot/health", + "name": "nextcloud/health", + "description": "Lint config for nextcloud/health", "type": "project", "license": "AGPL", "authors": [ { "name": "Florian Steffens", - "email": "flost-dev@mailbox.org" + "email": "dev@d10t.de" } ], "config": { diff --git a/package.json b/package.json index cb7252ea..ffd788ce 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,9 @@ "name": "health", "description": "Nextcloud health app", "version": "1.6.3", - "author": "Florian Steffens ", + "author": "Florian Steffens ", "contributors": [ - "Florian Steffens " + "Florian Steffens " ], "keywords": [ "nextcloud", @@ -12,13 +12,13 @@ "app" ], "bugs": { - "url": "https://github.com/datenangebot/health/issues" + "url": "https://github.com/nextcloud/health/issues/new?assignees=&labels=bug%2C0.+Needs+triage&projects=&template=bug-report.yml" }, "repository": { - "url": "https://github.com/datenangebot/health", + "url": "https://github.com/nextcloud/health", "type": "git" }, - "homepage": "https://github.com/datenangebot/health", + "homepage": "https://github.com/nextcloud/health", "license": "agpl", "private": true, "scripts": {