- MeshChatX
-diff --git a/.gitea/workflows/bearer-pr.yml b/.gitea/workflows/bearer-pr.yml index f8fe964..5456998 100644 --- a/.gitea/workflows/bearer-pr.yml +++ b/.gitea/workflows/bearer-pr.yml @@ -1,20 +1,20 @@ name: Bearer PR Check on: - pull_request: - types: [opened, synchronize, reopened] + pull_request: + types: [opened, synchronize, reopened] permissions: - security-events: write + security-events: write jobs: - rule_check: - runs-on: ubuntu-latest + rule_check: + runs-on: ubuntu-latest - steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + steps: + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - name: Bearer - uses: bearer/bearer-action@828eeb928ce2f4a7ca5ed57fb8b59508cb8c79bc # v2 - with: - diff: true + - name: Bearer + uses: bearer/bearer-action@828eeb928ce2f4a7ca5ed57fb8b59508cb8c79bc # v2 + with: + diff: true diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 6cdbc4a..af825b5 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -1,343 +1,343 @@ name: Build and Release on: - push: - tags: - - "*" - workflow_dispatch: - inputs: - build_windows: - description: 'Build Windows' - required: false - default: 'true' - type: boolean - build_mac: - description: 'Build macOS' - required: false - default: 'true' - type: boolean - build_linux: - description: 'Build Linux' - required: false - default: 'true' - type: boolean - build_docker: - description: 'Build Docker' - required: false - default: 'true' - type: boolean + push: + tags: + - "*" + workflow_dispatch: + inputs: + build_windows: + description: "Build Windows" + required: false + default: "true" + type: boolean + build_mac: + description: "Build macOS" + required: false + default: "true" + type: boolean + build_linux: + description: "Build Linux" + required: false + default: "true" + type: boolean + build_docker: + description: "Build Docker" + required: false + default: "true" + type: boolean permissions: - contents: read + contents: read jobs: - build_frontend: - runs-on: ubuntu-latest - permissions: - contents: read - steps: - - name: Clone Repo - uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e # v1 + build_frontend: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Clone Repo + uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e # v1 - - name: Install NodeJS - uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1 - with: - node-version: 22 + - name: Install NodeJS + uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1 + with: + node-version: 22 - - name: Install Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 - with: - python-version: "3.12" + - name: Install Python + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + with: + python-version: "3.12" - - name: Sync versions - run: python scripts/sync_version.py + - name: Sync versions + run: python scripts/sync_version.py - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: 9 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 - - name: Install NodeJS Deps - run: pnpm install + - name: Install NodeJS Deps + run: pnpm install - - name: Build Frontend - run: pnpm run build-frontend + - name: Build Frontend + run: pnpm run build-frontend - - name: Upload frontend artifact - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 - with: - name: frontend-build - path: meshchatx/public - if-no-files-found: error + - name: Upload frontend artifact + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + with: + name: frontend-build + path: meshchatx/public + if-no-files-found: error - build_desktop: - name: Build Desktop (${{ matrix.name }}) - needs: build_frontend - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - include: - - name: windows - os: windows-latest - node: 22 - python: "3.13" - release_artifacts: "dist/*-win-installer.exe,dist/*-win-portable.exe" - build_input: build_windows - dist_script: dist-prebuilt - variant: standard - electron_version: "39.2.4" - - name: mac - os: macos-14 - node: 22 - python: "3.13" - release_artifacts: "dist/*-mac-*.dmg" - build_input: build_mac - dist_script: dist:mac-universal - variant: standard - electron_version: "39.2.4" - - name: linux - os: ubuntu-latest - node: 22 - python: "3.13" - release_artifacts: "dist/*-linux.AppImage,dist/*-linux.deb,python-dist/*.whl" - build_input: build_linux - dist_script: dist-prebuilt - variant: standard - electron_version: "39.2.4" - - name: windows-legacy - os: windows-latest - node: 18 - python: "3.11" - release_artifacts: "dist/*-win-installer*.exe,dist/*-win-portable*.exe" - build_input: build_windows - dist_script: dist-prebuilt - variant: legacy - electron_version: "30.0.8" - - name: linux-legacy - os: ubuntu-latest - node: 18 - python: "3.11" - release_artifacts: "dist/*-linux*.AppImage,dist/*-linux*.deb,python-dist/*.whl" - build_input: build_linux - dist_script: dist-prebuilt - variant: legacy - electron_version: "30.0.8" - permissions: - contents: write - steps: - - name: Clone Repo - if: | - github.event_name == 'push' || - (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) - uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e # v1 + build_desktop: + name: Build Desktop (${{ matrix.name }}) + needs: build_frontend + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - name: windows + os: windows-latest + node: 22 + python: "3.13" + release_artifacts: "dist/*-win-installer.exe,dist/*-win-portable.exe" + build_input: build_windows + dist_script: dist-prebuilt + variant: standard + electron_version: "39.2.4" + - name: mac + os: macos-14 + node: 22 + python: "3.13" + release_artifacts: "dist/*-mac-*.dmg" + build_input: build_mac + dist_script: dist:mac-universal + variant: standard + electron_version: "39.2.4" + - name: linux + os: ubuntu-latest + node: 22 + python: "3.13" + release_artifacts: "dist/*-linux.AppImage,dist/*-linux.deb,python-dist/*.whl" + build_input: build_linux + dist_script: dist-prebuilt + variant: standard + electron_version: "39.2.4" + - name: windows-legacy + os: windows-latest + node: 18 + python: "3.11" + release_artifacts: "dist/*-win-installer*.exe,dist/*-win-portable*.exe" + build_input: build_windows + dist_script: dist-prebuilt + variant: legacy + electron_version: "30.0.8" + - name: linux-legacy + os: ubuntu-latest + node: 18 + python: "3.11" + release_artifacts: "dist/*-linux*.AppImage,dist/*-linux*.deb,python-dist/*.whl" + build_input: build_linux + dist_script: dist-prebuilt + variant: legacy + electron_version: "30.0.8" + permissions: + contents: write + steps: + - name: Clone Repo + if: | + github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) + uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e # v1 - - name: Set legacy Electron version - if: | - matrix.variant == 'legacy' && - (github.event_name == 'push' || - (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)) - shell: bash - run: | - node -e "const fs=require('fs');const pkg=require('./package.json');pkg.devDependencies.electron='${{ matrix.electron_version }}';fs.writeFileSync('package.json', JSON.stringify(pkg,null,2));" - if [ -f pnpm-lock.yaml ]; then rm pnpm-lock.yaml; fi + - name: Set legacy Electron version + if: | + matrix.variant == 'legacy' && + (github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)) + shell: bash + run: | + node -e "const fs=require('fs');const pkg=require('./package.json');pkg.devDependencies.electron='${{ matrix.electron_version }}';fs.writeFileSync('package.json', JSON.stringify(pkg,null,2));" + if [ -f pnpm-lock.yaml ]; then rm pnpm-lock.yaml; fi - - name: Install NodeJS - if: | - github.event_name == 'push' || - (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) - uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1 - with: - node-version: ${{ matrix.node }} + - name: Install NodeJS + if: | + github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) + uses: actions/setup-node@f1f314fca9dfce2769ece7d933488f076716723e # v1 + with: + node-version: ${{ matrix.node }} - - name: Install Python - if: | - github.event_name == 'push' || - (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 - with: - python-version: ${{ matrix.python }} + - name: Install Python + if: | + github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) + uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + with: + python-version: ${{ matrix.python }} - - name: Install Poetry - if: | - github.event_name == 'push' || - (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) - run: python -m pip install --upgrade pip poetry + - name: Install Poetry + if: | + github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) + run: python -m pip install --upgrade pip poetry - - name: Sync versions - if: | - github.event_name == 'push' || - (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) - run: python scripts/sync_version.py + - name: Sync versions + if: | + github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) + run: python scripts/sync_version.py - - name: Install Python Deps - if: | - github.event_name == 'push' || - (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) - run: python -m poetry install + - name: Install Python Deps + if: | + github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) + run: python -m poetry install - - name: Install pnpm - if: | - github.event_name == 'push' || - (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) - uses: pnpm/action-setup@v4 - with: - version: 9 + - name: Install pnpm + if: | + github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) + uses: pnpm/action-setup@v4 + with: + version: 9 - - name: Install NodeJS Deps - if: | - github.event_name == 'push' || - (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) - run: pnpm install + - name: Install NodeJS Deps + if: | + github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) + run: pnpm install - - name: Prepare frontend directory - if: | - github.event_name == 'push' || - (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) - run: python scripts/prepare_frontend_dir.py + - name: Prepare frontend directory + if: | + github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) + run: python scripts/prepare_frontend_dir.py - - name: Download frontend artifact - if: | - github.event_name == 'push' || - (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 - with: - name: frontend-build - path: meshchatx/public + - name: Download frontend artifact + if: | + github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + with: + name: frontend-build + path: meshchatx/public - - name: Install patchelf - if: | - startsWith(matrix.name, 'linux') && - (github.event_name == 'push' || - (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)) - run: sudo apt-get update && sudo apt-get install -y patchelf + - name: Install patchelf + if: | + startsWith(matrix.name, 'linux') && + (github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)) + run: sudo apt-get update && sudo apt-get install -y patchelf - - name: Build Python wheel - if: | - startsWith(matrix.name, 'linux') && - (github.event_name == 'push' || - (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)) - run: | - python -m poetry build -f wheel - mkdir -p python-dist - mv dist/*.whl python-dist/ - rm -rf dist + - name: Build Python wheel + if: | + startsWith(matrix.name, 'linux') && + (github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)) + run: | + python -m poetry build -f wheel + mkdir -p python-dist + mv dist/*.whl python-dist/ + rm -rf dist - - name: Build Electron App (Universal) - if: | - github.event_name == 'push' || - (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) - run: pnpm run ${{ matrix.dist_script }} + - name: Build Electron App (Universal) + if: | + github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) + run: pnpm run ${{ matrix.dist_script }} - - name: Rename artifacts for legacy build - if: | - matrix.variant == 'legacy' && - (github.event_name == 'push' || - (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)) - run: ./scripts/rename_legacy_artifacts.sh + - name: Rename artifacts for legacy build + if: | + matrix.variant == 'legacy' && + (github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true)) + run: ./scripts/rename_legacy_artifacts.sh - - name: Upload build artifacts - if: | - github.event_name == 'push' || - (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) - uses: actions/upload-artifact@v4 - with: - name: build-${{ matrix.name }} - path: | - dist/*-win-installer*.exe - dist/*-win-portable*.exe - dist/*-mac-*.dmg - dist/*-linux*.AppImage - dist/*-linux*.deb - python-dist/*.whl - if-no-files-found: ignore + - name: Upload build artifacts + if: | + github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && inputs[matrix.build_input] == true) + uses: actions/upload-artifact@v4 + with: + name: build-${{ matrix.name }} + path: | + dist/*-win-installer*.exe + dist/*-win-portable*.exe + dist/*-mac-*.dmg + dist/*-linux*.AppImage + dist/*-linux*.deb + python-dist/*.whl + if-no-files-found: ignore - create_release: - name: Create Release - needs: build_desktop - runs-on: ubuntu-latest - if: github.event_name == 'push' - permissions: - contents: write - steps: - - name: Download all artifacts - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 - with: - path: artifacts + create_release: + name: Create Release + needs: build_desktop + runs-on: ubuntu-latest + if: github.event_name == 'push' + permissions: + contents: write + steps: + - name: Download all artifacts + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + with: + path: artifacts - - name: Display structure of downloaded files - run: ls -R artifacts + - name: Display structure of downloaded files + run: ls -R artifacts - - name: Prepare release assets - run: | - mkdir -p release-assets - find artifacts -type f \( -name "*.exe" -o -name "*.dmg" -o -name "*.AppImage" -o -name "*.deb" -o -name "*.whl" \) -exec cp {} release-assets/ \; - ls -lh release-assets/ + - name: Prepare release assets + run: | + mkdir -p release-assets + find artifacts -type f \( -name "*.exe" -o -name "*.dmg" -o -name "*.AppImage" -o -name "*.deb" -o -name "*.whl" \) -exec cp {} release-assets/ \; + ls -lh release-assets/ - - name: Generate SHA256 checksums - run: | - cd release-assets - echo "## SHA256 Checksums" > release-body.md - echo "" >> release-body.md + - name: Generate SHA256 checksums + run: | + cd release-assets + echo "## SHA256 Checksums" > release-body.md + echo "" >> release-body.md - for file in *.exe *.dmg *.AppImage *.deb *.whl; do - if [ -f "$file" ]; then - sha256sum "$file" | tee "${file}.sha256" - echo "\`$(cat "${file}.sha256")\`" >> release-body.md - fi - done - - echo "" >> release-body.md - echo "Individual \`.sha256\` files are included for each artifact." >> release-body.md - - cat release-body.md - echo "" - echo "Generated .sha256 files:" - ls -1 *.sha256 2>/dev/null || echo "No .sha256 files found" + for file in *.exe *.dmg *.AppImage *.deb *.whl; do + if [ -f "$file" ]; then + sha256sum "$file" | tee "${file}.sha256" + echo "\`$(cat "${file}.sha256")\`" >> release-body.md + fi + done - - name: Create Release - uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1 - with: - draft: true - artifacts: "release-assets/*" - bodyFile: "release-assets/release-body.md" + echo "" >> release-body.md + echo "Individual \`.sha256\` files are included for each artifact." >> release-body.md - build_docker: - runs-on: ubuntu-latest - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.build_docker == 'true') - permissions: - packages: write - contents: read - steps: - - name: Clone Repo - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + cat release-body.md + echo "" + echo "Generated .sha256 files:" + ls -1 *.sha256 2>/dev/null || echo "No .sha256 files found" - - name: Set lowercase repository owner - run: echo "REPO_OWNER_LC=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV + - name: Create Release + uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1 + with: + draft: true + artifacts: "release-assets/*" + bodyFile: "release-assets/release-body.md" - - name: Set up QEMU - uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3 + build_docker: + runs-on: ubuntu-latest + if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.build_docker == 'true') + permissions: + packages: write + contents: read + steps: + - name: Clone Repo + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3 + - name: Set lowercase repository owner + run: echo "REPO_OWNER_LC=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV - - name: Log in to the GitHub Container registry - uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3 - - name: Build and push Docker images - uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5 - with: - context: . - platforms: linux/amd64,linux/arm64 - push: true - tags: >- - ghcr.io/${{ env.REPO_OWNER_LC }}/reticulum-meshchatx:latest, - ghcr.io/${{ env.REPO_OWNER_LC }}/reticulum-meshchatx:${{ github.ref_name }} - labels: >- - org.opencontainers.image.title=Reticulum MeshChatX, - org.opencontainers.image.description=Docker image for Reticulum MeshChatX, - org.opencontainers.image.url=https://github.com/${{ github.repository }}/pkgs/container/reticulum-meshchatx/ + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3 + + - name: Log in to the GitHub Container registry + uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker images + uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: >- + ghcr.io/${{ env.REPO_OWNER_LC }}/reticulum-meshchatx:latest, + ghcr.io/${{ env.REPO_OWNER_LC }}/reticulum-meshchatx:${{ github.ref_name }} + labels: >- + org.opencontainers.image.title=Reticulum MeshChatX, + org.opencontainers.image.description=Docker image for Reticulum MeshChatX, + org.opencontainers.image.url=https://github.com/${{ github.repository }}/pkgs/container/reticulum-meshchatx/ diff --git a/.gitea/workflows/dependency-review.yml b/.gitea/workflows/dependency-review.yml index af9b511..f94e9ab 100644 --- a/.gitea/workflows/dependency-review.yml +++ b/.gitea/workflows/dependency-review.yml @@ -1,22 +1,22 @@ -name: 'Dependency review' +name: "Dependency review" on: - pull_request: - branches: [ "master" ] + pull_request: + branches: ["master"] permissions: - contents: read - pull-requests: write + contents: read + pull-requests: write jobs: - dependency-review: - runs-on: ubuntu-latest + dependency-review: + runs-on: ubuntu-latest - steps: - - name: 'Checkout repository' - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + steps: + - name: "Checkout repository" + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - - name: 'Dependency Review' - uses: actions/dependency-review-action@3c4e3dcb1aa7874d2c16be7d79418e9b7efd6261 # v4 - with: - comment-summary-in-pr: always \ No newline at end of file + - name: "Dependency Review" + uses: actions/dependency-review-action@3c4e3dcb1aa7874d2c16be7d79418e9b7efd6261 # v4 + with: + comment-summary-in-pr: always diff --git a/.prettierrc b/.prettierrc index d6974cc..36426ec 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,9 +1,8 @@ { - "semi": true, - "tabWidth": 4, - "singleQuote": false, - "printWidth": 120, - "trailingComma": "es5", - "endOfLine": "auto" + "semi": true, + "tabWidth": 4, + "singleQuote": false, + "printWidth": 120, + "trailingComma": "es5", + "endOfLine": "auto" } - diff --git a/README.md b/README.md index 4e7707c..3608477 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,13 @@ A heavily customized and updated fork of [Reticulum MeshChat](https://github.com/liamcottle/reticulum-meshchat). +This project is seperate from the original Reticulum MeshChat project, and is not affiliated with the original project. + ## Features of this Fork ### Major -- Full LXST support. +- Full LXST support w/ custom voicemail support. - Map (w/ MBTiles support for offline) - Security improvements - Custom UI/UX @@ -27,12 +29,12 @@ A heavily customized and updated fork of [Reticulum MeshChat](https://github.com - [ ] Spam filter (based on keywords) - [ ] Multi-identity support. - [ ] TAK tool/integration -- [ ] RNS Tunnel - tunnel your regular services over RNS to another MeshchatX user. +- [ ] RNS Tunnel - tunnel your regular services over RNS to another MeshchatX user. - [ ] RNS Filesync - P2P file sync ## Usage -Check [releases](https://git.quad4.io/RNS-Things/reticulum-meshchatX/releases) for pre-built binaries or appimages. +Check [releases](https://git.quad4.io/Ivan/MeshChatX/releases) for pre-built binaries or appimages. ## Building @@ -47,28 +49,29 @@ You can run `task run` or `task develop` (a thin alias) to start the backend + f ### Available Tasks -| Task | Description | -|------|-------------| -| `task install` | Install all dependencies (syncs version, installs node modules and python deps) | -| `task node_modules` | Install Node.js dependencies only | -| `task python` | Install Python dependencies using Poetry only | -| `task sync-version` | Sync version numbers across project files | -| `task run` | Run the application | -| `task develop` | Run the application in development mode (alias for `run`) | -| `task build` | Build the application (frontend and backend) | -| `task build-frontend` | Build only the frontend | -| `task clean` | Clean build artifacts and dependencies | -| `task wheel` | Build Python wheel package (outputs to `python-dist/`) | -| `task build-appimage` | Build Linux AppImage | -| `task build-exe` | Build Windows portable executable | -| `task dist` | Build distribution (defaults to AppImage) | -| `task electron-legacy` | Install legacy Electron version | -| `task build-appimage-legacy` | Build Linux AppImage with legacy Electron version | -| `task build-exe-legacy` | Build Windows portable executable with legacy Electron version | -| `task build-docker` | Build Docker image using buildx | -| `task run-docker` | Run Docker container using docker-compose | +| Task | Description | +| ---------------------------- | ------------------------------------------------------------------------------- | +| `task install` | Install all dependencies (syncs version, installs node modules and python deps) | +| `task node_modules` | Install Node.js dependencies only | +| `task python` | Install Python dependencies using Poetry only | +| `task sync-version` | Sync version numbers across project files | +| `task run` | Run the application | +| `task develop` | Run the application in development mode (alias for `run`) | +| `task build` | Build the application (frontend and backend) | +| `task build-frontend` | Build only the frontend | +| `task clean` | Clean build artifacts and dependencies | +| `task wheel` | Build Python wheel package (outputs to `python-dist/`) | +| `task build-appimage` | Build Linux AppImage | +| `task build-exe` | Build Windows portable executable | +| `task dist` | Build distribution (defaults to AppImage) | +| `task electron-legacy` | Install legacy Electron version | +| `task build-appimage-legacy` | Build Linux AppImage with legacy Electron version | +| `task build-exe-legacy` | Build Windows portable executable with legacy Electron version | +| `task build-docker` | Build Docker image using buildx | +| `task run-docker` | Run Docker container using docker-compose | All tasks support environment variable overrides. For example: + - `PYTHON=python3.12 task install` - `DOCKER_PLATFORMS=linux/amd64,linux/arm64 task build-docker` @@ -130,11 +133,12 @@ The `cx_setup.py` script uses cx_Freeze for creating standalone executables (App ## Internationalization (i18n) -Multi-language support is in progress. We use `vue-i18n` for the frontend. +Multi-language support is in progress. We use `vue-i18n` for the frontend. Translation files are located in `meshchatx/src/frontend/locales/`. Currently supported languages: + - English (Primary) - Russian -- German \ No newline at end of file +- German diff --git a/Taskfile.yml b/Taskfile.yml index f4fc95a..02f99c6 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -1,153 +1,153 @@ -version: '3' +version: "3" vars: - PYTHON: - sh: echo "${PYTHON:-python}" - NPM: - sh: echo "${NPM:-pnpm}" - LEGACY_ELECTRON_VERSION: - sh: echo "${LEGACY_ELECTRON_VERSION:-30.0.8}" - DOCKER_COMPOSE_CMD: - sh: echo "${DOCKER_COMPOSE_CMD:-docker compose}" - DOCKER_COMPOSE_FILE: - sh: echo "${DOCKER_COMPOSE_FILE:-docker-compose.yml}" - DOCKER_IMAGE: - sh: echo "${DOCKER_IMAGE:-reticulum-meshchatx:local}" - DOCKER_BUILDER: - sh: echo "${DOCKER_BUILDER:-meshchatx-builder}" - DOCKER_PLATFORMS: - sh: echo "${DOCKER_PLATFORMS:-linux/amd64}" - DOCKER_BUILD_FLAGS: - sh: echo "${DOCKER_BUILD_FLAGS:---load}" - DOCKER_BUILD_ARGS: - sh: echo "${DOCKER_BUILD_ARGS:-}" - DOCKER_CONTEXT: - sh: echo "${DOCKER_CONTEXT:-.}" - DOCKERFILE: - sh: echo "${DOCKERFILE:-Dockerfile}" + PYTHON: + sh: echo "${PYTHON:-python}" + NPM: + sh: echo "${NPM:-pnpm}" + LEGACY_ELECTRON_VERSION: + sh: echo "${LEGACY_ELECTRON_VERSION:-30.0.8}" + DOCKER_COMPOSE_CMD: + sh: echo "${DOCKER_COMPOSE_CMD:-docker compose}" + DOCKER_COMPOSE_FILE: + sh: echo "${DOCKER_COMPOSE_FILE:-docker-compose.yml}" + DOCKER_IMAGE: + sh: echo "${DOCKER_IMAGE:-reticulum-meshchatx:local}" + DOCKER_BUILDER: + sh: echo "${DOCKER_BUILDER:-meshchatx-builder}" + DOCKER_PLATFORMS: + sh: echo "${DOCKER_PLATFORMS:-linux/amd64}" + DOCKER_BUILD_FLAGS: + sh: echo "${DOCKER_BUILD_FLAGS:---load}" + DOCKER_BUILD_ARGS: + sh: echo "${DOCKER_BUILD_ARGS:-}" + DOCKER_CONTEXT: + sh: echo "${DOCKER_CONTEXT:-.}" + DOCKERFILE: + sh: echo "${DOCKERFILE:-Dockerfile}" tasks: - default: - desc: Show available tasks - cmds: - - task --list + default: + desc: Show available tasks + cmds: + - task --list - install: - desc: Install all dependencies (syncs version, installs node modules and python deps) - deps: [sync-version, node_modules, python] + install: + desc: Install all dependencies (syncs version, installs node modules and python deps) + deps: [sync-version, node_modules, python] - node_modules: - desc: Install Node.js dependencies - cmds: - - '{{.NPM}} install' + node_modules: + desc: Install Node.js dependencies + cmds: + - "{{.NPM}} install" - python: - desc: Install Python dependencies using Poetry - cmds: - - '{{.PYTHON}} -m poetry install' + python: + desc: Install Python dependencies using Poetry + cmds: + - "{{.PYTHON}} -m poetry install" - run: - desc: Run the application - deps: [install] - cmds: - - '{{.PYTHON}} -m poetry run meshchat' + run: + desc: Run the application + deps: [install] + cmds: + - "{{.PYTHON}} -m poetry run meshchat" - develop: - desc: Run the application in development mode - cmds: - - task: run + develop: + desc: Run the application in development mode + cmds: + - task: run - build: - desc: Build the application (frontend and backend) - deps: [install] - cmds: - - '{{.NPM}} run build' + build: + desc: Build the application (frontend and backend) + deps: [install] + cmds: + - "{{.NPM}} run build" - build-frontend: - desc: Build only the frontend - deps: [node_modules] - cmds: - - '{{.NPM}} run build-frontend' + build-frontend: + desc: Build only the frontend + deps: [node_modules] + cmds: + - "{{.NPM}} run build-frontend" - wheel: - desc: Build Python wheel package - deps: [install] - cmds: - - '{{.PYTHON}} -m poetry build -f wheel' - - '{{.PYTHON}} scripts/move_wheels.py' + wheel: + desc: Build Python wheel package + deps: [install] + cmds: + - "{{.PYTHON}} -m poetry build -f wheel" + - "{{.PYTHON}} scripts/move_wheels.py" - build-appimage: - desc: Build Linux AppImage - deps: [build] - cmds: - - '{{.NPM}} run electron-postinstall' - - '{{.NPM}} run dist -- --linux AppImage' + build-appimage: + desc: Build Linux AppImage + deps: [build] + cmds: + - "{{.NPM}} run electron-postinstall" + - "{{.NPM}} run dist -- --linux AppImage" - build-exe: - desc: Build Windows portable executable - deps: [build] - cmds: - - '{{.NPM}} run electron-postinstall' - - '{{.NPM}} run dist -- --win portable' + build-exe: + desc: Build Windows portable executable + deps: [build] + cmds: + - "{{.NPM}} run electron-postinstall" + - "{{.NPM}} run dist -- --win portable" - dist: - desc: Build distribution (defaults to AppImage) - cmds: - - task: build-appimage + dist: + desc: Build distribution (defaults to AppImage) + cmds: + - task: build-appimage - electron-legacy: - desc: Install legacy Electron version - cmds: - - '{{.NPM}} install --no-save electron@{{.LEGACY_ELECTRON_VERSION}}' + electron-legacy: + desc: Install legacy Electron version + cmds: + - "{{.NPM}} install --no-save electron@{{.LEGACY_ELECTRON_VERSION}}" - build-appimage-legacy: - desc: Build Linux AppImage with legacy Electron version - deps: [build, electron-legacy] - cmds: - - '{{.NPM}} run electron-postinstall' - - '{{.NPM}} run dist -- --linux AppImage' - - './scripts/rename_legacy_artifacts.sh' + build-appimage-legacy: + desc: Build Linux AppImage with legacy Electron version + deps: [build, electron-legacy] + cmds: + - "{{.NPM}} run electron-postinstall" + - "{{.NPM}} run dist -- --linux AppImage" + - "./scripts/rename_legacy_artifacts.sh" - build-exe-legacy: - desc: Build Windows portable executable with legacy Electron version - deps: [build, electron-legacy] - cmds: - - '{{.NPM}} run electron-postinstall' - - '{{.NPM}} run dist -- --win portable' - - './scripts/rename_legacy_artifacts.sh' + build-exe-legacy: + desc: Build Windows portable executable with legacy Electron version + deps: [build, electron-legacy] + cmds: + - "{{.NPM}} run electron-postinstall" + - "{{.NPM}} run dist -- --win portable" + - "./scripts/rename_legacy_artifacts.sh" - clean: - desc: Clean build artifacts and dependencies - cmds: - - rm -rf node_modules - - rm -rf build - - rm -rf dist - - rm -rf python-dist - - rm -rf meshchatx/public + clean: + desc: Clean build artifacts and dependencies + cmds: + - rm -rf node_modules + - rm -rf build + - rm -rf dist + - rm -rf python-dist + - rm -rf meshchatx/public - sync-version: - desc: Sync version numbers across project files - cmds: - - '{{.PYTHON}} scripts/sync_version.py' + sync-version: + desc: Sync version numbers across project files + cmds: + - "{{.PYTHON}} scripts/sync_version.py" - build-docker: - desc: Build Docker image using buildx - cmds: - - | - if ! docker buildx inspect {{.DOCKER_BUILDER}} >/dev/null 2>&1; then - docker buildx create --name {{.DOCKER_BUILDER}} --use >/dev/null - else - docker buildx use {{.DOCKER_BUILDER}} - fi - - | - docker buildx build --builder {{.DOCKER_BUILDER}} --platform {{.DOCKER_PLATFORMS}} \ - {{.DOCKER_BUILD_FLAGS}} \ - -t {{.DOCKER_IMAGE}} \ - {{.DOCKER_BUILD_ARGS}} \ - -f {{.DOCKERFILE}} \ - {{.DOCKER_CONTEXT}} + build-docker: + desc: Build Docker image using buildx + cmds: + - | + if ! docker buildx inspect {{.DOCKER_BUILDER}} >/dev/null 2>&1; then + docker buildx create --name {{.DOCKER_BUILDER}} --use >/dev/null + else + docker buildx use {{.DOCKER_BUILDER}} + fi + - | + docker buildx build --builder {{.DOCKER_BUILDER}} --platform {{.DOCKER_PLATFORMS}} \ + {{.DOCKER_BUILD_FLAGS}} \ + -t {{.DOCKER_IMAGE}} \ + {{.DOCKER_BUILD_ARGS}} \ + -f {{.DOCKERFILE}} \ + {{.DOCKER_CONTEXT}} - run-docker: - desc: Run Docker container using docker-compose - cmds: - - 'MESHCHAT_IMAGE="{{.DOCKER_IMAGE}}" {{.DOCKER_COMPOSE_CMD}} -f {{.DOCKER_COMPOSE_FILE}} up --remove-orphans --pull never reticulum-meshchatx' + run-docker: + desc: Run Docker container using docker-compose + cmds: + - 'MESHCHAT_IMAGE="{{.DOCKER_IMAGE}}" {{.DOCKER_COMPOSE_CMD}} -f {{.DOCKER_COMPOSE_FILE}} up --remove-orphans --pull never reticulum-meshchatx' diff --git a/docker-compose.yml b/docker-compose.yml index d513770..4f8959f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,17 +1,17 @@ services: - reticulum-meshchatx: - container_name: reticulum-meshchatx - image: ${MESHCHAT_IMAGE:-ghcr.io/sudo-ivan/reticulum-meshchatx:latest} - pull_policy: always - restart: unless-stopped - # Make the meshchat web interface accessible from the host on port 8000 - ports: - - 127.0.0.1:8000:8000 - volumes: - - meshchat-config:/config - # Uncomment if you have a USB device connected, such as an RNode - # devices: - # - /dev/ttyUSB0:/dev/ttyUSB0 + reticulum-meshchatx: + container_name: reticulum-meshchatx + image: ${MESHCHAT_IMAGE:-ghcr.io/sudo-ivan/reticulum-meshchatx:latest} + pull_policy: always + restart: unless-stopped + # Make the meshchat web interface accessible from the host on port 8000 + ports: + - 127.0.0.1:8000:8000 + volumes: + - meshchat-config:/config + # Uncomment if you have a USB device connected, such as an RNode + # devices: + # - /dev/ttyUSB0:/dev/ttyUSB0 volumes: meshchat-config: diff --git a/docs/meshchat_on_raspberry_pi.md b/docs/meshchat_on_raspberry_pi.md index 767b74b..a1385ef 100644 --- a/docs/meshchat_on_raspberry_pi.md +++ b/docs/meshchat_on_raspberry_pi.md @@ -96,4 +96,4 @@ sudo systemctl status reticulum-meshchat.service You should now be able to access MeshChat via your Pi's IP address. -> Note: Don't forget to include the default port `8000` \ No newline at end of file +> Note: Don't forget to include the default port `8000` diff --git a/electron/loading.html b/electron/loading.html index e49f966..693df9b 100644 --- a/electron/loading.html +++ b/electron/loading.html @@ -1,161 +1,205 @@ -
- - - - -
- MeshChatX
-