musarehmani100 commited on
Commit
3206347
1 Parent(s): d4fc03a

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .devcontainer/Dockerfile +1 -0
  2. .devcontainer/boot.sh +44 -0
  3. .devcontainer/devcontainer.json +53 -0
  4. .devcontainer/docker-compose.yml +63 -0
  5. .dockerignore +12 -0
  6. .github/workflows/backend.yml +48 -0
  7. .github/workflows/ci.yml +85 -0
  8. .github/workflows/docs-change.yml +32 -0
  9. .github/workflows/playwright.yml +122 -0
  10. .gitignore +130 -0
  11. .node-version +1 -0
  12. .nvmrc +1 -0
  13. .prettierrc.js +3 -0
  14. .vscode/launch.json +12 -0
  15. .vscode/settings.json +7 -0
  16. .yarnrc +1 -0
  17. CODE_OF_CONDUCT.md +76 -0
  18. CONTRIBUTOR_LICENSE_AGREEMENT.md +5 -0
  19. LICENSE +3 -0
  20. LICENSE.agpl +661 -0
  21. LICENSE.enterprise +35 -0
  22. README.md +61 -0
  23. docker-compose.yml +70 -0
  24. docker/Dockerfile +25 -0
  25. docker/Dockerfile.compose +11 -0
  26. docker/compose-entrypoint.sh +26 -0
  27. docker/entrypoint.sh +13 -0
  28. lerna.json +13 -0
  29. package.json +32 -0
  30. packages/backend/.env-example +22 -0
  31. packages/backend/.env-example.test +15 -0
  32. packages/backend/.eslintignore +14 -0
  33. packages/backend/.eslintrc.json +12 -0
  34. packages/backend/README.md +4 -0
  35. packages/backend/bin/database/client.js +9 -0
  36. packages/backend/bin/database/convert-migrations.js +31 -0
  37. packages/backend/bin/database/create.js +3 -0
  38. packages/backend/bin/database/drop.js +3 -0
  39. packages/backend/bin/database/seed-user.js +3 -0
  40. packages/backend/bin/database/utils.js +145 -0
  41. packages/backend/knexfile.js +33 -0
  42. packages/backend/package.json +107 -0
  43. packages/backend/src/app.js +70 -0
  44. packages/backend/src/apps/airtable/actions/create-record/index.js +92 -0
  45. packages/backend/src/apps/airtable/actions/find-record/index.js +174 -0
  46. packages/backend/src/apps/airtable/actions/index.js +4 -0
  47. packages/backend/src/apps/airtable/assets/favicon.svg +9 -0
  48. packages/backend/src/apps/airtable/auth/generate-auth-url.js +38 -0
  49. packages/backend/src/apps/airtable/auth/index.js +48 -0
  50. packages/backend/src/apps/airtable/auth/is-still-verified.js +8 -0
.devcontainer/Dockerfile ADDED
@@ -0,0 +1 @@
 
 
1
+ FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu-22.04
.devcontainer/boot.sh ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ CURRENT_DIR="$(pwd)"
4
+ BACKEND_PORT=3000
5
+ WEB_PORT=3001
6
+
7
+ echo "Configuring backend environment variables..."
8
+ cd packages/backend
9
+ rm -rf .env
10
+ echo "
11
+ PORT=$BACKEND_PORT
12
+ WEB_APP_URL=http://localhost:$WEB_PORT
13
+ APP_ENV=development
14
+ POSTGRES_DATABASE=automatisch
15
+ POSTGRES_PORT=5432
16
+ POSTGRES_HOST=postgres
17
+ POSTGRES_USERNAME=automatisch_user
18
+ POSTGRES_PASSWORD=automatisch_password
19
+ ENCRYPTION_KEY=sample_encryption_key
20
+ WEBHOOK_SECRET_KEY=sample_webhook_secret_key
21
+ APP_SECRET_KEY=sample_app_secret_key
22
+ REDIS_HOST=redis
23
+ SERVE_WEB_APP_SEPARATELY=true" >> .env
24
+ cd $CURRENT_DIR
25
+
26
+ echo "Configuring web environment variables..."
27
+ cd packages/web
28
+ rm -rf .env
29
+ echo "
30
+ PORT=$WEB_PORT
31
+ REACT_APP_BACKEND_URL=http://localhost:$BACKEND_PORT
32
+ " >> .env
33
+ cd $CURRENT_DIR
34
+
35
+ echo "Installing and linking dependencies..."
36
+ yarn
37
+ yarn lerna bootstrap
38
+
39
+ echo "Migrating database..."
40
+ cd packages/backend
41
+ yarn db:migrate
42
+ yarn db:seed:user
43
+
44
+ echo "Done!"
.devcontainer/devcontainer.json ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "Automatisch",
3
+ "dockerComposeFile": "docker-compose.yml",
4
+ "service": "app",
5
+ "workspaceFolder": "/workspace",
6
+ "features": {
7
+ "ghcr.io/devcontainers/features/git:1": {
8
+ "version": "latest"
9
+ },
10
+ "ghcr.io/devcontainers/features/node:1": {
11
+ "version": 18
12
+ },
13
+ "ghcr.io/devcontainers/features/common-utils:1": {
14
+ "username": "vscode",
15
+ "uid": 1000,
16
+ "gid": 1000,
17
+ "installZsh": true,
18
+ "installOhMyZsh": true,
19
+ "configureZshAsDefaultShell": true,
20
+ "upgradePackages": true
21
+ }
22
+ },
23
+
24
+ "hostRequirements": {
25
+ "cpus": 4,
26
+ "memory": "8gb",
27
+ "storage": "32gb"
28
+ },
29
+
30
+ "portsAttributes": {
31
+ "3000": {
32
+ "label": "Backend",
33
+ "onAutoForward": "silent",
34
+ "protocol": "http"
35
+ },
36
+ "3001": {
37
+ "label": "Frontend",
38
+ "onAutoForward": "silent",
39
+ "protocol": "http"
40
+ }
41
+ },
42
+
43
+ "forwardPorts": [3000, 3001],
44
+
45
+ // Use 'postCreateCommand' to run commands after the container is created.
46
+ "postCreateCommand": ["bash", ".devcontainer/boot.sh"]
47
+
48
+ // Configure tool-specific properties.
49
+ // "customizations": {},
50
+
51
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
52
+ // "remoteUser": "root"
53
+ }
.devcontainer/docker-compose.yml ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: '3.9'
2
+
3
+ services:
4
+ app:
5
+ build:
6
+ context: ..
7
+ dockerfile: .devcontainer/Dockerfile
8
+ volumes:
9
+ - ..:/workspace:cached
10
+ command: sleep infinity
11
+ postgres:
12
+ image: 'postgres:14.5-alpine'
13
+ environment:
14
+ - POSTGRES_DB=automatisch
15
+ - POSTGRES_USER=automatisch_user
16
+ - POSTGRES_PASSWORD=automatisch_password
17
+ volumes:
18
+ - postgres_data:/var/lib/postgresql/data
19
+ healthcheck:
20
+ test: ['CMD-SHELL', 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}']
21
+ interval: 10s
22
+ timeout: 5s
23
+ retries: 5
24
+ ports:
25
+ - '5432:5432'
26
+ expose:
27
+ - 5432
28
+ redis:
29
+ image: 'redis:7.0.4-alpine'
30
+ volumes:
31
+ - redis_data:/data
32
+ ports:
33
+ - '6379:6379'
34
+ expose:
35
+ - 6379
36
+ keycloak:
37
+ image: quay.io/keycloak/keycloak:21.1
38
+ restart: always
39
+ environment:
40
+ - KEYCLOAK_ADMIN=admin
41
+ - KEYCLOAK_ADMIN_PASSWORD=admin
42
+ - KC_DB=postgres
43
+ - KC_DB_URL_HOST=postgres
44
+ - KC_DB_URL_DATABASE=keycloak
45
+ - KC_DB_USERNAME=automatisch_user
46
+ - KC_DB_PASSWORD=automatisch_password
47
+ - KC_HEALTH_ENABLED=true
48
+ ports:
49
+ - "8080:8080"
50
+ command: start-dev
51
+ depends_on:
52
+ - postgres
53
+ healthcheck:
54
+ test: "curl -f http://localhost:8080/health/ready || exit 1"
55
+ volumes:
56
+ - keycloak:/opt/keycloak/data/
57
+ expose:
58
+ - 8080
59
+
60
+ volumes:
61
+ postgres_data:
62
+ redis_data:
63
+ keycloak:
.dockerignore ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ **/node_modules/
2
+ **/dist/
3
+ **/logs/
4
+ **/.devcontainer
5
+ **/.github
6
+ **/.vscode
7
+ **/.env
8
+ **/.env.test
9
+ **/.env.production
10
+ **/yarn-error.log
11
+ packages/docs
12
+ packages/e2e-test
.github/workflows/backend.yml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Automatisch Backend Tests
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ test:
11
+ timeout-minutes: 60
12
+ runs-on:
13
+ - ubuntu-latest
14
+ services:
15
+ postgres:
16
+ image: postgres:14.5-alpine
17
+ env:
18
+ POSTGRES_DB: automatisch_test
19
+ POSTGRES_USER: automatisch_test_user
20
+ POSTGRES_PASSWORD: automatisch_test_user_password
21
+ options: >-
22
+ --health-cmd "pg_isready -U automatisch_test_user -d automatisch_test"
23
+ --health-interval 10s
24
+ --health-timeout 5s
25
+ --health-retries 5
26
+ ports:
27
+ - 5432:5432
28
+ redis:
29
+ image: redis:7.0.4-alpine
30
+ options: >-
31
+ --health-cmd "redis-cli ping"
32
+ --health-interval 10s
33
+ --health-timeout 5s
34
+ --health-retries 5
35
+ ports:
36
+ - 6379:6379
37
+
38
+ steps:
39
+ - uses: actions/checkout@v3
40
+ - uses: actions/setup-node@v3
41
+ with:
42
+ node-version: 18
43
+ - name: Install dependencies
44
+ run: cd packages/backend && yarn
45
+ - name: Copy .env-example.test file to .env.test
46
+ run: cd packages/backend && cp .env-example.test .env.test
47
+ - name: Run tests
48
+ run: cd packages/backend && yarn test
.github/workflows/ci.yml ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Automatisch CI
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ pull_request:
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ linter:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
14
+ - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
15
+ - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
16
+ - uses: actions/checkout@v2
17
+ - uses: actions/setup-node@v2
18
+ with:
19
+ node-version: '18'
20
+ cache: 'yarn'
21
+ cache-dependency-path: yarn.lock
22
+ - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
23
+ - run: echo "🖥️ The workflow is now ready to test your code on the runner."
24
+ - run: yarn --frozen-lockfile
25
+ - run: cd packages/backend && yarn lint
26
+ - run: echo "🍏 This job's status is ${{ job.status }}."
27
+ start-backend-server:
28
+ runs-on: ubuntu-latest
29
+ steps:
30
+ - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
31
+ - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
32
+ - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
33
+ - uses: actions/checkout@v2
34
+ - uses: actions/setup-node@v2
35
+ with:
36
+ node-version: '18'
37
+ cache: 'yarn'
38
+ cache-dependency-path: yarn.lock
39
+ - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
40
+ - run: echo "🖥️ The workflow is now ready to test your code on the runner."
41
+ - run: yarn --frozen-lockfile && yarn lerna bootstrap
42
+ - run: cd packages/backend && yarn start
43
+ env:
44
+ ENCRYPTION_KEY: sample_encryption_key
45
+ WEBHOOK_SECRET_KEY: sample_webhook_secret_key
46
+ - run: echo "🍏 This job's status is ${{ job.status }}."
47
+ start-backend-worker:
48
+ runs-on: ubuntu-latest
49
+ steps:
50
+ - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
51
+ - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
52
+ - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
53
+ - uses: actions/checkout@v2
54
+ - uses: actions/setup-node@v2
55
+ with:
56
+ node-version: '18'
57
+ cache: 'yarn'
58
+ cache-dependency-path: yarn.lock
59
+ - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
60
+ - run: echo "🖥️ The workflow is now ready to test your code on the runner."
61
+ - run: yarn --frozen-lockfile && yarn lerna bootstrap
62
+ - run: cd packages/backend && yarn start:worker
63
+ env:
64
+ ENCRYPTION_KEY: sample_encryption_key
65
+ WEBHOOK_SECRET_KEY: sample_webhook_secret_key
66
+ - run: echo "🍏 This job's status is ${{ job.status }}."
67
+ build-web:
68
+ runs-on: ubuntu-latest
69
+ steps:
70
+ - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
71
+ - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
72
+ - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
73
+ - uses: actions/checkout@v2
74
+ - uses: actions/setup-node@v2
75
+ with:
76
+ node-version: '18'
77
+ cache: 'yarn'
78
+ cache-dependency-path: yarn.lock
79
+ - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
80
+ - run: echo "🖥️ The workflow is now ready to test your code on the runner."
81
+ - run: yarn --frozen-lockfile && yarn lerna bootstrap
82
+ - run: cd packages/web && yarn build
83
+ env:
84
+ CI: false
85
+ - run: echo "🍏 This job's status is ${{ job.status }}."
.github/workflows/docs-change.yml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Automatisch Docs Change
2
+ on:
3
+ pull_request:
4
+ paths:
5
+ - 'packages/docs/**'
6
+ jobs:
7
+ label:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - name: Checkout repository
11
+ uses: actions/checkout@v3
12
+ - name: Label PR
13
+ uses: actions/github-script@v6
14
+ with:
15
+ script: |
16
+ const { pull_request } = context.payload;
17
+
18
+ const label = 'documentation-change';
19
+ const hasLabel = pull_request.labels.some(({ name }) => name === label);
20
+
21
+ if (!hasLabel) {
22
+ await github.rest.issues.addLabels({
23
+ owner: context.repo.owner,
24
+ repo: context.repo.repo,
25
+ issue_number: pull_request.number,
26
+ labels: [label],
27
+ });
28
+
29
+ console.log(`Label "${label}" added to PR #${pull_request.number}`);
30
+ } else {
31
+ console.log(`Label "${label}" already exists on PR #${pull_request.number}`);
32
+ }
.github/workflows/playwright.yml ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Automatisch UI Tests
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ pull_request:
7
+ paths:
8
+ - 'packages/backend/**'
9
+ - 'packages/e2e-tests/**'
10
+ - 'packages/web/**'
11
+ - '!packages/backend/src/apps/**'
12
+ workflow_dispatch:
13
+
14
+ env:
15
+ ENCRYPTION_KEY: sample_encryption_key
16
+ WEBHOOK_SECRET_KEY: sample_webhook_secret_key
17
+ APP_SECRET_KEY: sample_app_secret_key
18
+ POSTGRES_HOST: localhost
19
+ POSTGRES_DATABASE: automatisch
20
+ POSTGRES_PORT: 5432
21
+ POSTGRES_USERNAME: automatisch_user
22
+ POSTGRES_PASSWORD: automatisch_password
23
+ REDIS_HOST: localhost
24
+ APP_ENV: production
25
+ LICENSE_KEY: dummy_license_key
26
+
27
+ jobs:
28
+ test:
29
+ timeout-minutes: 60
30
+ runs-on:
31
+ - ubuntu-latest
32
+ services:
33
+ postgres:
34
+ image: postgres:14.5-alpine
35
+ env:
36
+ POSTGRES_DB: automatisch
37
+ POSTGRES_USER: automatisch_user
38
+ POSTGRES_PASSWORD: automatisch_password
39
+ options: >-
40
+ --health-cmd "pg_isready -U automatisch_user -d automatisch"
41
+ --health-interval 10s
42
+ --health-timeout 5s
43
+ --health-retries 5
44
+ ports:
45
+ - 5432:5432
46
+ redis:
47
+ image: redis:7.0.4-alpine
48
+ options: >-
49
+ --health-cmd "redis-cli ping"
50
+ --health-interval 10s
51
+ --health-timeout 5s
52
+ --health-retries 5
53
+ ports:
54
+ - 6379:6379
55
+
56
+ steps:
57
+ - uses: actions/checkout@v3
58
+ - uses: actions/setup-node@v3
59
+ with:
60
+ node-version: 18
61
+ - name: Install dependencies
62
+ run: yarn && yarn lerna bootstrap
63
+ - name: Install Playwright Browsers
64
+ run: yarn playwright install --with-deps
65
+ - name: Build Automatisch web
66
+ working-directory: ./packages/web
67
+ run: yarn build
68
+ env:
69
+ # Keep this until we clean up warnings in build processes
70
+ CI: false
71
+ - name: Migrate database
72
+ working-directory: ./packages/backend
73
+ run: yarn db:migrate
74
+ - name: Seed user
75
+ working-directory: ./packages/backend
76
+ run: yarn db:seed:user &
77
+ - name: Install certutils
78
+ run: sudo apt install -y libnss3-tools
79
+ - name: Install mkcert
80
+ run: |
81
+ curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64" \
82
+ && chmod +x mkcert-v*-linux-amd64 \
83
+ && sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert
84
+ - name: Install root certificate via mkcert
85
+ run: mkcert -install
86
+ - name: Create certificate
87
+ run: mkcert automatisch.io "*.automatisch.io" localhost 127.0.0.1 ::1
88
+ working-directory: ./packages/e2e-tests
89
+ - name: Set CAROOT environment variable
90
+ run: echo "NODE_EXTRA_CA_CERTS=$(mkcert -CAROOT)/rootCA.pem" >> "$GITHUB_ENV"
91
+ - name: Override license server with local server
92
+ run: sudo echo "127.0.0.1 license.automatisch.io" | sudo tee -a /etc/hosts
93
+ - name: Run local license server
94
+ working-directory: ./packages/e2e-tests
95
+ run: sudo yarn start-mock-license-server &
96
+ - name: Run Automatisch
97
+ run: yarn start &
98
+ working-directory: ./packages/backend
99
+ - name: Run Automatisch worker
100
+ run: yarn start:worker &
101
+ working-directory: ./packages/backend
102
+ - name: Setup upterm session
103
+ if: false
104
+ uses: lhotari/action-upterm@v1
105
+ with:
106
+ limit-access-to-actor: true
107
+ limit-access-to-users: barinali
108
+ - name: Run Playwright tests
109
+ working-directory: ./packages/e2e-tests
110
+ env:
111
+ LOGIN_EMAIL: [email protected]
112
+ LOGIN_PASSWORD: sample
113
+ BASE_URL: http://localhost:3000
114
+ GITHUB_CLIENT_ID: 1c0417daf898adfbd99a
115
+ GITHUB_CLIENT_SECRET: 3328fa814dd582ccd03dbe785cfd683fb8da92b3
116
+ run: yarn test
117
+ - uses: actions/upload-artifact@v3
118
+ if: always()
119
+ with:
120
+ name: playwright-report
121
+ path: packages/e2e-tests/test-results
122
+ retention-days: 30
.gitignore ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ lerna-debug.log*
8
+ .pnpm-debug.log*
9
+
10
+ # Diagnostic reports (https://nodejs.org/api/report.html)
11
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12
+
13
+ # Runtime data
14
+ pids
15
+ *.pid
16
+ *.seed
17
+ *.pid.lock
18
+
19
+ # Directory for instrumented libs generated by jscoverage/JSCover
20
+ lib-cov
21
+
22
+ # Coverage directory used by tools like istanbul
23
+ coverage
24
+ *.lcov
25
+
26
+ # nyc test coverage
27
+ .nyc_output
28
+
29
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30
+ .grunt
31
+
32
+ # Bower dependency directory (https://bower.io/)
33
+ bower_components
34
+
35
+ # node-waf configuration
36
+ .lock-wscript
37
+
38
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
39
+ build/Release
40
+
41
+ # Dependency directories
42
+ node_modules/
43
+ jspm_packages/
44
+
45
+ # Snowpack dependency directory (https://snowpack.dev/)
46
+ web_modules/
47
+
48
+ # TypeScript cache
49
+ *.tsbuildinfo
50
+
51
+ # Optional npm cache directory
52
+ .npm
53
+
54
+ # Optional eslint cache
55
+ .eslintcache
56
+
57
+ # Microbundle cache
58
+ .rpt2_cache/
59
+ .rts2_cache_cjs/
60
+ .rts2_cache_es/
61
+ .rts2_cache_umd/
62
+
63
+ # Optional REPL history
64
+ .node_repl_history
65
+
66
+ # Output of 'npm pack'
67
+ *.tgz
68
+
69
+ # Yarn Integrity file
70
+ .yarn-integrity
71
+
72
+ # dotenv environment variables file
73
+ .env
74
+ .env.test
75
+ .env.production
76
+
77
+ # cypress environment variables file
78
+ cypress.env.json
79
+
80
+ # cypress screenshots
81
+ packages/e2e-tests/cypress/screenshots
82
+
83
+ # cypress videos
84
+ packages/e2e-tests/cypress/videos/
85
+
86
+ # parcel-bundler cache (https://parceljs.org/)
87
+ .cache
88
+ .parcel-cache
89
+
90
+ # Next.js build output
91
+ .next
92
+ out
93
+
94
+ # Nuxt.js build / generate output
95
+ .nuxt
96
+ dist
97
+
98
+ # Gatsby files
99
+ .cache/
100
+ # Comment in the public line in if your project uses Gatsby and not Next.js
101
+ # https://nextjs.org/blog/next-9-1#public-directory-support
102
+ # public
103
+
104
+ # vuepress build output
105
+ .vuepress/dist
106
+
107
+ # Serverless directories
108
+ .serverless/
109
+
110
+ # FuseBox cache
111
+ .fusebox/
112
+
113
+ # DynamoDB Local files
114
+ .dynamodb/
115
+
116
+ # TernJS port file
117
+ .tern-port
118
+
119
+ # Stores VSCode versions used for testing VSCode extensions
120
+ .vscode-test
121
+
122
+ # yarn v2
123
+ .yarn/cache
124
+ .yarn/unplugged
125
+ .yarn/build-state.yml
126
+ .yarn/install-state.gz
127
+ .pnp.*
128
+
129
+ # MacOS finder preferences
130
+ .DS_store
.node-version ADDED
@@ -0,0 +1 @@
 
 
1
+ 18.19.0
.nvmrc ADDED
@@ -0,0 +1 @@
 
 
1
+ 18.19.0
.prettierrc.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ module.exports = {
2
+ singleQuote: true,
3
+ };
.vscode/launch.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "name": "Launch server-side",
6
+ "type": "node-terminal",
7
+ "request": "launch",
8
+ "cwd": "${workspaceFolder}/packages/backend",
9
+ "command": "yarn dev"
10
+ }
11
+ ]
12
+ }
.vscode/settings.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "editor.formatOnSave": true,
3
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
4
+ "[javascript]": {
5
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
6
+ }
7
+ }
.yarnrc ADDED
@@ -0,0 +1 @@
 
 
1
+ network-timeout 400000
CODE_OF_CONDUCT.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ Demonstrating empathy and kindness toward other people
14
+ Being respectful of differing opinions, viewpoints, and experiences
15
+ Giving and gracefully accepting constructive feedback
16
+ Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ Focusing on what is best not just for us as individuals, but for the overall community
18
+ Examples of unacceptable behavior include:
19
+
20
+ The use of sexualized language or imagery, and sexual attention or advances of any kind
21
+ Trolling, insulting or derogatory comments, and personal or political attacks
22
+ Public or private harassment
23
+ Publishing others’ private information, such as a physical or email address, without their explicit permission
24
+ Other conduct which could reasonably be considered inappropriate in a professional setting
25
+
26
+ ## Enforcement Responsibilities
27
+
28
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
29
+
30
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
31
+
32
+ ## Scope
33
+
34
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
35
+
36
+ ## Enforcement
37
+
38
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [email protected]. All complaints will be reviewed and investigated promptly and fairly.
39
+
40
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
41
+
42
+ ## Enforcement Guidelines
43
+
44
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
45
+
46
+ ### 1. Correction
47
+
48
+ Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
49
+
50
+ Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
51
+
52
+ ### 2. Warning
53
+
54
+ Community Impact: A violation through a single incident or series of actions.
55
+
56
+ Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
57
+
58
+ ### 3. Temporary Ban
59
+
60
+ Community Impact: A serious violation of community standards, including sustained inappropriate behavior.
61
+
62
+ Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
63
+
64
+ ### 4. Permanent Ban
65
+
66
+ Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
67
+
68
+ Consequence: A permanent ban from any sort of public interaction within the community.
69
+
70
+ ## Attribution
71
+
72
+ This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
73
+
74
+ Community Impact Guidelines were inspired by Mozilla’s code of conduct enforcement ladder.
75
+
76
+ For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
CONTRIBUTOR_LICENSE_AGREEMENT.md ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # Automatisch Contributor License Agreement
2
+
3
+ I give Automatisch permission to license my contributions on any terms they like. I am giving them this license in order to make it possible for them to accept my contributions into their project.
4
+
5
+ **_As far as the law allows, my contributions come as is, without any warranty or condition, and I will not be liable to anyone for any damages related to this software or this license, under any kind of legal claim._**
LICENSE ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ LICENSE.agpl (AGPL-3.0) applies to all files in this
2
+ repository, except for files that contain ".ee." in their name
3
+ which are covered by LICENSE.enterprise.
LICENSE.agpl ADDED
@@ -0,0 +1,661 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU AFFERO GENERAL PUBLIC LICENSE
2
+ Version 3, 19 November 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU Affero General Public License is a free, copyleft license for
11
+ software and other kinds of works, specifically designed to ensure
12
+ cooperation with the community in the case of network server software.
13
+
14
+ The licenses for most software and other practical works are designed
15
+ to take away your freedom to share and change the works. By contrast,
16
+ our General Public Licenses are intended to guarantee your freedom to
17
+ share and change all versions of a program--to make sure it remains free
18
+ software for all its users.
19
+
20
+ When we speak of free software, we are referring to freedom, not
21
+ price. Our General Public Licenses are designed to make sure that you
22
+ have the freedom to distribute copies of free software (and charge for
23
+ them if you wish), that you receive source code or can get it if you
24
+ want it, that you can change the software or use pieces of it in new
25
+ free programs, and that you know you can do these things.
26
+
27
+ Developers that use our General Public Licenses protect your rights
28
+ with two steps: (1) assert copyright on the software, and (2) offer
29
+ you this License which gives you legal permission to copy, distribute
30
+ and/or modify the software.
31
+
32
+ A secondary benefit of defending all users' freedom is that
33
+ improvements made in alternate versions of the program, if they
34
+ receive widespread use, become available for other developers to
35
+ incorporate. Many developers of free software are heartened and
36
+ encouraged by the resulting cooperation. However, in the case of
37
+ software used on network servers, this result may fail to come about.
38
+ The GNU General Public License permits making a modified version and
39
+ letting the public access it on a server without ever releasing its
40
+ source code to the public.
41
+
42
+ The GNU Affero General Public License is designed specifically to
43
+ ensure that, in such cases, the modified source code becomes available
44
+ to the community. It requires the operator of a network server to
45
+ provide the source code of the modified version running there to the
46
+ users of that server. Therefore, public use of a modified version, on
47
+ a publicly accessible server, gives the public access to the source
48
+ code of the modified version.
49
+
50
+ An older license, called the Affero General Public License and
51
+ published by Affero, was designed to accomplish similar goals. This is
52
+ a different license, not a version of the Affero GPL, but Affero has
53
+ released a new version of the Affero GPL which permits relicensing under
54
+ this license.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ TERMS AND CONDITIONS
60
+
61
+ 0. Definitions.
62
+
63
+ "This License" refers to version 3 of the GNU Affero General Public License.
64
+
65
+ "Copyright" also means copyright-like laws that apply to other kinds of
66
+ works, such as semiconductor masks.
67
+
68
+ "The Program" refers to any copyrightable work licensed under this
69
+ License. Each licensee is addressed as "you". "Licensees" and
70
+ "recipients" may be individuals or organizations.
71
+
72
+ To "modify" a work means to copy from or adapt all or part of the work
73
+ in a fashion requiring copyright permission, other than the making of an
74
+ exact copy. The resulting work is called a "modified version" of the
75
+ earlier work or a work "based on" the earlier work.
76
+
77
+ A "covered work" means either the unmodified Program or a work based
78
+ on the Program.
79
+
80
+ To "propagate" a work means to do anything with it that, without
81
+ permission, would make you directly or secondarily liable for
82
+ infringement under applicable copyright law, except executing it on a
83
+ computer or modifying a private copy. Propagation includes copying,
84
+ distribution (with or without modification), making available to the
85
+ public, and in some countries other activities as well.
86
+
87
+ To "convey" a work means any kind of propagation that enables other
88
+ parties to make or receive copies. Mere interaction with a user through
89
+ a computer network, with no transfer of a copy, is not conveying.
90
+
91
+ An interactive user interface displays "Appropriate Legal Notices"
92
+ to the extent that it includes a convenient and prominently visible
93
+ feature that (1) displays an appropriate copyright notice, and (2)
94
+ tells the user that there is no warranty for the work (except to the
95
+ extent that warranties are provided), that licensees may convey the
96
+ work under this License, and how to view a copy of this License. If
97
+ the interface presents a list of user commands or options, such as a
98
+ menu, a prominent item in the list meets this criterion.
99
+
100
+ 1. Source Code.
101
+
102
+ The "source code" for a work means the preferred form of the work
103
+ for making modifications to it. "Object code" means any non-source
104
+ form of a work.
105
+
106
+ A "Standard Interface" means an interface that either is an official
107
+ standard defined by a recognized standards body, or, in the case of
108
+ interfaces specified for a particular programming language, one that
109
+ is widely used among developers working in that language.
110
+
111
+ The "System Libraries" of an executable work include anything, other
112
+ than the work as a whole, that (a) is included in the normal form of
113
+ packaging a Major Component, but which is not part of that Major
114
+ Component, and (b) serves only to enable use of the work with that
115
+ Major Component, or to implement a Standard Interface for which an
116
+ implementation is available to the public in source code form. A
117
+ "Major Component", in this context, means a major essential component
118
+ (kernel, window system, and so on) of the specific operating system
119
+ (if any) on which the executable work runs, or a compiler used to
120
+ produce the work, or an object code interpreter used to run it.
121
+
122
+ The "Corresponding Source" for a work in object code form means all
123
+ the source code needed to generate, install, and (for an executable
124
+ work) run the object code and to modify the work, including scripts to
125
+ control those activities. However, it does not include the work's
126
+ System Libraries, or general-purpose tools or generally available free
127
+ programs which are used unmodified in performing those activities but
128
+ which are not part of the work. For example, Corresponding Source
129
+ includes interface definition files associated with source files for
130
+ the work, and the source code for shared libraries and dynamically
131
+ linked subprograms that the work is specifically designed to require,
132
+ such as by intimate data communication or control flow between those
133
+ subprograms and other parts of the work.
134
+
135
+ The Corresponding Source need not include anything that users
136
+ can regenerate automatically from other parts of the Corresponding
137
+ Source.
138
+
139
+ The Corresponding Source for a work in source code form is that
140
+ same work.
141
+
142
+ 2. Basic Permissions.
143
+
144
+ All rights granted under this License are granted for the term of
145
+ copyright on the Program, and are irrevocable provided the stated
146
+ conditions are met. This License explicitly affirms your unlimited
147
+ permission to run the unmodified Program. The output from running a
148
+ covered work is covered by this License only if the output, given its
149
+ content, constitutes a covered work. This License acknowledges your
150
+ rights of fair use or other equivalent, as provided by copyright law.
151
+
152
+ You may make, run and propagate covered works that you do not
153
+ convey, without conditions so long as your license otherwise remains
154
+ in force. You may convey covered works to others for the sole purpose
155
+ of having them make modifications exclusively for you, or provide you
156
+ with facilities for running those works, provided that you comply with
157
+ the terms of this License in conveying all material for which you do
158
+ not control copyright. Those thus making or running the covered works
159
+ for you must do so exclusively on your behalf, under your direction
160
+ and control, on terms that prohibit them from making any copies of
161
+ your copyrighted material outside their relationship with you.
162
+
163
+ Conveying under any other circumstances is permitted solely under
164
+ the conditions stated below. Sublicensing is not allowed; section 10
165
+ makes it unnecessary.
166
+
167
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
168
+
169
+ No covered work shall be deemed part of an effective technological
170
+ measure under any applicable law fulfilling obligations under article
171
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
172
+ similar laws prohibiting or restricting circumvention of such
173
+ measures.
174
+
175
+ When you convey a covered work, you waive any legal power to forbid
176
+ circumvention of technological measures to the extent such circumvention
177
+ is effected by exercising rights under this License with respect to
178
+ the covered work, and you disclaim any intention to limit operation or
179
+ modification of the work as a means of enforcing, against the work's
180
+ users, your or third parties' legal rights to forbid circumvention of
181
+ technological measures.
182
+
183
+ 4. Conveying Verbatim Copies.
184
+
185
+ You may convey verbatim copies of the Program's source code as you
186
+ receive it, in any medium, provided that you conspicuously and
187
+ appropriately publish on each copy an appropriate copyright notice;
188
+ keep intact all notices stating that this License and any
189
+ non-permissive terms added in accord with section 7 apply to the code;
190
+ keep intact all notices of the absence of any warranty; and give all
191
+ recipients a copy of this License along with the Program.
192
+
193
+ You may charge any price or no price for each copy that you convey,
194
+ and you may offer support or warranty protection for a fee.
195
+
196
+ 5. Conveying Modified Source Versions.
197
+
198
+ You may convey a work based on the Program, or the modifications to
199
+ produce it from the Program, in the form of source code under the
200
+ terms of section 4, provided that you also meet all of these conditions:
201
+
202
+ a) The work must carry prominent notices stating that you modified
203
+ it, and giving a relevant date.
204
+
205
+ b) The work must carry prominent notices stating that it is
206
+ released under this License and any conditions added under section
207
+ 7. This requirement modifies the requirement in section 4 to
208
+ "keep intact all notices".
209
+
210
+ c) You must license the entire work, as a whole, under this
211
+ License to anyone who comes into possession of a copy. This
212
+ License will therefore apply, along with any applicable section 7
213
+ additional terms, to the whole of the work, and all its parts,
214
+ regardless of how they are packaged. This License gives no
215
+ permission to license the work in any other way, but it does not
216
+ invalidate such permission if you have separately received it.
217
+
218
+ d) If the work has interactive user interfaces, each must display
219
+ Appropriate Legal Notices; however, if the Program has interactive
220
+ interfaces that do not display Appropriate Legal Notices, your
221
+ work need not make them do so.
222
+
223
+ A compilation of a covered work with other separate and independent
224
+ works, which are not by their nature extensions of the covered work,
225
+ and which are not combined with it such as to form a larger program,
226
+ in or on a volume of a storage or distribution medium, is called an
227
+ "aggregate" if the compilation and its resulting copyright are not
228
+ used to limit the access or legal rights of the compilation's users
229
+ beyond what the individual works permit. Inclusion of a covered work
230
+ in an aggregate does not cause this License to apply to the other
231
+ parts of the aggregate.
232
+
233
+ 6. Conveying Non-Source Forms.
234
+
235
+ You may convey a covered work in object code form under the terms
236
+ of sections 4 and 5, provided that you also convey the
237
+ machine-readable Corresponding Source under the terms of this License,
238
+ in one of these ways:
239
+
240
+ a) Convey the object code in, or embodied in, a physical product
241
+ (including a physical distribution medium), accompanied by the
242
+ Corresponding Source fixed on a durable physical medium
243
+ customarily used for software interchange.
244
+
245
+ b) Convey the object code in, or embodied in, a physical product
246
+ (including a physical distribution medium), accompanied by a
247
+ written offer, valid for at least three years and valid for as
248
+ long as you offer spare parts or customer support for that product
249
+ model, to give anyone who possesses the object code either (1) a
250
+ copy of the Corresponding Source for all the software in the
251
+ product that is covered by this License, on a durable physical
252
+ medium customarily used for software interchange, for a price no
253
+ more than your reasonable cost of physically performing this
254
+ conveying of source, or (2) access to copy the
255
+ Corresponding Source from a network server at no charge.
256
+
257
+ c) Convey individual copies of the object code with a copy of the
258
+ written offer to provide the Corresponding Source. This
259
+ alternative is allowed only occasionally and noncommercially, and
260
+ only if you received the object code with such an offer, in accord
261
+ with subsection 6b.
262
+
263
+ d) Convey the object code by offering access from a designated
264
+ place (gratis or for a charge), and offer equivalent access to the
265
+ Corresponding Source in the same way through the same place at no
266
+ further charge. You need not require recipients to copy the
267
+ Corresponding Source along with the object code. If the place to
268
+ copy the object code is a network server, the Corresponding Source
269
+ may be on a different server (operated by you or a third party)
270
+ that supports equivalent copying facilities, provided you maintain
271
+ clear directions next to the object code saying where to find the
272
+ Corresponding Source. Regardless of what server hosts the
273
+ Corresponding Source, you remain obligated to ensure that it is
274
+ available for as long as needed to satisfy these requirements.
275
+
276
+ e) Convey the object code using peer-to-peer transmission, provided
277
+ you inform other peers where the object code and Corresponding
278
+ Source of the work are being offered to the general public at no
279
+ charge under subsection 6d.
280
+
281
+ A separable portion of the object code, whose source code is excluded
282
+ from the Corresponding Source as a System Library, need not be
283
+ included in conveying the object code work.
284
+
285
+ A "User Product" is either (1) a "consumer product", which means any
286
+ tangible personal property which is normally used for personal, family,
287
+ or household purposes, or (2) anything designed or sold for incorporation
288
+ into a dwelling. In determining whether a product is a consumer product,
289
+ doubtful cases shall be resolved in favor of coverage. For a particular
290
+ product received by a particular user, "normally used" refers to a
291
+ typical or common use of that class of product, regardless of the status
292
+ of the particular user or of the way in which the particular user
293
+ actually uses, or expects or is expected to use, the product. A product
294
+ is a consumer product regardless of whether the product has substantial
295
+ commercial, industrial or non-consumer uses, unless such uses represent
296
+ the only significant mode of use of the product.
297
+
298
+ "Installation Information" for a User Product means any methods,
299
+ procedures, authorization keys, or other information required to install
300
+ and execute modified versions of a covered work in that User Product from
301
+ a modified version of its Corresponding Source. The information must
302
+ suffice to ensure that the continued functioning of the modified object
303
+ code is in no case prevented or interfered with solely because
304
+ modification has been made.
305
+
306
+ If you convey an object code work under this section in, or with, or
307
+ specifically for use in, a User Product, and the conveying occurs as
308
+ part of a transaction in which the right of possession and use of the
309
+ User Product is transferred to the recipient in perpetuity or for a
310
+ fixed term (regardless of how the transaction is characterized), the
311
+ Corresponding Source conveyed under this section must be accompanied
312
+ by the Installation Information. But this requirement does not apply
313
+ if neither you nor any third party retains the ability to install
314
+ modified object code on the User Product (for example, the work has
315
+ been installed in ROM).
316
+
317
+ The requirement to provide Installation Information does not include a
318
+ requirement to continue to provide support service, warranty, or updates
319
+ for a work that has been modified or installed by the recipient, or for
320
+ the User Product in which it has been modified or installed. Access to a
321
+ network may be denied when the modification itself materially and
322
+ adversely affects the operation of the network or violates the rules and
323
+ protocols for communication across the network.
324
+
325
+ Corresponding Source conveyed, and Installation Information provided,
326
+ in accord with this section must be in a format that is publicly
327
+ documented (and with an implementation available to the public in
328
+ source code form), and must require no special password or key for
329
+ unpacking, reading or copying.
330
+
331
+ 7. Additional Terms.
332
+
333
+ "Additional permissions" are terms that supplement the terms of this
334
+ License by making exceptions from one or more of its conditions.
335
+ Additional permissions that are applicable to the entire Program shall
336
+ be treated as though they were included in this License, to the extent
337
+ that they are valid under applicable law. If additional permissions
338
+ apply only to part of the Program, that part may be used separately
339
+ under those permissions, but the entire Program remains governed by
340
+ this License without regard to the additional permissions.
341
+
342
+ When you convey a copy of a covered work, you may at your option
343
+ remove any additional permissions from that copy, or from any part of
344
+ it. (Additional permissions may be written to require their own
345
+ removal in certain cases when you modify the work.) You may place
346
+ additional permissions on material, added by you to a covered work,
347
+ for which you have or can give appropriate copyright permission.
348
+
349
+ Notwithstanding any other provision of this License, for material you
350
+ add to a covered work, you may (if authorized by the copyright holders of
351
+ that material) supplement the terms of this License with terms:
352
+
353
+ a) Disclaiming warranty or limiting liability differently from the
354
+ terms of sections 15 and 16 of this License; or
355
+
356
+ b) Requiring preservation of specified reasonable legal notices or
357
+ author attributions in that material or in the Appropriate Legal
358
+ Notices displayed by works containing it; or
359
+
360
+ c) Prohibiting misrepresentation of the origin of that material, or
361
+ requiring that modified versions of such material be marked in
362
+ reasonable ways as different from the original version; or
363
+
364
+ d) Limiting the use for publicity purposes of names of licensors or
365
+ authors of the material; or
366
+
367
+ e) Declining to grant rights under trademark law for use of some
368
+ trade names, trademarks, or service marks; or
369
+
370
+ f) Requiring indemnification of licensors and authors of that
371
+ material by anyone who conveys the material (or modified versions of
372
+ it) with contractual assumptions of liability to the recipient, for
373
+ any liability that these contractual assumptions directly impose on
374
+ those licensors and authors.
375
+
376
+ All other non-permissive additional terms are considered "further
377
+ restrictions" within the meaning of section 10. If the Program as you
378
+ received it, or any part of it, contains a notice stating that it is
379
+ governed by this License along with a term that is a further
380
+ restriction, you may remove that term. If a license document contains
381
+ a further restriction but permits relicensing or conveying under this
382
+ License, you may add to a covered work material governed by the terms
383
+ of that license document, provided that the further restriction does
384
+ not survive such relicensing or conveying.
385
+
386
+ If you add terms to a covered work in accord with this section, you
387
+ must place, in the relevant source files, a statement of the
388
+ additional terms that apply to those files, or a notice indicating
389
+ where to find the applicable terms.
390
+
391
+ Additional terms, permissive or non-permissive, may be stated in the
392
+ form of a separately written license, or stated as exceptions;
393
+ the above requirements apply either way.
394
+
395
+ 8. Termination.
396
+
397
+ You may not propagate or modify a covered work except as expressly
398
+ provided under this License. Any attempt otherwise to propagate or
399
+ modify it is void, and will automatically terminate your rights under
400
+ this License (including any patent licenses granted under the third
401
+ paragraph of section 11).
402
+
403
+ However, if you cease all violation of this License, then your
404
+ license from a particular copyright holder is reinstated (a)
405
+ provisionally, unless and until the copyright holder explicitly and
406
+ finally terminates your license, and (b) permanently, if the copyright
407
+ holder fails to notify you of the violation by some reasonable means
408
+ prior to 60 days after the cessation.
409
+
410
+ Moreover, your license from a particular copyright holder is
411
+ reinstated permanently if the copyright holder notifies you of the
412
+ violation by some reasonable means, this is the first time you have
413
+ received notice of violation of this License (for any work) from that
414
+ copyright holder, and you cure the violation prior to 30 days after
415
+ your receipt of the notice.
416
+
417
+ Termination of your rights under this section does not terminate the
418
+ licenses of parties who have received copies or rights from you under
419
+ this License. If your rights have been terminated and not permanently
420
+ reinstated, you do not qualify to receive new licenses for the same
421
+ material under section 10.
422
+
423
+ 9. Acceptance Not Required for Having Copies.
424
+
425
+ You are not required to accept this License in order to receive or
426
+ run a copy of the Program. Ancillary propagation of a covered work
427
+ occurring solely as a consequence of using peer-to-peer transmission
428
+ to receive a copy likewise does not require acceptance. However,
429
+ nothing other than this License grants you permission to propagate or
430
+ modify any covered work. These actions infringe copyright if you do
431
+ not accept this License. Therefore, by modifying or propagating a
432
+ covered work, you indicate your acceptance of this License to do so.
433
+
434
+ 10. Automatic Licensing of Downstream Recipients.
435
+
436
+ Each time you convey a covered work, the recipient automatically
437
+ receives a license from the original licensors, to run, modify and
438
+ propagate that work, subject to this License. You are not responsible
439
+ for enforcing compliance by third parties with this License.
440
+
441
+ An "entity transaction" is a transaction transferring control of an
442
+ organization, or substantially all assets of one, or subdividing an
443
+ organization, or merging organizations. If propagation of a covered
444
+ work results from an entity transaction, each party to that
445
+ transaction who receives a copy of the work also receives whatever
446
+ licenses to the work the party's predecessor in interest had or could
447
+ give under the previous paragraph, plus a right to possession of the
448
+ Corresponding Source of the work from the predecessor in interest, if
449
+ the predecessor has it or can get it with reasonable efforts.
450
+
451
+ You may not impose any further restrictions on the exercise of the
452
+ rights granted or affirmed under this License. For example, you may
453
+ not impose a license fee, royalty, or other charge for exercise of
454
+ rights granted under this License, and you may not initiate litigation
455
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
456
+ any patent claim is infringed by making, using, selling, offering for
457
+ sale, or importing the Program or any portion of it.
458
+
459
+ 11. Patents.
460
+
461
+ A "contributor" is a copyright holder who authorizes use under this
462
+ License of the Program or a work on which the Program is based. The
463
+ work thus licensed is called the contributor's "contributor version".
464
+
465
+ A contributor's "essential patent claims" are all patent claims
466
+ owned or controlled by the contributor, whether already acquired or
467
+ hereafter acquired, that would be infringed by some manner, permitted
468
+ by this License, of making, using, or selling its contributor version,
469
+ but do not include claims that would be infringed only as a
470
+ consequence of further modification of the contributor version. For
471
+ purposes of this definition, "control" includes the right to grant
472
+ patent sublicenses in a manner consistent with the requirements of
473
+ this License.
474
+
475
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
476
+ patent license under the contributor's essential patent claims, to
477
+ make, use, sell, offer for sale, import and otherwise run, modify and
478
+ propagate the contents of its contributor version.
479
+
480
+ In the following three paragraphs, a "patent license" is any express
481
+ agreement or commitment, however denominated, not to enforce a patent
482
+ (such as an express permission to practice a patent or covenant not to
483
+ sue for patent infringement). To "grant" such a patent license to a
484
+ party means to make such an agreement or commitment not to enforce a
485
+ patent against the party.
486
+
487
+ If you convey a covered work, knowingly relying on a patent license,
488
+ and the Corresponding Source of the work is not available for anyone
489
+ to copy, free of charge and under the terms of this License, through a
490
+ publicly available network server or other readily accessible means,
491
+ then you must either (1) cause the Corresponding Source to be so
492
+ available, or (2) arrange to deprive yourself of the benefit of the
493
+ patent license for this particular work, or (3) arrange, in a manner
494
+ consistent with the requirements of this License, to extend the patent
495
+ license to downstream recipients. "Knowingly relying" means you have
496
+ actual knowledge that, but for the patent license, your conveying the
497
+ covered work in a country, or your recipient's use of the covered work
498
+ in a country, would infringe one or more identifiable patents in that
499
+ country that you have reason to believe are valid.
500
+
501
+ If, pursuant to or in connection with a single transaction or
502
+ arrangement, you convey, or propagate by procuring conveyance of, a
503
+ covered work, and grant a patent license to some of the parties
504
+ receiving the covered work authorizing them to use, propagate, modify
505
+ or convey a specific copy of the covered work, then the patent license
506
+ you grant is automatically extended to all recipients of the covered
507
+ work and works based on it.
508
+
509
+ A patent license is "discriminatory" if it does not include within
510
+ the scope of its coverage, prohibits the exercise of, or is
511
+ conditioned on the non-exercise of one or more of the rights that are
512
+ specifically granted under this License. You may not convey a covered
513
+ work if you are a party to an arrangement with a third party that is
514
+ in the business of distributing software, under which you make payment
515
+ to the third party based on the extent of your activity of conveying
516
+ the work, and under which the third party grants, to any of the
517
+ parties who would receive the covered work from you, a discriminatory
518
+ patent license (a) in connection with copies of the covered work
519
+ conveyed by you (or copies made from those copies), or (b) primarily
520
+ for and in connection with specific products or compilations that
521
+ contain the covered work, unless you entered into that arrangement,
522
+ or that patent license was granted, prior to 28 March 2007.
523
+
524
+ Nothing in this License shall be construed as excluding or limiting
525
+ any implied license or other defenses to infringement that may
526
+ otherwise be available to you under applicable patent law.
527
+
528
+ 12. No Surrender of Others' Freedom.
529
+
530
+ If conditions are imposed on you (whether by court order, agreement or
531
+ otherwise) that contradict the conditions of this License, they do not
532
+ excuse you from the conditions of this License. If you cannot convey a
533
+ covered work so as to satisfy simultaneously your obligations under this
534
+ License and any other pertinent obligations, then as a consequence you may
535
+ not convey it at all. For example, if you agree to terms that obligate you
536
+ to collect a royalty for further conveying from those to whom you convey
537
+ the Program, the only way you could satisfy both those terms and this
538
+ License would be to refrain entirely from conveying the Program.
539
+
540
+ 13. Remote Network Interaction; Use with the GNU General Public License.
541
+
542
+ Notwithstanding any other provision of this License, if you modify the
543
+ Program, your modified version must prominently offer all users
544
+ interacting with it remotely through a computer network (if your version
545
+ supports such interaction) an opportunity to receive the Corresponding
546
+ Source of your version by providing access to the Corresponding Source
547
+ from a network server at no charge, through some standard or customary
548
+ means of facilitating copying of software. This Corresponding Source
549
+ shall include the Corresponding Source for any work covered by version 3
550
+ of the GNU General Public License that is incorporated pursuant to the
551
+ following paragraph.
552
+
553
+ Notwithstanding any other provision of this License, you have
554
+ permission to link or combine any covered work with a work licensed
555
+ under version 3 of the GNU General Public License into a single
556
+ combined work, and to convey the resulting work. The terms of this
557
+ License will continue to apply to the part which is the covered work,
558
+ but the work with which it is combined will remain governed by version
559
+ 3 of the GNU General Public License.
560
+
561
+ 14. Revised Versions of this License.
562
+
563
+ The Free Software Foundation may publish revised and/or new versions of
564
+ the GNU Affero General Public License from time to time. Such new versions
565
+ will be similar in spirit to the present version, but may differ in detail to
566
+ address new problems or concerns.
567
+
568
+ Each version is given a distinguishing version number. If the
569
+ Program specifies that a certain numbered version of the GNU Affero General
570
+ Public License "or any later version" applies to it, you have the
571
+ option of following the terms and conditions either of that numbered
572
+ version or of any later version published by the Free Software
573
+ Foundation. If the Program does not specify a version number of the
574
+ GNU Affero General Public License, you may choose any version ever published
575
+ by the Free Software Foundation.
576
+
577
+ If the Program specifies that a proxy can decide which future
578
+ versions of the GNU Affero General Public License can be used, that proxy's
579
+ public statement of acceptance of a version permanently authorizes you
580
+ to choose that version for the Program.
581
+
582
+ Later license versions may give you additional or different
583
+ permissions. However, no additional obligations are imposed on any
584
+ author or copyright holder as a result of your choosing to follow a
585
+ later version.
586
+
587
+ 15. Disclaimer of Warranty.
588
+
589
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
590
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
591
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
592
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
593
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
594
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
595
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
596
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
597
+
598
+ 16. Limitation of Liability.
599
+
600
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
601
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
602
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
603
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
604
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
605
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
606
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
607
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
608
+ SUCH DAMAGES.
609
+
610
+ 17. Interpretation of Sections 15 and 16.
611
+
612
+ If the disclaimer of warranty and limitation of liability provided
613
+ above cannot be given local legal effect according to their terms,
614
+ reviewing courts shall apply local law that most closely approximates
615
+ an absolute waiver of all civil liability in connection with the
616
+ Program, unless a warranty or assumption of liability accompanies a
617
+ copy of the Program in return for a fee.
618
+
619
+ END OF TERMS AND CONDITIONS
620
+
621
+ How to Apply These Terms to Your New Programs
622
+
623
+ If you develop a new program, and you want it to be of the greatest
624
+ possible use to the public, the best way to achieve this is to make it
625
+ free software which everyone can redistribute and change under these terms.
626
+
627
+ To do so, attach the following notices to the program. It is safest
628
+ to attach them to the start of each source file to most effectively
629
+ state the exclusion of warranty; and each file should have at least
630
+ the "copyright" line and a pointer to where the full notice is found.
631
+
632
+ <one line to give the program's name and a brief idea of what it does.>
633
+ Copyright (C) <year> <name of author>
634
+
635
+ This program is free software: you can redistribute it and/or modify
636
+ it under the terms of the GNU Affero General Public License as published
637
+ by the Free Software Foundation, either version 3 of the License, or
638
+ (at your option) any later version.
639
+
640
+ This program is distributed in the hope that it will be useful,
641
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
642
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
643
+ GNU Affero General Public License for more details.
644
+
645
+ You should have received a copy of the GNU Affero General Public License
646
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
647
+
648
+ Also add information on how to contact you by electronic and paper mail.
649
+
650
+ If your software can interact with users remotely through a computer
651
+ network, you should also make sure that it provides a way for users to
652
+ get its source. For example, if your program is a web application, its
653
+ interface could display a "Source" link that leads users to an archive
654
+ of the code. There are many ways you could offer source, and different
655
+ solutions will be better for different programs; see section 13 for the
656
+ specific requirements.
657
+
658
+ You should also get your employer (if you work as a programmer) or school,
659
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
660
+ For more information on this, and how to apply and follow the GNU AGPL, see
661
+ <https://www.gnu.org/licenses/>.
LICENSE.enterprise ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The Automatisch Enterprise license (the “Enterprise License”)
2
+ Copyright (c) 2023-present AB Software GmbH.
3
+
4
+ With regard to the Automatisch Software:
5
+
6
+ This software and associated documentation files (the "Software") may only be
7
+ used in production, if you (and any entity that you represent) have a valid
8
+ Automatisch Enterprise license for the correct number of user seats. Subject
9
+ to the foregoing sentence, you are free to modify this Software and publish
10
+ patches to the Software. You agree that Automatisch and/or its licensors
11
+ (as applicable) retain all right, title and interest in and to all such
12
+ modifications and/or patches, and all such modifications and/or patches may
13
+ only be used, copied, modified, displayed, distributed, or otherwise exploited
14
+ with a valid Automatisch Enterprise license for the correct number of user seats.
15
+ Notwithstanding the foregoing, you may copy and modify the Software for
16
+ development and testing purposes, without requiring a subscription. You agree
17
+ that Automatisch and/or its licensors (as applicable) retain all right, title
18
+ and interest in and to all such modifications. You are not granted any other
19
+ rights beyond what is expressly stated herein. Subject to the foregoing, it is
20
+ forbidden to copy, merge, publish, distribute, sublicense, and/or sell the Software.
21
+
22
+ The full text of this Enterprise License shall be included in all copies or
23
+ substantial portions of the Software.
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
+ SOFTWARE.
32
+
33
+ For all third party components incorporated into the Automatisch Software, those
34
+ components are licensed under the original license provided by the owner of the
35
+ applicable component.
README.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Automatisch - Open Source Zapier Alternative
2
+
3
+ ![Automatisch - Screenshot](https://user-images.githubusercontent.com/2501931/191562539-e42f6c34-03c7-4dc4-bcf9-7f9473a9c64f.png)
4
+
5
+ 🧐 Automatisch is a business automation tool that lets you connect different services like Twitter, Slack, and more to automate your business processes.
6
+
7
+ 💸 Automating your workflows doesn't have to be a difficult or expensive process. You also don't need any programming knowledge to use Automatisch.
8
+
9
+ ## Advantages
10
+
11
+ There are other existing solutions in the market, like Zapier and Integromat, so you might be wondering why you should use Automatisch.
12
+
13
+ ✅ One of the main benefits of using Automatisch is that it allows you to store your data on your own servers, which is essential for businesses that handle sensitive user information and cannot risk sharing it with external cloud services. This is especially relevant for industries such as healthcare and finance, as well as for European companies that must adhere to the General Data Protection Regulation (GDPR).
14
+
15
+ 🤓 Your contributions are vital to the development of Automatisch. As an open-source software, anyone can have an impact on how it is being developed.
16
+
17
+ 💙 No vendor lock-in. If you ever decide that Automatisch is no longer helpful for your business, you can switch to any other provider, which will be easier than switching from the one cloud provider to another since you have all data and flexibility.
18
+
19
+ ## Documentation
20
+
21
+ The official documentation can be found here: [https://automatisch.io/docs](https://automatisch.io/docs)
22
+
23
+ ## Installation
24
+
25
+ ```bash
26
+ # Clone the repository
27
+ git clone https://github.com/automatisch/automatisch.git
28
+
29
+ # Go to the repository folder
30
+ cd automatisch
31
+
32
+ # Start
33
+ docker compose up
34
+ ```
35
+
36
+ You can use `[email protected]` email address and `sample` password to login to Automatisch. Please do not forget to change your email and password from the settings page.
37
+
38
+ For other installation types, you can check the [installation](https://automatisch.io/docs/guide/installation) guide.
39
+
40
+ ## Community Links
41
+
42
+ - [Discord](https://discord.gg/dJSah9CVrC)
43
+ - [Twitter](https://twitter.com/automatischio)
44
+
45
+ ## Support
46
+
47
+ If you have any questions or problems, please visit our GitHub issues page, and we'll try to help you as soon as possible.
48
+
49
+ [https://github.com/automatisch/automatisch/issues](https://github.com/automatisch/automatisch/issues)
50
+
51
+ ## License
52
+
53
+ Automatisch Community Edition (Automatisch CE) is an open-source software with the [AGPL-3.0 license](LICENSE.agpl).
54
+
55
+ Automatisch Enterprise Edition (Automatisch EE) is a commercial offering with the [Enterprise license](LICENSE.enterprise).
56
+
57
+ The Automatisch repository contains both AGPL-licensed and Enterprise-licensed files. We maintain a single repository to make development easier.
58
+
59
+ All files that contain ".ee." in their name fall under the [Enterprise license](LICENSE.enterprise). All other files fall under the [AGPL-3.0 license](LICENSE.agpl).
60
+
61
+ See the [LICENSE](LICENSE) file for more information.
docker-compose.yml ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: '3.9'
2
+ services:
3
+ main:
4
+ build:
5
+ context: ./docker
6
+ dockerfile: Dockerfile.compose
7
+ entrypoint: /compose-entrypoint.sh
8
+ ports:
9
+ - '3000:3000'
10
+ depends_on:
11
+ postgres:
12
+ condition: service_healthy
13
+ redis:
14
+ condition: service_started
15
+ environment:
16
+ - HOST=localhost
17
+ - PROTOCOL=http
18
+ - PORT=3000
19
+ - APP_ENV=production
20
+ - REDIS_HOST=redis
21
+ - POSTGRES_HOST=postgres
22
+ - POSTGRES_DATABASE=automatisch
23
+ - POSTGRES_USERNAME=automatisch_user
24
+ - POSTGRES_PASSWORD=automatisch_password
25
+ - ENCRYPTION_KEY
26
+ - WEBHOOK_SECRET_KEY
27
+ - APP_SECRET_KEY
28
+ volumes:
29
+ - automatisch_storage:/automatisch/storage
30
+ worker:
31
+ build:
32
+ context: ./docker
33
+ dockerfile: Dockerfile.compose
34
+ entrypoint: /compose-entrypoint.sh
35
+ depends_on:
36
+ - main
37
+ environment:
38
+ - APP_ENV=production
39
+ - REDIS_HOST=redis
40
+ - POSTGRES_HOST=postgres
41
+ - POSTGRES_DATABASE=automatisch
42
+ - POSTGRES_USERNAME=automatisch_user
43
+ - POSTGRES_PASSWORD=automatisch_password
44
+ - ENCRYPTION_KEY
45
+ - WEBHOOK_SECRET_KEY
46
+ - APP_SECRET_KEY
47
+ - WORKER=true
48
+ volumes:
49
+ - automatisch_storage:/automatisch/storage
50
+ postgres:
51
+ image: 'postgres:14.5'
52
+ environment:
53
+ - POSTGRES_DB=automatisch
54
+ - POSTGRES_USER=automatisch_user
55
+ - POSTGRES_PASSWORD=automatisch_password
56
+ volumes:
57
+ - postgres_data:/var/lib/postgresql/data
58
+ healthcheck:
59
+ test: ['CMD-SHELL', 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}']
60
+ interval: 10s
61
+ timeout: 5s
62
+ retries: 5
63
+ redis:
64
+ image: 'redis:7.0.4'
65
+ volumes:
66
+ - redis_data:/data
67
+ volumes:
68
+ automatisch_storage:
69
+ postgres_data:
70
+ redis_data:
docker/Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1
2
+ FROM node:18-alpine
3
+
4
+ ENV PORT 3000
5
+
6
+ RUN \
7
+ apk --no-cache add --virtual build-dependencies python3 build-base git
8
+
9
+ WORKDIR /automatisch
10
+
11
+ # copy the app, note .dockerignore
12
+ COPY . /automatisch
13
+
14
+ RUN yarn
15
+
16
+ RUN cd packages/web && yarn build
17
+
18
+ RUN \
19
+ rm -rf /usr/local/share/.cache/ && \
20
+ apk del build-dependencies
21
+
22
+ COPY ./docker/entrypoint.sh /entrypoint.sh
23
+
24
+ EXPOSE 3000
25
+ ENTRYPOINT ["sh", "/entrypoint.sh"]
docker/Dockerfile.compose ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1
2
+ FROM automatischio/automatisch:latest
3
+ WORKDIR /automatisch
4
+
5
+ RUN apk add --no-cache openssl dos2unix
6
+
7
+ COPY ./compose-entrypoint.sh /compose-entrypoint.sh
8
+ RUN dos2unix /compose-entrypoint.sh
9
+
10
+ EXPOSE 3000
11
+ ENTRYPOINT ["sh", "/compose-entrypoint.sh"]
docker/compose-entrypoint.sh ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+
3
+ set -e
4
+
5
+ if [ ! -f /automatisch/storage/.env ]; then
6
+ >&2 echo "Saving environment variables"
7
+ ENCRYPTION_KEY="${ENCRYPTION_KEY:-$(openssl rand -base64 36)}"
8
+ WEBHOOK_SECRET_KEY="${WEBHOOK_SECRET_KEY:-$(openssl rand -base64 36)}"
9
+ APP_SECRET_KEY="${APP_SECRET_KEY:-$(openssl rand -base64 36)}"
10
+ echo "ENCRYPTION_KEY=$ENCRYPTION_KEY" >> /automatisch/storage/.env
11
+ echo "WEBHOOK_SECRET_KEY=$WEBHOOK_SECRET_KEY" >> /automatisch/storage/.env
12
+ echo "APP_SECRET_KEY=$APP_SECRET_KEY" >> /automatisch/storage/.env
13
+ fi
14
+
15
+ # initiate env. vars. from /automatisch/storage/.env file
16
+ export $(grep -v '^#' /automatisch/storage/.env | xargs)
17
+
18
+ # migration for webhook secret key, will be removed in the future.
19
+ if [[ -z "${WEBHOOK_SECRET_KEY}" ]]; then
20
+ WEBHOOK_SECRET_KEY="$(openssl rand -base64 36)"
21
+ echo "WEBHOOK_SECRET_KEY=$WEBHOOK_SECRET_KEY" >> /automatisch/storage/.env
22
+ fi
23
+
24
+ echo "Environment variables have been set!"
25
+
26
+ sh /entrypoint.sh
docker/entrypoint.sh ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+
3
+ set -e
4
+
5
+ cd packages/backend
6
+
7
+ if [ -n "$WORKER" ]; then
8
+ yarn start:worker
9
+ else
10
+ yarn db:migrate
11
+ yarn db:seed:user
12
+ yarn start
13
+ fi
lerna.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "packages": [
3
+ "packages/*"
4
+ ],
5
+ "version": "0.10.0",
6
+ "npmClient": "yarn",
7
+ "useWorkspaces": true,
8
+ "command": {
9
+ "add": {
10
+ "exact": true
11
+ }
12
+ }
13
+ }
package.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@automatisch/root",
3
+ "license": "See LICENSE file",
4
+ "private": true,
5
+ "scripts": {
6
+ "start": "lerna run --stream --parallel --scope=@*/{web,backend} dev",
7
+ "start:web": "lerna run --stream --scope=@*/web dev",
8
+ "start:backend": "lerna run --stream --scope=@*/backend dev",
9
+ "build:docs": "cd ./packages/docs && yarn install && yarn build"
10
+ },
11
+ "workspaces": {
12
+ "packages": [
13
+ "packages/*"
14
+ ],
15
+ "nohoist": [
16
+ "**/babel-loader",
17
+ "**/webpack",
18
+ "**/@automatisch/web",
19
+ "**/ajv"
20
+ ]
21
+ },
22
+ "devDependencies": {
23
+ "eslint": "^8.13.0",
24
+ "eslint-config-prettier": "^8.3.0",
25
+ "eslint-plugin-prettier": "^4.0.0",
26
+ "lerna": "^4.0.0",
27
+ "prettier": "^2.5.1"
28
+ },
29
+ "publishConfig": {
30
+ "access": "public"
31
+ }
32
+ }
packages/backend/.env-example ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ HOST=localhost
2
+ PROTOCOL=http
3
+ PORT=3000
4
+ WEB_APP_URL=http://localhost:3001
5
+ WEBHOOK_URL=http://localhost:3000
6
+ APP_ENV=development
7
+ POSTGRES_DATABASE=automatisch_development
8
+ POSTGRES_PORT=5432
9
+ POSTGRES_HOST=localhost
10
+ POSTGRES_USERNAME=automatish_development_user
11
+ POSTGRES_PASSWORD=
12
+ POSTGRES_ENABLE_SSL=false
13
+ ENCRYPTION_KEY=sample-encryption-key
14
+ WEBHOOK_SECRET_KEY=sample-webhook-key
15
+ APP_SECRET_KEY=sample-app-secret-key
16
+ REDIS_PORT=6379
17
+ REDIS_HOST=127.0.0.1
18
+ REDIS_USERNAME=redis_username
19
+ REDIS_PASSWORD=redis_password
20
+ REDIS_TLS=true
21
+ ENABLE_BULLMQ_DASHBOARD=false
22
+ SERVE_WEB_APP_SEPARATELY=true
packages/backend/.env-example.test ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ APP_ENV=test
2
+ HOST=localhost
3
+ PROTOCOL=http
4
+ PORT=3000
5
+ LOG_LEVEL=debug
6
+ ENCRYPTION_KEY=sample_encryption_key
7
+ WEBHOOK_SECRET_KEY=sample_webhook_secret_key
8
+ APP_SECRET_KEY=sample_app_secret_key
9
+ POSTGRES_HOST=localhost
10
+ POSTGRES_DATABASE=automatisch_test
11
+ POSTGRES_PORT=5432
12
+ POSTGRES_USERNAME=automatisch_test_user
13
+ POSTGRES_PASSWORD=automatisch_test_user_password
14
+ REDIS_HOST=localhost
15
+ AUTOMATISCH_CLOUD=true
packages/backend/.eslintignore ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ node_modules
2
+ dist
3
+ build
4
+ coverage
5
+ packages/docs/*
6
+ packages/e2e-tests
7
+
8
+ .eslintrc.js
9
+ husky.config.js
10
+ jest.config.js
11
+ jest.config.base.js
12
+ lint-staged.config.js
13
+
14
+ webpack.config.js
packages/backend/.eslintrc.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "root": true,
3
+ "env": {
4
+ "node": true,
5
+ "es6": true
6
+ },
7
+ "extends": ["eslint:recommended", "prettier"],
8
+ "parserOptions": {
9
+ "ecmaVersion": "latest",
10
+ "sourceType": "module"
11
+ }
12
+ }
packages/backend/README.md ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # `backend`
2
+
3
+ The open source Zapier alternative. Build workflow automation without spending
4
+ time and money.
packages/backend/bin/database/client.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import pg from 'pg';
2
+
3
+ const client = new pg.Client({
4
+ host: 'localhost',
5
+ user: 'postgres',
6
+ port: 5432,
7
+ });
8
+
9
+ export default client;
packages/backend/bin/database/convert-migrations.js ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import appConfig from '../../src/config/app.js';
2
+ import logger from '../../src/helpers/logger.js';
3
+ import '../../src/config/orm.js';
4
+ import { client as knex } from '../../src/config/database.js';
5
+
6
+ export const renameMigrationsAsJsFiles = async () => {
7
+ if (!appConfig.isDev) {
8
+ return;
9
+ }
10
+
11
+ try {
12
+ const tableExists = await knex.schema.hasTable('knex_migrations');
13
+
14
+ if (tableExists) {
15
+ await knex('knex_migrations')
16
+ .where('name', 'like', '%.ts')
17
+ .update({
18
+ name: knex.raw("REPLACE(name, '.ts', '.js')"),
19
+ });
20
+ logger.info(
21
+ `Migration file names with typescript renamed as JS file names!`
22
+ );
23
+ }
24
+ } catch (err) {
25
+ logger.error(err.message);
26
+ }
27
+
28
+ await knex.destroy();
29
+ };
30
+
31
+ renameMigrationsAsJsFiles();
packages/backend/bin/database/create.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ import { createDatabaseAndUser } from './utils.js';
2
+
3
+ createDatabaseAndUser();
packages/backend/bin/database/drop.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ import { dropDatabase } from './utils.js';
2
+
3
+ dropDatabase();
packages/backend/bin/database/seed-user.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ import { createUser } from './utils.js';
2
+
3
+ createUser();
packages/backend/bin/database/utils.js ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import appConfig from '../../src/config/app.js';
2
+ import logger from '../../src/helpers/logger.js';
3
+ import client from './client.js';
4
+ import User from '../../src/models/user.js';
5
+ import Config from '../../src/models/config.js';
6
+ import Role from '../../src/models/role.js';
7
+ import '../../src/config/orm.js';
8
+ import process from 'process';
9
+
10
+ async function fetchAdminRole() {
11
+ const role = await Role.query()
12
+ .where({
13
+ key: 'admin',
14
+ })
15
+ .limit(1)
16
+ .first();
17
+
18
+ return role;
19
+ }
20
+
21
+ export async function createUser(
22
+ email = '[email protected]',
23
+ password = 'sample'
24
+ ) {
25
+ if (appConfig.disableSeedUser) {
26
+ logger.info('Seed user is disabled.');
27
+
28
+ process.exit(0);
29
+
30
+ return;
31
+ }
32
+
33
+ const UNIQUE_VIOLATION_CODE = '23505';
34
+
35
+ const role = await fetchAdminRole();
36
+ const userParams = {
37
+ email,
38
+ password,
39
+ fullName: 'Initial admin',
40
+ roleId: role.id,
41
+ };
42
+
43
+ try {
44
+ const userCount = await User.query().resultSize();
45
+
46
+ if (userCount === 0) {
47
+ const user = await User.query().insertAndFetch(userParams);
48
+ logger.info(`User has been saved: ${user.email}`);
49
+
50
+ await Config.markInstallationCompleted();
51
+ } else {
52
+ logger.info('No need to seed a user.');
53
+ }
54
+ } catch (err) {
55
+ if (err.nativeError.code !== UNIQUE_VIOLATION_CODE) {
56
+ throw err;
57
+ }
58
+
59
+ logger.info(`User already exists: ${email}`);
60
+ }
61
+
62
+ process.exit(0);
63
+ }
64
+
65
+ export const createDatabaseAndUser = async (
66
+ database = appConfig.postgresDatabase,
67
+ user = appConfig.postgresUsername
68
+ ) => {
69
+ await client.connect();
70
+ await createDatabase(database);
71
+ await createDatabaseUser(user);
72
+ await grantPrivileges(database, user);
73
+
74
+ await client.end();
75
+ process.exit(0);
76
+ };
77
+
78
+ export const createDatabase = async (database = appConfig.postgresDatabase) => {
79
+ const DUPLICATE_DB_CODE = '42P04';
80
+
81
+ try {
82
+ await client.query(`CREATE DATABASE ${database}`);
83
+ logger.info(`Database: ${database} created!`);
84
+ } catch (err) {
85
+ if (err.code !== DUPLICATE_DB_CODE) {
86
+ throw err;
87
+ }
88
+
89
+ logger.info(`Database: ${database} already exists!`);
90
+ }
91
+ };
92
+
93
+ export const createDatabaseUser = async (user = appConfig.postgresUsername) => {
94
+ const DUPLICATE_OBJECT_CODE = '42710';
95
+
96
+ try {
97
+ const result = await client.query(`CREATE USER ${user}`);
98
+ logger.info(`Database User: ${user} created!`);
99
+
100
+ return result;
101
+ } catch (err) {
102
+ if (err.code !== DUPLICATE_OBJECT_CODE) {
103
+ throw err;
104
+ }
105
+
106
+ logger.info(`Database User: ${user} already exists!`);
107
+ }
108
+ };
109
+
110
+ export const grantPrivileges = async (
111
+ database = appConfig.postgresDatabase,
112
+ user = appConfig.postgresUsername
113
+ ) => {
114
+ await client.query(
115
+ `GRANT ALL PRIVILEGES ON DATABASE ${database} TO ${user};`
116
+ );
117
+
118
+ logger.info(`${user} has granted all privileges on ${database}!`);
119
+ };
120
+
121
+ export const dropDatabase = async () => {
122
+ if (appConfig.appEnv != 'development' && appConfig.appEnv != 'test') {
123
+ const errorMessage =
124
+ 'Drop database command can be used only with development or test environments!';
125
+
126
+ logger.error(errorMessage);
127
+ return;
128
+ }
129
+
130
+ await client.connect();
131
+ await dropDatabaseAndUser();
132
+
133
+ await client.end();
134
+ };
135
+
136
+ export const dropDatabaseAndUser = async (
137
+ database = appConfig.postgresDatabase,
138
+ user = appConfig.postgresUsername
139
+ ) => {
140
+ await client.query(`DROP DATABASE IF EXISTS ${database}`);
141
+ logger.info(`Database: ${database} removed!`);
142
+
143
+ await client.query(`DROP USER IF EXISTS ${user}`);
144
+ logger.info(`Database User: ${user} removed!`);
145
+ };
packages/backend/knexfile.js ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { knexSnakeCaseMappers } from 'objection';
2
+ import appConfig from './src/config/app.js';
3
+ import path from 'path';
4
+ import { fileURLToPath } from 'url';
5
+
6
+ const fileExtension = 'js';
7
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
8
+
9
+ const knexConfig = {
10
+ client: 'pg',
11
+ connection: {
12
+ host: appConfig.postgresHost,
13
+ port: appConfig.postgresPort,
14
+ user: appConfig.postgresUsername,
15
+ password: appConfig.postgresPassword,
16
+ database: appConfig.postgresDatabase,
17
+ ssl: appConfig.postgresEnableSsl,
18
+ },
19
+ asyncStackTraces: appConfig.isDev,
20
+ searchPath: [appConfig.postgresSchema],
21
+ pool: { min: 0, max: 20 },
22
+ migrations: {
23
+ directory: __dirname + '/src/db/migrations',
24
+ extension: fileExtension,
25
+ loadExtensions: [`.${fileExtension}`],
26
+ },
27
+ seeds: {
28
+ directory: __dirname + '/src/db/seeds',
29
+ },
30
+ ...(appConfig.isTest ? knexSnakeCaseMappers() : {}),
31
+ };
32
+
33
+ export default knexConfig;
packages/backend/package.json ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "@automatisch/backend",
3
+ "version": "0.10.0",
4
+ "license": "See LICENSE file",
5
+ "description": "The open source Zapier alternative. Build workflow automation without spending time and money.",
6
+ "type": "module",
7
+ "scripts": {
8
+ "dev": "nodemon --watch 'src/**/*.js' --exec 'node' src/server.js",
9
+ "worker": "nodemon --watch 'src/**/*.js' --exec 'node' src/worker.js",
10
+ "start": "node src/server.js",
11
+ "start:worker": "node src/worker.js",
12
+ "pretest": "APP_ENV=test node ./test/setup/prepare-test-env.js",
13
+ "test": "APP_ENV=test vitest run",
14
+ "lint": "eslint .",
15
+ "db:create": "node ./bin/database/create.js",
16
+ "db:seed:user": "node ./bin/database/seed-user.js",
17
+ "db:drop": "node ./bin/database/drop.js",
18
+ "db:migration:create": "knex migrate:make",
19
+ "db:rollback": "knex migrate:rollback",
20
+ "db:migrate": "node ./bin/database/convert-migrations.js && knex migrate:latest"
21
+ },
22
+ "dependencies": {
23
+ "@bull-board/express": "^3.10.1",
24
+ "@casl/ability": "^6.5.0",
25
+ "@graphql-tools/graphql-file-loader": "^7.3.4",
26
+ "@graphql-tools/load": "^7.5.2",
27
+ "@node-saml/passport-saml": "^4.0.4",
28
+ "@rudderstack/rudder-sdk-node": "^1.1.2",
29
+ "@sentry/node": "^7.42.0",
30
+ "@sentry/tracing": "^7.42.0",
31
+ "accounting": "^0.4.1",
32
+ "ajv-formats": "^2.1.1",
33
+ "axios": "1.6.0",
34
+ "bcrypt": "^5.1.0",
35
+ "bullmq": "^3.0.0",
36
+ "cors": "^2.8.5",
37
+ "crypto-js": "^4.1.1",
38
+ "debug": "~2.6.9",
39
+ "dotenv": "^10.0.0",
40
+ "express": "~4.18.2",
41
+ "express-async-handler": "^1.2.0",
42
+ "express-basic-auth": "^1.2.1",
43
+ "express-graphql": "^0.12.0",
44
+ "fast-xml-parser": "^4.0.11",
45
+ "graphql-middleware": "^6.1.15",
46
+ "graphql-shield": "^7.5.0",
47
+ "graphql-tools": "^8.2.0",
48
+ "handlebars": "^4.7.7",
49
+ "http-errors": "~1.6.3",
50
+ "http-proxy-agent": "^7.0.0",
51
+ "https-proxy-agent": "^7.0.1",
52
+ "jsonwebtoken": "^9.0.0",
53
+ "knex": "^2.4.0",
54
+ "libphonenumber-js": "^1.10.48",
55
+ "lodash.get": "^4.4.2",
56
+ "luxon": "2.5.2",
57
+ "memory-cache": "^0.2.0",
58
+ "morgan": "^1.10.0",
59
+ "multer": "1.4.5-lts.1",
60
+ "node-html-markdown": "^1.3.0",
61
+ "nodemailer": "6.7.0",
62
+ "oauth-1.0a": "^2.2.6",
63
+ "objection": "^3.0.0",
64
+ "passport": "^0.6.0",
65
+ "pg": "^8.7.1",
66
+ "php-serialize": "^4.0.2",
67
+ "pluralize": "^8.0.0",
68
+ "raw-body": "^2.5.2",
69
+ "showdown": "^2.1.0",
70
+ "uuid": "^9.0.1",
71
+ "winston": "^3.7.1",
72
+ "xmlrpc": "^1.3.2"
73
+ },
74
+ "contributors": [
75
+ {
76
+ "name": "automatisch contributors",
77
+ "url": "https://github.com/automatisch/automatisch/graphs/contributors"
78
+ }
79
+ ],
80
+ "homepage": "https://github.com/automatisch/automatisch#readme",
81
+ "main": "src/server",
82
+ "directories": {
83
+ "bin": "bin",
84
+ "src": "src",
85
+ "test": "__tests__"
86
+ },
87
+ "files": [
88
+ "bin",
89
+ "src"
90
+ ],
91
+ "repository": {
92
+ "type": "git",
93
+ "url": "git+https://github.com/automatisch/automatisch.git"
94
+ },
95
+ "bugs": {
96
+ "url": "https://github.com/automatisch/automatisch/issues"
97
+ },
98
+ "devDependencies": {
99
+ "node-gyp": "^10.1.0",
100
+ "nodemon": "^2.0.13",
101
+ "supertest": "^6.3.3",
102
+ "vitest": "^1.1.3"
103
+ },
104
+ "publishConfig": {
105
+ "access": "public"
106
+ }
107
+ }
packages/backend/src/app.js ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import createError from 'http-errors';
2
+ import express from 'express';
3
+ import cors from 'cors';
4
+
5
+ import appConfig from './config/app.js';
6
+ import corsOptions from './config/cors-options.js';
7
+ import morgan from './helpers/morgan.js';
8
+ import * as Sentry from './helpers/sentry.ee.js';
9
+ import appAssetsHandler from './helpers/app-assets-handler.js';
10
+ import webUIHandler from './helpers/web-ui-handler.js';
11
+ import errorHandler from './helpers/error-handler.js';
12
+ import './config/orm.js';
13
+ import {
14
+ createBullBoardHandler,
15
+ serverAdapter,
16
+ } from './helpers/create-bull-board-handler.js';
17
+ import injectBullBoardHandler from './helpers/inject-bull-board-handler.js';
18
+ import router from './routes/index.js';
19
+ import configurePassport from './helpers/passport.js';
20
+
21
+ createBullBoardHandler(serverAdapter);
22
+
23
+ const app = express();
24
+
25
+ Sentry.init(app);
26
+
27
+ Sentry.attachRequestHandler(app);
28
+ Sentry.attachTracingHandler(app);
29
+
30
+ injectBullBoardHandler(app, serverAdapter);
31
+
32
+ appAssetsHandler(app);
33
+
34
+ app.use(morgan);
35
+
36
+ app.use(
37
+ express.json({
38
+ limit: appConfig.requestBodySizeLimit,
39
+ verify(req, res, buf) {
40
+ req.rawBody = buf;
41
+ },
42
+ })
43
+ );
44
+ app.use(
45
+ express.urlencoded({
46
+ extended: true,
47
+ limit: appConfig.requestBodySizeLimit,
48
+ verify(req, res, buf) {
49
+ req.rawBody = buf;
50
+ },
51
+ })
52
+ );
53
+ app.use(cors(corsOptions));
54
+
55
+ configurePassport(app);
56
+
57
+ app.use('/', router);
58
+
59
+ webUIHandler(app);
60
+
61
+ // catch 404 and forward to error handler
62
+ app.use(function (req, res, next) {
63
+ next(createError(404));
64
+ });
65
+
66
+ Sentry.attachErrorHandler(app);
67
+
68
+ app.use(errorHandler);
69
+
70
+ export default app;
packages/backend/src/apps/airtable/actions/create-record/index.js ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import defineAction from '../../../../helpers/define-action.js';
2
+
3
+ export default defineAction({
4
+ name: 'Create record',
5
+ key: 'createRecord',
6
+ description: 'Creates a new record with fields that automatically populate.',
7
+ arguments: [
8
+ {
9
+ label: 'Base',
10
+ key: 'baseId',
11
+ type: 'dropdown',
12
+ required: true,
13
+ description: 'Base in which to create the record.',
14
+ variables: true,
15
+ source: {
16
+ type: 'query',
17
+ name: 'getDynamicData',
18
+ arguments: [
19
+ {
20
+ name: 'key',
21
+ value: 'listBases',
22
+ },
23
+ ],
24
+ },
25
+ },
26
+ {
27
+ label: 'Table',
28
+ key: 'tableId',
29
+ type: 'dropdown',
30
+ required: true,
31
+ dependsOn: ['parameters.baseId'],
32
+ description: '',
33
+ variables: true,
34
+ source: {
35
+ type: 'query',
36
+ name: 'getDynamicData',
37
+ arguments: [
38
+ {
39
+ name: 'key',
40
+ value: 'listTables',
41
+ },
42
+ {
43
+ name: 'parameters.baseId',
44
+ value: '{parameters.baseId}',
45
+ },
46
+ ],
47
+ },
48
+ additionalFields: {
49
+ type: 'query',
50
+ name: 'getDynamicFields',
51
+ arguments: [
52
+ {
53
+ name: 'key',
54
+ value: 'listFields',
55
+ },
56
+ {
57
+ name: 'parameters.baseId',
58
+ value: '{parameters.baseId}',
59
+ },
60
+ {
61
+ name: 'parameters.tableId',
62
+ value: '{parameters.tableId}',
63
+ },
64
+ ],
65
+ },
66
+ },
67
+ ],
68
+
69
+ async run($) {
70
+ const { baseId, tableId, ...rest } = $.step.parameters;
71
+
72
+ const fields = Object.entries(rest).reduce((result, [key, value]) => {
73
+ if (Array.isArray(value)) {
74
+ result[key] = value.map((item) => item.value);
75
+ } else if (value !== '') {
76
+ result[key] = value;
77
+ }
78
+ return result;
79
+ }, {});
80
+
81
+ const body = {
82
+ typecast: true,
83
+ fields,
84
+ };
85
+
86
+ const { data } = await $.http.post(`/v0/${baseId}/${tableId}`, body);
87
+
88
+ $.setActionItem({
89
+ raw: data,
90
+ });
91
+ },
92
+ });
packages/backend/src/apps/airtable/actions/find-record/index.js ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import defineAction from '../../../../helpers/define-action.js';
2
+ import { URLSearchParams } from 'url';
3
+
4
+ export default defineAction({
5
+ name: 'Find record',
6
+ key: 'findRecord',
7
+ description:
8
+ "Finds a record using simple field search or use Airtable's formula syntax to find a matching record.",
9
+ arguments: [
10
+ {
11
+ label: 'Base',
12
+ key: 'baseId',
13
+ type: 'dropdown',
14
+ required: true,
15
+ description: 'Base in which to create the record.',
16
+ variables: true,
17
+ source: {
18
+ type: 'query',
19
+ name: 'getDynamicData',
20
+ arguments: [
21
+ {
22
+ name: 'key',
23
+ value: 'listBases',
24
+ },
25
+ ],
26
+ },
27
+ },
28
+ {
29
+ label: 'Table',
30
+ key: 'tableId',
31
+ type: 'dropdown',
32
+ required: true,
33
+ dependsOn: ['parameters.baseId'],
34
+ description: '',
35
+ variables: true,
36
+ source: {
37
+ type: 'query',
38
+ name: 'getDynamicData',
39
+ arguments: [
40
+ {
41
+ name: 'key',
42
+ value: 'listTables',
43
+ },
44
+ {
45
+ name: 'parameters.baseId',
46
+ value: '{parameters.baseId}',
47
+ },
48
+ ],
49
+ },
50
+ },
51
+ {
52
+ label: 'Search by field',
53
+ key: 'tableField',
54
+ type: 'dropdown',
55
+ required: false,
56
+ dependsOn: ['parameters.baseId', 'parameters.tableId'],
57
+ description: '',
58
+ variables: true,
59
+ source: {
60
+ type: 'query',
61
+ name: 'getDynamicData',
62
+ arguments: [
63
+ {
64
+ name: 'key',
65
+ value: 'listTableFields',
66
+ },
67
+ {
68
+ name: 'parameters.baseId',
69
+ value: '{parameters.baseId}',
70
+ },
71
+ {
72
+ name: 'parameters.tableId',
73
+ value: '{parameters.tableId}',
74
+ },
75
+ ],
76
+ },
77
+ },
78
+ {
79
+ label: 'Search Value',
80
+ key: 'searchValue',
81
+ type: 'string',
82
+ required: false,
83
+ variables: true,
84
+ description:
85
+ 'The value of unique identifier for the record. For date values, please use the ISO format (e.g., "YYYY-MM-DD").',
86
+ },
87
+ {
88
+ label: 'Search for exact match?',
89
+ key: 'exactMatch',
90
+ type: 'dropdown',
91
+ required: true,
92
+ description: '',
93
+ variables: true,
94
+ options: [
95
+ { label: 'Yes', value: 'true' },
96
+ { label: 'No', value: 'false' },
97
+ ],
98
+ },
99
+ {
100
+ label: 'Search Formula',
101
+ key: 'searchFormula',
102
+ type: 'string',
103
+ required: false,
104
+ variables: true,
105
+ description:
106
+ 'Instead, you have the option to use an Airtable search formula for locating records according to sophisticated criteria and across various fields.',
107
+ },
108
+ {
109
+ label: 'Limit to View',
110
+ key: 'limitToView',
111
+ type: 'dropdown',
112
+ required: false,
113
+ dependsOn: ['parameters.baseId', 'parameters.tableId'],
114
+ description:
115
+ 'You have the choice to restrict the search to a particular view ID if desired.',
116
+ variables: true,
117
+ source: {
118
+ type: 'query',
119
+ name: 'getDynamicData',
120
+ arguments: [
121
+ {
122
+ name: 'key',
123
+ value: 'listTableViews',
124
+ },
125
+ {
126
+ name: 'parameters.baseId',
127
+ value: '{parameters.baseId}',
128
+ },
129
+ {
130
+ name: 'parameters.tableId',
131
+ value: '{parameters.tableId}',
132
+ },
133
+ ],
134
+ },
135
+ },
136
+ ],
137
+
138
+ async run($) {
139
+ const {
140
+ baseId,
141
+ tableId,
142
+ tableField,
143
+ searchValue,
144
+ exactMatch,
145
+ searchFormula,
146
+ limitToView,
147
+ } = $.step.parameters;
148
+
149
+ let filterByFormula;
150
+
151
+ if (tableField && searchValue) {
152
+ filterByFormula =
153
+ exactMatch === 'true'
154
+ ? `{${tableField}} = '${searchValue}'`
155
+ : `LOWER({${tableField}}) = LOWER('${searchValue}')`;
156
+ } else {
157
+ filterByFormula = searchFormula;
158
+ }
159
+
160
+ const body = new URLSearchParams({
161
+ filterByFormula,
162
+ view: limitToView,
163
+ });
164
+
165
+ const { data } = await $.http.post(
166
+ `/v0/${baseId}/${tableId}/listRecords`,
167
+ body
168
+ );
169
+
170
+ $.setActionItem({
171
+ raw: data,
172
+ });
173
+ },
174
+ });
packages/backend/src/apps/airtable/actions/index.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ import createRecord from './create-record/index.js';
2
+ import findRecord from './find-record/index.js';
3
+
4
+ export default [createRecord, findRecord];
packages/backend/src/apps/airtable/assets/favicon.svg ADDED
packages/backend/src/apps/airtable/auth/generate-auth-url.js ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import crypto from 'crypto';
2
+ import { URLSearchParams } from 'url';
3
+ import authScope from '../common/auth-scope.js';
4
+
5
+ export default async function generateAuthUrl($) {
6
+ const oauthRedirectUrlField = $.app.auth.fields.find(
7
+ (field) => field.key == 'oAuthRedirectUrl'
8
+ );
9
+ const redirectUri = oauthRedirectUrlField.value;
10
+ const state = crypto.randomBytes(100).toString('base64url');
11
+ const codeVerifier = crypto.randomBytes(96).toString('base64url');
12
+ const codeChallenge = crypto
13
+ .createHash('sha256')
14
+ .update(codeVerifier)
15
+ .digest('base64')
16
+ .replace(/=/g, '')
17
+ .replace(/\+/g, '-')
18
+ .replace(/\//g, '_');
19
+
20
+ const searchParams = new URLSearchParams({
21
+ client_id: $.auth.data.clientId,
22
+ redirect_uri: redirectUri,
23
+ response_type: 'code',
24
+ scope: authScope.join(' '),
25
+ state,
26
+ code_challenge: codeChallenge,
27
+ code_challenge_method: 'S256',
28
+ });
29
+
30
+ const url = `https://airtable.com/oauth2/v1/authorize?${searchParams.toString()}`;
31
+
32
+ await $.auth.set({
33
+ url,
34
+ originalCodeChallenge: codeChallenge,
35
+ originalState: state,
36
+ codeVerifier,
37
+ });
38
+ }
packages/backend/src/apps/airtable/auth/index.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import generateAuthUrl from './generate-auth-url.js';
2
+ import verifyCredentials from './verify-credentials.js';
3
+ import refreshToken from './refresh-token.js';
4
+ import isStillVerified from './is-still-verified.js';
5
+
6
+ export default {
7
+ fields: [
8
+ {
9
+ key: 'oAuthRedirectUrl',
10
+ label: 'OAuth Redirect URL',
11
+ type: 'string',
12
+ required: true,
13
+ readOnly: true,
14
+ value: '{WEB_APP_URL}/app/airtable/connections/add',
15
+ placeholder: null,
16
+ description:
17
+ 'When asked to input a redirect URL in Airtable, enter the URL above.',
18
+ clickToCopy: true,
19
+ },
20
+ {
21
+ key: 'clientId',
22
+ label: 'Client ID',
23
+ type: 'string',
24
+ required: true,
25
+ readOnly: false,
26
+ value: null,
27
+ placeholder: null,
28
+ description: null,
29
+ clickToCopy: false,
30
+ },
31
+ {
32
+ key: 'clientSecret',
33
+ label: 'Client Secret',
34
+ type: 'string',
35
+ required: true,
36
+ readOnly: false,
37
+ value: null,
38
+ placeholder: null,
39
+ description: null,
40
+ clickToCopy: false,
41
+ },
42
+ ],
43
+
44
+ generateAuthUrl,
45
+ verifyCredentials,
46
+ isStillVerified,
47
+ refreshToken,
48
+ };
packages/backend/src/apps/airtable/auth/is-still-verified.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ import getCurrentUser from '../common/get-current-user.js';
2
+
3
+ const isStillVerified = async ($) => {
4
+ const currentUser = await getCurrentUser($);
5
+ return !!currentUser.id;
6
+ };
7
+
8
+ export default isStillVerified;