├── requirements.txt ├── ex_app ├── js │ ├── flow-main.js.map.license │ └── flow-main.js.license ├── img │ ├── app-dark.svg │ └── app.svg ├── src │ ├── constants │ │ └── AppAPI.js │ ├── main.js │ ├── App.vue │ ├── bootstrap.js │ └── views │ │ └── IframeView.vue └── lib │ └── main.py ├── screenshots ├── flow_1.png ├── flow_2.png ├── flow_3.png ├── flow_1.png.license ├── flow_2.png.license └── flow_3.png.license ├── krankerl.toml ├── babel.config.js ├── stylelint.config.js ├── ex_app_scripts ├── install_pgsql.sh ├── set_workers_num.sh ├── init_pgsql.sh ├── common_pgsql.sh └── entrypoint.sh ├── .github ├── CODE_OF_CONDUCT.md ├── dependabot.yml └── workflows │ ├── reuse.yml │ ├── analysis-coverage.yml │ ├── publish-docker.yml │ └── appstore-build-publish.yml ├── .eslintrc.js ├── REUSE.toml ├── LICENSES ├── ISC.txt ├── MIT.txt ├── BSD-2-Clause.txt ├── BSD-3-Clause.txt ├── CC0-1.0.txt ├── Apache-2.0.txt ├── AGPL-3.0-or-later.txt └── GPL-3.0-or-later.txt ├── .nextcloudignore ├── CODE_OF_CONDUCT.md ├── .pre-commit-config.yaml ├── pyproject.toml ├── .gitignore ├── webpack.config.js ├── CHANGELOG.md ├── package.json ├── Makefile ├── appinfo └── info.xml ├── README.md └── Dockerfile /requirements.txt: -------------------------------------------------------------------------------- 1 | nc_py_api[app]==0.20.2 2 | -------------------------------------------------------------------------------- /ex_app/js/flow-main.js.map.license: -------------------------------------------------------------------------------- 1 | flow-main.js.license -------------------------------------------------------------------------------- /screenshots/flow_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextcloud/flow/HEAD/screenshots/flow_1.png -------------------------------------------------------------------------------- /screenshots/flow_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextcloud/flow/HEAD/screenshots/flow_2.png -------------------------------------------------------------------------------- /screenshots/flow_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextcloud/flow/HEAD/screenshots/flow_3.png -------------------------------------------------------------------------------- /screenshots/flow_1.png.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 2 | SPDX-License-Identifier: MIT 3 | -------------------------------------------------------------------------------- /screenshots/flow_2.png.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 2 | SPDX-License-Identifier: MIT 3 | -------------------------------------------------------------------------------- /screenshots/flow_3.png.license: -------------------------------------------------------------------------------- 1 | SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 2 | SPDX-License-Identifier: MIT 3 | -------------------------------------------------------------------------------- /krankerl.toml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 2 | # SPDX-License-Identifier: MIT 3 | [package] 4 | before_cmds = [] 5 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 3 | * SPDX-License-Identifier: MIT 4 | */ 5 | 6 | const babelConfig = require('@nextcloud/babel-config') 7 | 8 | module.exports = babelConfig 9 | -------------------------------------------------------------------------------- /stylelint.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 3 | * SPDX-License-Identifier: MIT 4 | */ 5 | 6 | const stylelintConfig = require('@nextcloud/stylelint-config') 7 | 8 | module.exports = stylelintConfig 9 | -------------------------------------------------------------------------------- /ex_app_scripts/install_pgsql.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | source /ex_app_scripts/common_pgsql.sh 6 | 7 | ensure_postgres_installed 8 | init_and_start_postgres 9 | -------------------------------------------------------------------------------- /ex_app/img/app-dark.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ex_app/img/app.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ex_app/src/constants/AppAPI.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 3 | * SPDX-License-Identifier: MIT 4 | */ 5 | 6 | export const EX_APP_ID = 'flow' 7 | export const EX_APP_MENU_ENTRY_NAME = 'flow' 8 | export const APP_API_PROXY_URL_PREFIX = '/apps/app_api/proxy' 9 | export const APP_API_ROUTER_BASE = '/apps/app_api/embedded' 10 | -------------------------------------------------------------------------------- /ex_app/src/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 3 | * SPDX-License-Identifier: MIT 4 | */ 5 | 6 | import './bootstrap.js' 7 | import Vue from 'vue' 8 | import App from './App.vue' 9 | import { Tooltip } from '@nextcloud/vue' 10 | 11 | Vue.directive('tooltip', Tooltip) 12 | 13 | export default new Vue({ 14 | el: '#content', 15 | render: h => h(App), 16 | }) 17 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | 5 | # Code of Conduct 6 | 7 | Be openness, as well as friendly and didactic in discussions. 8 | 9 | Treat everybody equally, and value their contributions. 10 | 11 | Decisions are made based on technical merit and consensus. 12 | 13 | Try to follow most principles described here: https://nextcloud.com/code-of-conduct/ 14 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 3 | * SPDX-License-Identifier: MIT 4 | */ 5 | 6 | module.exports = { 7 | globals: { 8 | appVersion: true 9 | }, 10 | parserOptions: { 11 | requireConfigFile: false 12 | }, 13 | extends: [ 14 | '@nextcloud' 15 | ], 16 | rules: { 17 | 'jsdoc/require-jsdoc': 'off', 18 | 'jsdoc/tag-lines': 'off', 19 | 'vue/first-attribute-linebreak': 'off', 20 | 'import/extensions': 'off' 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ex_app_scripts/set_workers_num.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | if [ -z "$NUM_WORKERS" ]; then 6 | NUM_WORKERS=$(nproc) 7 | NUM_WORKERS=$((NUM_WORKERS * 2)) 8 | 9 | # Check if NUM_WORKERS is already in /etc/environment, if not, add it 10 | if ! grep -q "^export NUM_WORKERS=" /etc/environment; then 11 | echo "export NUM_WORKERS=\"$NUM_WORKERS\"" >> /etc/environment 12 | fi 13 | 14 | echo "NUM_WORKERS was not set. It is now set to: $NUM_WORKERS" 15 | else 16 | echo "NUM_WORKERS is already set to: $NUM_WORKERS" 17 | fi 18 | -------------------------------------------------------------------------------- /ex_app/src/App.vue: -------------------------------------------------------------------------------- 1 | 5 | 12 | 13 | 27 | -------------------------------------------------------------------------------- /ex_app/src/bootstrap.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 3 | * SPDX-License-Identifier: MIT 4 | */ 5 | 6 | import Vue from 'vue' 7 | import { translate, translatePlural } from '@nextcloud/l10n' 8 | import { generateUrl } from '@nextcloud/router' 9 | import { APP_API_PROXY_URL_PREFIX, EX_APP_ID } from './constants/AppAPI.js' 10 | import { getCSPNonce } from '@nextcloud/auth' 11 | 12 | Vue.prototype.t = translate 13 | Vue.prototype.n = translatePlural 14 | Vue.prototype.OC = window.OC 15 | Vue.prototype.OCA = window.OCA 16 | 17 | __webpack_public_path__ = generateUrl(`${APP_API_PROXY_URL_PREFIX}/${EX_APP_ID}/js/`) // eslint-disable-line 18 | __webpack_nonce__ = getCSPNonce() // eslint-disable-line 19 | -------------------------------------------------------------------------------- /REUSE.toml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 2 | # SPDX-License-Identifier: MIT 3 | version = 1 4 | SPDX-PackageName = "flow" 5 | SPDX-PackageSupplier = "Nextcloud " 6 | SPDX-PackageDownloadLocation = "https://github.com/nextcloud/flow" 7 | 8 | [[annotations]] 9 | path = [".github/renovate.json", ".run/NC 30.run.xml", "package-lock.json", "package.json", "requirements.txt"] 10 | precedence = "aggregate" 11 | SPDX-FileCopyrightText = "2024 Nextcloud GmbH and Nextcloud contributors" 12 | SPDX-License-Identifier = "AGPL-3.0-or-later" 13 | 14 | [[annotations]] 15 | path = ["ex_app/img/app-dark.svg", "ex_app/img/app.svg"] 16 | precedence = "aggregate" 17 | SPDX-FileCopyrightText = "2018-2024 Google LLC" 18 | SPDX-License-Identifier = "Apache-2.0" 19 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot 5 | # 6 | # SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors 7 | # SPDX-License-Identifier: CC0-1.0 8 | 9 | version: 2 10 | updates: 11 | - package-ecosystem: "github-actions" 12 | directory: ".github/workflows" 13 | schedule: 14 | interval: weekly 15 | day: saturday 16 | time: "03:00" 17 | timezone: Europe/Berlin 18 | open-pull-requests-limit: 10 19 | -------------------------------------------------------------------------------- /LICENSES/ISC.txt: -------------------------------------------------------------------------------- 1 | ISC License: 2 | 3 | Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC") 4 | Copyright (c) 1995-2003 by Internet Software Consortium 5 | 6 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 9 | -------------------------------------------------------------------------------- /.github/workflows/reuse.yml: -------------------------------------------------------------------------------- 1 | # This workflow is provided via the organization template repository 2 | # 3 | # https://github.com/nextcloud/.github 4 | # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization 5 | 6 | # SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. 7 | # 8 | # SPDX-License-Identifier: CC0-1.0 9 | 10 | name: REUSE Compliance Check 11 | 12 | on: [pull_request] 13 | 14 | jobs: 15 | reuse-compliance-check: 16 | runs-on: ubuntu-latest 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 20 | with: 21 | persist-credentials: false 22 | 23 | - name: REUSE Compliance Check 24 | uses: fsfe/reuse-action@bb774aa972c2a89ff34781233d275075cbddf542 # v5.0.0 25 | -------------------------------------------------------------------------------- /.nextcloudignore: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 2 | # SPDX-License-Identifier: MIT 3 | .git 4 | .github 5 | .gitignore 6 | .tx 7 | .vscode 8 | .php-cs-fixer.* 9 | /.codecov.yml 10 | /.eslintrc.js 11 | /.gitattributes 12 | /.gitignore 13 | /.l10nignore 14 | /.nextcloudignore 15 | /.travis.yml 16 | /.pre-commit-config.yaml 17 | /.run 18 | /babel.config.js 19 | /build 20 | /APPS.md 21 | /HOW_TO_INSTALL.md 22 | /README.md 23 | /composer.* 24 | /node_modules 25 | /screenshots 26 | /examples 27 | /docs 28 | /src 29 | /vendor/bin 30 | /jest.config.js 31 | /Makefile 32 | /krankerl.toml 33 | /package-lock.json 34 | /package.json 35 | /postcss.config.js 36 | /psalm.xml 37 | /pyproject.toml 38 | /renovate.json 39 | /stylelint.config.js 40 | /webpack.* 41 | /requirements.txt 42 | /Dockerfile 43 | /results 44 | /ex_app/js 45 | /ex_app/lib 46 | /ex_app/src 47 | /ex_app_scripts 48 | /translationtool.phar 49 | tests 50 | -------------------------------------------------------------------------------- /.github/workflows/analysis-coverage.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 2 | # SPDX-License-Identifier: MIT 3 | name: Analysis & Coverage 4 | 5 | on: 6 | pull_request: 7 | push: 8 | branches: [main] 9 | 10 | permissions: 11 | contents: read 12 | 13 | concurrency: 14 | group: ana_cov-${{ github.head_ref || github.run_id }} 15 | cancel-in-progress: true 16 | 17 | jobs: 18 | analysis: 19 | runs-on: ubuntu-22.04 20 | name: Analysis 21 | 22 | steps: 23 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 24 | - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 25 | with: 26 | python-version: "3.10" 27 | 28 | - name: Install from source 29 | run: | 30 | python3 -m pip install -r requirements.txt 31 | 32 | - name: Run Analysis 33 | run: | 34 | python3 -m pip install pylint 35 | python3 -m pylint --recursive=y "ex_app/lib/" 36 | -------------------------------------------------------------------------------- /LICENSES/MIT.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | 5 | In the Nextcloud community, participants from all over the world come together to create Free Software for a free internet. This is made possible by the support, hard work and enthusiasm of thousands of people, including those who create and use Nextcloud software. 6 | 7 | Our code of conduct 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. 8 | 9 | The Code of Conduct is shared by all contributors and users who engage with the Nextcloud team and its community services. It presents a summary of the shared values and “common sense” thinking in our community. 10 | 11 | You can find our full code of conduct on our website: https://nextcloud.com/code-of-conduct/ 12 | 13 | Please, keep our CoC in mind when you contribute! That way, everyone can be a part of our community in a productive, positive, creative and fun way. 14 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 2 | # SPDX-License-Identifier: MIT 3 | ci: 4 | skip: [pylint] 5 | 6 | exclude: '^ex_app/(img|js)/|.*\.phar' 7 | repos: 8 | - repo: https://github.com/pre-commit/pre-commit-hooks 9 | rev: v5.0.0 10 | hooks: 11 | - id: check-yaml 12 | - id: end-of-file-fixer 13 | - id: trailing-whitespace 14 | - id: mixed-line-ending 15 | 16 | - repo: https://github.com/PyCQA/isort 17 | rev: 6.0.1 18 | hooks: 19 | - id: isort 20 | files: ex_app/lib/ 21 | 22 | - repo: https://github.com/psf/black 23 | rev: 25.1.0 24 | hooks: 25 | - id: black 26 | files: ex_app/lib/ 27 | 28 | - repo: https://github.com/astral-sh/ruff-pre-commit 29 | rev: v0.12.4 30 | hooks: 31 | - id: ruff 32 | 33 | - repo: local 34 | hooks: 35 | - id: pylint 36 | name: pylint 37 | entry: pylint --recursive=y "ex_app/lib/" 38 | language: system 39 | types: [ python ] 40 | pass_filenames: false 41 | args: 42 | [ 43 | "-rn", # Only display messages 44 | "-sn", # Don't display the score 45 | ] 46 | -------------------------------------------------------------------------------- /LICENSES/BSD-2-Clause.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2 | 3 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 4 | 5 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 6 | 7 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | 9 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 2 | # SPDX-License-Identifier: MIT 3 | [tool.black] 4 | line-length = 120 5 | target-versions = ["py310"] 6 | preview = true 7 | 8 | [tool.ruff] 9 | line-length = 120 10 | target-version = "py310" 11 | lint.select = ["A", "B", "C", "D", "E", "F", "G", "I", "S", "SIM", "PIE", "Q", "RET", "RUF", "UP" , "W"] 12 | lint.extend-ignore = ["D101", "D102", "D103", "D105", "D107", "D203", "D213", "D401", "I001", "RUF100", "D400", "D415", "S105"] 13 | 14 | [tool.isort] 15 | profile = "black" 16 | 17 | [tool.pylint] 18 | master.py-version = "3.10" 19 | master.extension-pkg-allow-list = ["pydantic"] 20 | design.max-attributes = 8 21 | design.max-locals = 16 22 | design.max-branches = 16 23 | design.max-returns = 8 24 | design.max-args = 7 25 | basic.good-names = [ 26 | "a", "b", "c", "d", "e", "f", "i", "j", "k", "r", "v", 27 | "ex", "_", "fp", "im", "nc", "ui", 28 | ] 29 | reports.output-format = "colorized" 30 | similarities.ignore-imports = "yes" 31 | similarities.min-similarity-lines = 6 32 | messages_control.disable = [ 33 | "missing-class-docstring", 34 | "missing-function-docstring", 35 | "line-too-long", 36 | "too-few-public-methods", 37 | "too-many-public-methods", 38 | "global-statement", 39 | "broad-exception-caught", 40 | "cell-var-from-loop", 41 | "protected-access", 42 | ] 43 | -------------------------------------------------------------------------------- /LICENSES/BSD-3-Clause.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) . 2 | 3 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 4 | 5 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 6 | 7 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | 9 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 2 | # SPDX-License-Identifier: MIT 3 | .DS_Store 4 | node_modules/ 5 | npm-debug.log* 6 | yarn-debug.log* 7 | yarn-error.log* 8 | 9 | # Editor directories and files 10 | .idea 11 | .vscode 12 | *.suo 13 | *.ntvs* 14 | *.njsproj 15 | *.sln 16 | 17 | .marginalia 18 | 19 | build/ 20 | coverage/ 21 | vendor 22 | .php-cs-fixer.cache 23 | .phpunit.result.cache 24 | 25 | /out 26 | /dev/ 27 | local 28 | tmp 29 | .phpdoc 30 | clover.unit.xml 31 | clover.integration.xml 32 | proto/thrift/gen-* 33 | 34 | # Python Part 35 | 36 | # Byte-compiled / optimized / DLL files 37 | __pycache__/ 38 | *.py[cod] 39 | *$py.class 40 | 41 | # Pycharm settings 42 | .idea/ 43 | 44 | # mypy 45 | .mypy_cache/ 46 | .dmypy.json 47 | dmypy.json 48 | 49 | # Pyre type checker 50 | .pyre/ 51 | 52 | # pytype static type analyzer 53 | .pytype/ 54 | 55 | # Environments 56 | .env 57 | .venv 58 | env/ 59 | venv/ 60 | ENV/ 61 | env.bak/ 62 | venv.bak/ 63 | 64 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 65 | __pypackages__/ 66 | 67 | # Scrapy stuff: 68 | .scrapy 69 | 70 | # Sphinx documentation 71 | docs/_build/ 72 | 73 | # PyBuilder 74 | .pybuilder/ 75 | target/ 76 | 77 | # Distribution / packaging 78 | .Python 79 | develop-eggs/ 80 | dist/ 81 | downloads/ 82 | eggs/ 83 | .eggs/ 84 | lib64/ 85 | parts/ 86 | sdist/ 87 | var/ 88 | wheels/ 89 | share/python-wheels/ 90 | *.egg-info/ 91 | .installed.cfg 92 | *.egg 93 | MANIFEST 94 | converted/ 95 | 96 | geckodriver.log 97 | /windmill_tmp/ 98 | /windmill_src/ 99 | /windmill_selfhosted/ 100 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 3 | * SPDX-License-Identifier: MIT 4 | */ 5 | 6 | const path = require('path') 7 | const webpackConfig = require('@nextcloud/webpack-vue-config') 8 | const webpackRules = require('@nextcloud/webpack-vue-config/rules') 9 | const ESLintPlugin = require('eslint-webpack-plugin') 10 | const StyleLintPlugin = require('stylelint-webpack-plugin') 11 | 12 | const buildMode = process.env.NODE_ENV 13 | const isDev = buildMode === 'development' 14 | webpackConfig.devtool = isDev ? 'cheap-source-map' : 'source-map' 15 | 16 | webpackConfig.stats = { 17 | colors: true, 18 | modules: false, 19 | } 20 | 21 | const appId = 'flow' 22 | 23 | webpackConfig.entry = { 24 | main: { import: path.join(__dirname, 'ex_app', 'src', 'main.js'), filename: appId + '-main.js' }, 25 | } 26 | 27 | webpackConfig.module.rules = Object.values(webpackRules) 28 | 29 | webpackConfig.plugins.push( 30 | new ESLintPlugin({ 31 | extensions: ['js', 'vue'], 32 | files: 'ex_app/src', 33 | failOnError: !isDev, 34 | }) 35 | ) 36 | 37 | webpackConfig.plugins.push( 38 | new StyleLintPlugin({ 39 | files: 'ex_app/src/**/*.{css,scss,vue}', 40 | failOnError: !isDev, 41 | }), 42 | ) 43 | 44 | webpackConfig.output = { 45 | path: path.resolve(__dirname, 'ex_app/js'), 46 | } 47 | 48 | // Generate reuse license files if not in development mode 49 | if (!isDev) { 50 | const WebpackSPDXPlugin = require('./build-js/WebpackSPDXPlugin.js') 51 | webpackConfig.plugins.push(new WebpackSPDXPlugin({ 52 | override: { 53 | select2: 'MIT', 54 | }, 55 | })) 56 | 57 | webpackConfig.optimization.minimizer = [{ 58 | apply: (compiler) => { 59 | // Lazy load the Terser plugin 60 | const TerserPlugin = require('terser-webpack-plugin') 61 | new TerserPlugin({ 62 | extractComments: false, 63 | terserOptions: { 64 | format: { 65 | comments: false, 66 | }, 67 | compress: { 68 | passes: 2, 69 | }, 70 | }, 71 | }).apply(compiler) 72 | }, 73 | }] 74 | } 75 | 76 | module.exports = webpackConfig 77 | -------------------------------------------------------------------------------- /ex_app_scripts/init_pgsql.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors 3 | # SPDX-License-Identifier: MIT 4 | 5 | # Environment variables 6 | DB_NAME=${APP_ID:-windmill} 7 | DB_USER=${APP_ID:-windmilluser} 8 | DB_PASS=${APP_ID:-windmillpass} 9 | 10 | # Check if EXTERNAL_DATABASE is set 11 | if [ -n "${EXTERNAL_DATABASE}" ]; then 12 | DATABASE_URL="${EXTERNAL_DATABASE}" 13 | echo "Using external database. DATABASE_URL is set to: $DATABASE_URL" 14 | 15 | # Check if DATABASE_URL is already in /etc/environment, if not, add it 16 | if ! grep -q "^export DATABASE_URL=" /etc/environment; then 17 | echo "export DATABASE_URL=\"$EXTERNAL_DATABASE\"" >> /etc/environment 18 | fi 19 | 20 | # Reload environment variables 21 | . /etc/environment 22 | exit 0 23 | fi 24 | 25 | source /ex_app_scripts/common_pgsql.sh 26 | 27 | ensure_postgres_installed 28 | init_and_start_postgres 29 | 30 | # Check if the user exists and create if not 31 | sudo -u postgres $PG_SQL -c "SELECT 1 FROM pg_user WHERE usename = '$DB_USER'" | grep -q 1 || \ 32 | sudo -u postgres $PG_SQL -c "CREATE USER $DB_USER WITH PASSWORD '$DB_PASS';" && \ 33 | sudo -u postgres $PG_SQL -c "ALTER USER $DB_USER WITH SUPERUSER;" 34 | 35 | # Check if the database exists and create if not 36 | sudo -u postgres $PG_SQL -c "SELECT 1 FROM pg_database WHERE datname = '$DB_NAME'" | grep -q 1 || \ 37 | sudo -u postgres $PG_SQL -c "CREATE DATABASE $DB_NAME OWNER $DB_USER;" 38 | 39 | if [ -z "${DATABASE_URL}" ]; then 40 | # Set DATABASE_URL environment variable 41 | DATABASE_URL="postgresql://$DB_USER:$DB_PASS@%2Fvar%2Frun%2Fpostgresql/$DB_NAME?sslmode=disable" 42 | 43 | # Check if DATABASE_URL is already in /etc/environment, if not, add it 44 | if ! grep -q "^export DATABASE_URL=" /etc/environment; then 45 | echo "export DATABASE_URL=\"postgresql://$DB_USER:$DB_PASS@%2Fvar%2Frun%2Fpostgresql/$DB_NAME?sslmode=disable\"" >> /etc/environment 46 | fi 47 | 48 | echo "DATABASE_URL was not set. It is now set to: $DATABASE_URL" 49 | else 50 | echo "DATABASE_URL is already set to: $DATABASE_URL" 51 | fi 52 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 5 | # Change Log 6 | 7 | All notable changes to this project will be documented in this file. 8 | 9 | The format is based on [Keep a Changelog](http://keepachangelog.com/) 10 | and this project adheres to [Semantic Versioning](http://semver.org/). 11 | 12 | ## [1.2.2 - 2025-12-07] 13 | 14 | ### Added 15 | 16 | - Nextcloud 33 support. 17 | 18 | ## [1.2.0 - 2025-05-20] 19 | 20 | ### Added 21 | 22 | - Nextcloud 32 HaRP support. #48 23 | - Ability to specify Windmill worker count during deploying. #54 24 | - Ability to specify Windmill log level during deploying. #55 25 | - Automatic configure Windmill instance URL in Settings. #56 26 | 27 | ### Fixed 28 | 29 | - The app now should now additionally show up in the Flow category in the AppStore. #52 30 | - New installations will use bundled PgSQL over socket for easier deployment with `network=host`. #53 31 | 32 | ## [1.1.0 - 2025-01-14] 33 | 34 | ### Added 35 | 36 | - Initialization of the `baseUrl` value in the Nextcloud Auth resource. #35 37 | - Synchronization of `AA_VERSION` and `APP_VERSION` values in the Nextcloud Auth resource. #32 38 | 39 | ### Changed 40 | 41 | - Python version updated from `3.10` to `3.12`. #33 42 | 43 | ### Fixed 44 | 45 | - The PgSQL database now comes preinstalled in the Docker image instead of being installed during ExApp startup. #30 46 | 47 | ## [1.0.1 - 2024-10-10] 48 | 49 | ### Added 50 | 51 | - More logging for faster problem diagnosis. [commit](https://github.com/nextcloud/flow/commit/e52c501144761e73b81b156423af034c191797aa) 52 | 53 | ### Fixed 54 | 55 | - Warning "sudo: unable to resolve host" during container startup. #11 56 | - Incorrect handling Windmill scripts with no modules in it. [commit](https://github.com/nextcloud/flow/commit/c8bf8309e85b14c2b36913469a38291f2c480b53) 57 | - Unregister webhooks from the Nextcloud instance during ExApp disabling. #10 58 | - Error when username(userid) contained a space. #13 59 | - Updated NPM packages. #12 60 | 61 | ## [1.0.0 - 2024-09-13] 62 | 63 | ### Added 64 | 65 | - First release 66 | -------------------------------------------------------------------------------- /ex_app/src/views/IframeView.vue: -------------------------------------------------------------------------------- 1 | 5 |