diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a68fa5906..df24c2b9f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,6 +12,7 @@ jobs: backend: ${{ steps.backend.outputs.success }} database: ${{ steps.database.outputs.success }} dht-node: ${{ steps.dht-node.outputs.success }} + dlt-connector: ${{ steps.dlt-connector.outputs.success }} federation: ${{ steps.federation.outputs.success }} steps: - name: Checkout @@ -56,6 +57,12 @@ jobs: cd ./dht-node biome ci . echo "success=$([ $? -eq 0 ] && echo true || echo false)" >> $GITHUB_OUTPUT + - name: Lint - DLT Connector + id: dlt-connector + run: | + cd ./dlt-connector + biome ci . + echo "success=$([ $? -eq 0 ] && echo true || echo false)" >> $GITHUB_OUTPUT - name: Lint - Federation id: federation run: | @@ -111,6 +118,14 @@ jobs: - name: Check result from previous step run: if [ "${{ needs.lint.outputs.dht-node }}" != "true" ]; then exit 1; fi + lint_dlt_connector: + name: Lint - DLT Connector + needs: lint + runs-on: ubuntu-latest + steps: + - name: Check result from previous step + run: if [ "${{ needs.lint.outputs.dlt-connector }}" != "true" ]; then exit 1; fi + lint_federation: name: Lint - Federation needs: lint diff --git a/.github/workflows/test_backend.yml b/.github/workflows/test_backend.yml index c0e65078f..4098e8ae6 100644 --- a/.github/workflows/test_backend.yml +++ b/.github/workflows/test_backend.yml @@ -51,8 +51,8 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: docker-compose mariadb - run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps mariadb + - name: docker-compose mariadb redis + run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps mariadb redis - name: install bun uses: oven-sh/setup-bun@v2 @@ -92,19 +92,4 @@ jobs: bun install --global --no-save turbo@^2 - name: Backend | Typecheck - run: turbo backend#typecheck backend#build - - locales: - if: needs.files-changed.outputs.backend == 'true' - name: Locales - Backend - needs: files-changed - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: install bun - uses: oven-sh/setup-bun@v2 - - - name: Backend | Locales - run: cd backend && bun locales \ No newline at end of file + run: turbo backend#typecheck backend#build \ No newline at end of file diff --git a/.github/workflows/test_core.yml b/.github/workflows/test_core.yml index ff5f29c1a..f3857e2ae 100644 --- a/.github/workflows/test_core.yml +++ b/.github/workflows/test_core.yml @@ -43,3 +43,18 @@ jobs: - name: typecheck && unit test run: turbo core#test core#typecheck + locales: + if: needs.files-changed.outputs.core == 'true' + name: Locales - Core + needs: files-changed + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: install bun + uses: oven-sh/setup-bun@v2 + + - name: Core | Locales + run: cd core && bun locales + diff --git a/.github/workflows/test_database.yml b/.github/workflows/test_database.yml index 7c573d208..51bad45dc 100644 --- a/.github/workflows/test_database.yml +++ b/.github/workflows/test_database.yml @@ -49,7 +49,7 @@ jobs: node-version: '18.20.7' - name: Database | docker-compose - run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach mariadb + run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach mariadb redis - name: install bun uses: oven-sh/setup-bun@v2 diff --git a/.github/workflows/test_dht_node.yml b/.github/workflows/test_dht_node.yml index cbfbd2041..f2288f82c 100644 --- a/.github/workflows/test_dht_node.yml +++ b/.github/workflows/test_dht_node.yml @@ -48,8 +48,8 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: docker-compose mariadb - run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps mariadb + - name: docker-compose mariadb redis + run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps mariadb redis - name: install bun uses: oven-sh/setup-bun@v2 diff --git a/.github/workflows/test_dlt_connector.yml b/.github/workflows/test_dlt_connector.yml index 1123b2696..791d92586 100644 --- a/.github/workflows/test_dlt_connector.yml +++ b/.github/workflows/test_dlt_connector.yml @@ -28,17 +28,20 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + + - name: create .env + run: | + cd dlt-connector + cat < .env + GRADIDO_BLOCKCHAIN_CRYPTO_APP_SECRET=$(openssl rand -hex 16) + GRADIDO_BLOCKCHAIN_SERVER_CRYPTO_KEY=$(openssl rand -hex 16) + HOME_COMMUNITY_SEED=$(openssl rand -hex 32) + HIERO_OPERATOR_KEY=$(openssl rand -hex 32) + HIERO_OPERATOR_ID="0.0.2" + EOF - name: Build 'test' image - run: | - docker build --target test -t "gradido/dlt-connector:test" -f dlt-connector/Dockerfile . - docker save "gradido/dlt-connector:test" > /tmp/dlt-connector.tar - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: docker-dlt-connector-test - path: /tmp/dlt-connector.tar + run: docker build --target production -t "gradido/dlt-connector:productionTest" -f dlt-connector/Dockerfile . unit_test: name: Unit Tests - DLT Connector @@ -48,13 +51,21 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 - - - name: DLT-Connector | docker-compose mariadb - run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps mariadb + + - name: install bun + uses: oven-sh/setup-bun@v2 + with: + bun-version-file: '.bun-version' - - name: Sleep for 30 seconds - run: sleep 30s - shell: bash + - name: install dependencies + run: bun install --filter shared --frozen-lockfile && cd dlt-connector && bun install --frozen-lockfile + + - name: typecheck && unit test + run: | + export GRADIDO_BLOCKCHAIN_CRYPTO_APP_SECRET=$(openssl rand -hex 16) + export GRADIDO_BLOCKCHAIN_SERVER_CRYPTO_KEY=$(openssl rand -hex 16) + export HOME_COMMUNITY_SEED=$(openssl rand -hex 32) + export HIERO_OPERATOR_KEY=$(openssl rand -hex 32) + export HIERO_OPERATOR_ID="0.0.2" + cd dlt-connector && bun typecheck && bun test - - name: DLT-Connector | Unit tests - run: cd dlt-database && yarn && yarn build && cd ../dlt-connector && yarn && yarn test diff --git a/.github/workflows/test_e2e.yml b/.github/workflows/test_e2e.yml index a670e485d..249523c41 100644 --- a/.github/workflows/test_e2e.yml +++ b/.github/workflows/test_e2e.yml @@ -20,8 +20,8 @@ jobs: with: bun-version-file: '.bun-version' - - name: Boot up test system | docker-compose mariadb mailserver - run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach mariadb mailserver + - name: Boot up test system | docker-compose mariadb mailserver redis + run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach mariadb mailserver redis - name: Prepare test system run: | @@ -63,10 +63,11 @@ jobs: sudo nginx -t sudo systemctl start nginx - - name: wait for nginx and mailserver to be ready + - name: wait for nginx, mailserver and redis to be ready run: | until nc -z 127.0.0.1 80; do echo waiting for nginx; sleep 1; done; until nc -z 127.0.0.1 1025; do echo waiting for mailserver; sleep 1; done; + until nc -z 127.0.0.1 6379; do echo waiting for redis; sleep 1; done; - name: End-to-end tests | run tests id: e2e-tests @@ -125,8 +126,8 @@ jobs: with: bun-version-file: '.bun-version' - - name: Boot up test system | docker-compose mariadb mailserver - run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach mariadb mailserver + - name: Boot up test system | docker-compose mariadb mailserver redis + run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach mariadb mailserver redis - name: Prepare test system run: | @@ -169,10 +170,11 @@ jobs: sudo nginx -t sudo systemctl start nginx - - name: wait for nginx and mailserver to be ready + - name: wait for nginx, mailserver and redis to be ready run: | until nc -z 127.0.0.1 80; do echo waiting for nginx; sleep 1; done; until nc -z 127.0.0.1 1025; do echo waiting for mailserver; sleep 1; done; + until nc -z 127.0.0.1 6379; do echo waiting for redis; sleep 1; done; - name: End-to-end tests | run tests id: e2e-tests @@ -210,8 +212,8 @@ jobs: with: bun-version-file: '.bun-version' - - name: Boot up test system | docker-compose mariadb mailserver - run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach mariadb mailserver + - name: Boot up test system | docker-compose mariadb mailserver redis + run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach mariadb mailserver redis - name: Prepare test system run: | @@ -250,10 +252,11 @@ jobs: sudo nginx -t sudo systemctl start nginx - - name: wait for nginx and mailserver to be ready + - name: wait for nginx, mailserver and redis to be ready run: | until nc -z 127.0.0.1 80; do echo waiting for nginx; sleep 1; done; until nc -z 127.0.0.1 1025; do echo waiting for mailserver; sleep 1; done; + until nc -z 127.0.0.1 6379; do echo waiting for redis; sleep 1; done; - name: End-to-end tests | run tests id: e2e-tests diff --git a/.github/workflows/test_federation.yml b/.github/workflows/test_federation.yml index 6b461f215..b462151e7 100644 --- a/.github/workflows/test_federation.yml +++ b/.github/workflows/test_federation.yml @@ -48,8 +48,8 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: docker-compose mariadb - run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps mariadb + - name: docker-compose mariadb redis + run: docker compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps mariadb redis - name: install bun uses: oven-sh/setup-bun@v2 diff --git a/.gitmodules b/.gitmodules index 8b1378917..8bc8740e0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1 +1,4 @@ +[submodule "inspector"] + path = inspector + url = https://github.com/gradido/inspector.git diff --git a/dht-node/src/dht_node/@types/@hyperswarm__dht/index.d.ts b/@types/@hyperswarm__dht/index.d.ts similarity index 100% rename from dht-node/src/dht_node/@types/@hyperswarm__dht/index.d.ts rename to @types/@hyperswarm__dht/index.d.ts diff --git a/backend/@types/klicktipp-api/index.d.ts b/@types/klicktipp-api/index.d.ts similarity index 100% rename from backend/@types/klicktipp-api/index.d.ts rename to @types/klicktipp-api/index.d.ts diff --git a/backend/@types/random-bigint/index.d.ts b/@types/random-bigint/index.d.ts similarity index 100% rename from backend/@types/random-bigint/index.d.ts rename to @types/random-bigint/index.d.ts diff --git a/backend/@types/sodium-native/index.d.ts b/@types/sodium-native/index.d.ts similarity index 100% rename from backend/@types/sodium-native/index.d.ts rename to @types/sodium-native/index.d.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fa75018f..0cca591bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,35 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). -#### [v2.7.0](https://github.com/gradido/gradido/compare/v2.7.0...v2.7.0) +#### [v2.7.3](https://github.com/gradido/gradido/compare/v2.7.2...v2.7.3) -- fixes [`414ff8a`](https://github.com/gradido/gradido/commit/414ff8ac5a7477109f80123ccca5c4c8ed4511b2) +- feat(admin): show user registered at in admin [`#3589`](https://github.com/gradido/gradido/pull/3589) +- feat(backend): 3573 feature introduce distributed semaphore base on redis [`#3580`](https://github.com/gradido/gradido/pull/3580) +- fix(workflow): make deployment install script more robust [`#3588`](https://github.com/gradido/gradido/pull/3588) +- chore(release): v2.7.2 [`#3587`](https://github.com/gradido/gradido/pull/3587) + +#### [v2.7.2](https://github.com/gradido/gradido/compare/v2.7.0...v2.7.2) + +> 2 December 2025 + +- feat(frontend): success message on create contribution like on send [`#3583`](https://github.com/gradido/gradido/pull/3583) +- refactor(backend): rewrite seeding in database [`#3586`](https://github.com/gradido/gradido/pull/3586) +- fix(other): complete email tests and move localization complete into core [`#3585`](https://github.com/gradido/gradido/pull/3585) +- fix(workflow): editor warnings [`#3584`](https://github.com/gradido/gradido/pull/3584) +- fix(other): fix code which lead to biome linting errors [`#3582`](https://github.com/gradido/gradido/pull/3582) +- refactor(backend): moved email to core [`#3579`](https://github.com/gradido/gradido/pull/3579) +- refactor(database): stabilize entity loading across runtimes by introducing deferred relation resolution [`#3578`](https://github.com/gradido/gradido/pull/3578) +- chore(release): v2.7.1 [`#3577`](https://github.com/gradido/gradido/pull/3577) +- feat(frontend): new startpage images [`#3576`](https://github.com/gradido/gradido/pull/3576) +- feat(frontend): update login subtitle [`#3574`](https://github.com/gradido/gradido/pull/3574) +- feat(frontend): update copy symbol and change link order [`#3575`](https://github.com/gradido/gradido/pull/3575) +- fix(backend): correct seeding [`#3572`](https://github.com/gradido/gradido/pull/3572) +- feat(dlt): dlt-connector takes care of gradido node [`#3568`](https://github.com/gradido/gradido/pull/3568) +- refactor(dlt): upgrade dlt for using gradido blockchain lib and hiero [`#3551`](https://github.com/gradido/gradido/pull/3551) +- chore(release): v2.7.0 [`#3557`](https://github.com/gradido/gradido/pull/3557) +- feat(federation): use own table for handshake state [`#3555`](https://github.com/gradido/gradido/pull/3555) +- fix(workflow): use bun instead of yarn [`#3550`](https://github.com/gradido/gradido/pull/3550) +- feat(workflow): adjust for new bun version [`#3554`](https://github.com/gradido/gradido/pull/3554) #### [v2.7.0](https://github.com/gradido/gradido/compare/2.6.1...v2.7.0) diff --git a/README.md b/README.md index 9abb4eb90..a36be6e19 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Clone the Gradido repository to your local machine. ```bash git clone https://github.com/gradido/gradido.git cd gradido +git submodule update --init --recursive ``` For local development, you can run Gradido with **Docker** or **natively**, depending on your preferences and system setup. If you don't have a native MariaDB or MySQL installation, Docker can be used to handle the database as well. @@ -105,6 +106,22 @@ turbo start [More Infos for using turbo](./working-native.md) +### Dependencies & Bundling +This project uses esbuild to bundle the main modules (backend, dht-node, federation) into single JavaScript files for optimized deployment. To ensure a minimal and reliable Docker image, dependencies are intentionally split: + +- dependencies: Only packages that cannot be bundled by esbuild into the output files. +Examples include: + - Native modules (sodium-native) + - Packages incompatible with bundling (email-templates) + - Runtime helpers (cross-env) +- devDependencies: All other packages that are fully bundled into the build output by esbuild. + +This setup ensures that: +- The production Docker image contains only the minimal set of necessary runtime modules. +- Native or runtime-sensitive packages are included in node_modules for proper execution. + +Note: Even if Docker is not used in all environments, this organization ensures consistent and predictable builds across different platforms. + ### For Windows @@ -189,11 +206,11 @@ describe('test', () => { ```ts import { clearLogs, printLogs } from 'config-schema/test/testSetup' ``` -- vitest (frontend, admin, database): +- vitest (frontend, admin): ```ts import { clearLogs, printLogs } from 'config-schema/test/testSetup.vitest' ``` -- bun (shared, core): +- bun (shared, core, database): ```ts import { clearLogs, printLogs } from 'config-schema/test/testSetup.bun' ``` @@ -211,6 +228,16 @@ In root folder calling `bun clear` will clear all turbo caches, node_modules and bun clear ``` +### git Submodule +The new Module `inspector` was added as git submodule. +So after +- `git clone` +- `git checkout` +- `git pull` + +you have to run `git submodule update --init` to get the correct submodule version. + +[Read More](https://git-scm.com/book/en/v2/Git-Tools-Submodules) ## Services defined in this package diff --git a/admin/package.json b/admin/package.json index 672da9425..062594ccc 100644 --- a/admin/package.json +++ b/admin/package.json @@ -3,7 +3,7 @@ "description": "Administration Interface for Gradido", "main": "index.js", "author": "Gradido Academy - https://www.gradido.net", - "version": "2.7.0", + "version": "2.7.3", "license": "Apache-2.0", "scripts": { "dev": "vite", diff --git a/admin/src/components/Tables/SearchUserTable.vue b/admin/src/components/Tables/SearchUserTable.vue index 1a92962e3..9bca3745b 100644 --- a/admin/src/components/Tables/SearchUserTable.vue +++ b/admin/src/components/Tables/SearchUserTable.vue @@ -16,6 +16,10 @@
+ +