diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 02fe2bb7..001b7e3c 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -44,58 +44,58 @@ jobs: - name: Setup Rust toolchain run: rustup toolchain install stable --profile minimal - - name: Install Rust target for 'aarch64-unknown-linux-musl' - run: rustup target add aarch64-unknown-linux-musl + - name: Install Rust target for 'x86_64-unknown-linux-musl' + run: rustup target add x86_64-unknown-linux-musl - name: Build & upload binary run: | pnpm i -g wrangler export HASH=$(git rev-parse HEAD) - cargo zigbuild --release --target aarch64-unknown-linux-musl -p mattrax + cargo zigbuild --release --target x86_64-unknown-linux-musl -p mattrax - wrangler r2 object put "static/mattrax/$HASH/aarch64-unknown-linux" --file=target/aarch64-unknown-linux-musl/release/mattrax --cache-control "public, max-age=31536000, immutable" + wrangler r2 object put "static/mattrax/$HASH/x86_64-unknown-linux" --file=target/x86_64-unknown-linux-musl/release/mattrax --cache-control "public, max-age=31536000, immutable" echo "$HASH" | wrangler r2 object put "static/nightly" --pipe - sst: - name: SST - runs-on: ubuntu-latest - # This is required to workaround the lack of wildcard for OIDC scope - # https://github.com/Azure/azure-workload-identity/issues/373 - # - # I swear to god Microsoft have never tried anything they have built. - environment: production - concurrency: - group: production - if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' - steps: - - name: Git clone the repository - uses: actions/checkout@v4 - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: "arn:aws:iam::101829795063:role/mattrax-gh-actions" - aws-region: us-east-1 - role-session-name: mattrax-sst-workflow - - - uses: pnpm/action-setup@v4 - with: - version: latest - - - name: Install SST - run: curl -fsSL https://ion.sst.dev/install | bash - - - run: cd infra && sst deploy --stage brendonovich - env: - ARM_USE_OIDC: true - ARM_CLIENT_ID: a17b56f1-0b10-4029-9a89-7f703d3573f8 - ARM_TENANT_ID: 22d6679c-fc23-425a-b69b-e5e604dd80db - AZURE_SUBSCRIPTION_ID: 22d6679c-fc23-425a-b69b-e5e604dd80db - OAUTH_CLIENT_ID: kXdvzkEgiN11CNTRL - OAUTH_CLIENT_SECRET: ${{ secrets.TAILSCALE_OAUTH_SECRET }} - - build-web: + # sst: + # name: SST + # runs-on: ubuntu-latest + # # This is required to workaround the lack of wildcard for OIDC scope + # # https://github.com/Azure/azure-workload-identity/issues/373 + # # + # # I swear to god Microsoft have never tried anything they have built. + # environment: production + # concurrency: + # group: production + # if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' + # steps: + # - name: Git clone the repository + # uses: actions/checkout@v4 + + # - name: Configure AWS credentials + # uses: aws-actions/configure-aws-credentials@v4 + # with: + # role-to-assume: "arn:aws:iam::101829795063:role/mattrax-gh-actions" + # aws-region: us-east-1 + # role-session-name: mattrax-sst-workflow + + # - uses: pnpm/action-setup@v4 + # with: + # version: latest + + # - name: Install SST + # run: curl -fsSL https://ion.sst.dev/install | bash + + # - run: cd infra && sst deploy --stage brendonovich + # env: + # ARM_USE_OIDC: true + # ARM_CLIENT_ID: a17b56f1-0b10-4029-9a89-7f703d3573f8 + # ARM_TENANT_ID: 22d6679c-fc23-425a-b69b-e5e604dd80db + # AZURE_SUBSCRIPTION_ID: 22d6679c-fc23-425a-b69b-e5e604dd80db + # OAUTH_CLIENT_ID: kXdvzkEgiN11CNTRL + # OAUTH_CLIENT_SECRET: ${{ secrets.TAILSCALE_OAUTH_SECRET }} + + build-js: strategy: matrix: projects: @@ -131,7 +131,7 @@ jobs: deploy-mattrax: name: Deploy Mattrax runs-on: ubuntu-latest - needs: [build-mattrax, sst] + needs: [build-mattrax] # TODO: sst concurrency: group: mattrax environment: @@ -141,36 +141,22 @@ jobs: - name: Git clone the repository uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - with: - version: latest - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: "arn:aws:iam::101829795063:role/mattrax-gh-actions" - aws-region: us-east-1 - role-session-name: mattrax-sst-workflow - - - name: Install SST - run: curl -fsSL https://ion.sst.dev/install | bash - - - name: Set SST envs + - name: Install Flyctl + uses: superfly/flyctl-actions/setup-flyctl@v1.4 + + - name: Download binary + working-directory: ./infra/cloud run: | - cd infra && sst secret list --stage brendonovich | grep "MDM_INTERNAL_SECRET" >> $GITHUB_ENV + wget -O mattrax "https://static.mattrax.app/mattrax/$(git rev-parse HEAD)/x86_64-unknown-linux" + chmod +x mattrax + + - name: Deploy to Fly + run: flyctl deploy --wait-timeout 2m + working-directory: ./infra/cloud env: - ARM_USE_OIDC: true - ARM_CLIENT_ID: a17b56f1-0b10-4029-9a89-7f703d3573f8 - ARM_TENANT_ID: 22d6679c-fc23-425a-b69b-e5e604dd80db - AZURE_SUBSCRIPTION_ID: 22d6679c-fc23-425a-b69b-e5e604dd80db - OAUTH_CLIENT_ID: kXdvzkEgiN11CNTRL - OAUTH_CLIENT_SECRET: ${{ secrets.TAILSCALE_OAUTH_SECRET }} - - - name: Deploy Mattrax - run: | - curl -v "https://mdm.mattrax.app/internal/redeploy?secret=${{ env.MDM_INTERNAL_SECRET }}" + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} - deploy-web: + deploy-js: strategy: matrix: projects: @@ -180,11 +166,11 @@ jobs: name: Deploy ${{ matrix.projects.name }} runs-on: ubuntu-latest needs: - - sst + # - sst # TODO # This will wait for *all* projects to build, not just the one we care about. # GitHub don't provide a better solution :( - - build-web - - deploy-mattrax + - build-js + # - deploy-mattrax # TODO # Run regardless of if previous steps were skipped if: ${{ !failure() && !cancelled() }} environment: diff --git a/.gitignore b/.gitignore index b70f8f23..1697c1af 100644 --- a/.gitignore +++ b/.gitignore @@ -58,4 +58,4 @@ Thumbs.db /TODO # Nx -.nx/cache +.nx diff --git a/Cargo.lock b/Cargo.lock index d8796330..1465689f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -239,18 +239,6 @@ dependencies = [ "syn 2.0.64", ] -[[package]] -name = "async-channel" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" -dependencies = [ - "concurrent-queue", - "event-listener-strategy 0.5.2", - "futures-core", - "pin-project-lite", -] - [[package]] name = "async-compression" version = "0.4.10" @@ -264,60 +252,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "async-http-codec" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "096146020b08dbc4587685b0730a7ba905625af13c65f8028035cdfd69573c91" -dependencies = [ - "anyhow", - "futures", - "http 1.1.0", - "httparse", - "log", -] - -[[package]] -name = "async-io" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" -dependencies = [ - "async-lock", - "cfg-if", - "concurrent-queue", - "futures-io", - "futures-lite", - "parking", - "polling", - "rustix", - "slab", - "tracing", - "windows-sys 0.52.0", -] - -[[package]] -name = "async-lock" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" -dependencies = [ - "event-listener 4.0.3", - "event-listener-strategy 0.4.0", - "pin-project-lite", -] - -[[package]] -name = "async-net" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b948000fad4873c1c9339d60f2623323a0cfd3816e5181033c6a5cb68b2accf7" -dependencies = [ - "async-io", - "blocking", - "futures-lite", -] - [[package]] name = "async-stream" version = "0.3.5" @@ -340,12 +274,6 @@ dependencies = [ "syn 2.0.64", ] -[[package]] -name = "async-task" -version = "4.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" - [[package]] name = "async-trait" version = "0.1.80" @@ -357,24 +285,6 @@ dependencies = [ "syn 2.0.64", ] -[[package]] -name = "async-web-client" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37381fb4fad3cd9b579628c21a58f528ef029d1f072d10f16cb9431aa2236d29" -dependencies = [ - "async-http-codec", - "async-net", - "futures", - "futures-rustls", - "http 1.1.0", - "lazy_static", - "log", - "rustls-pki-types", - "thiserror", - "webpki-roots", -] - [[package]] name = "atomic-waker" version = "1.1.2" @@ -389,22 +299,21 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "aws-lc-rs" -version = "1.7.1" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8487b59d62764df8231cb371c459314df895b41756df457a1fb1243d65c89195" +checksum = "4ae74d9bd0a7530e8afd1770739ad34b36838829d6ad61818f9230f683f5ad77" dependencies = [ "aws-lc-sys", "mirai-annotations", "paste", - "untrusted 0.7.1", "zeroize", ] [[package]] name = "aws-lc-sys" -version = "0.16.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c15eb61145320320eb919d9bab524617a7aa4216c78d342fae3a758bc33073e4" +checksum = "0f0e249228c6ad2d240c2dc94b714d711629d52bad946075d8e9b2f5391f0703" dependencies = [ "bindgen", "cc", @@ -542,22 +451,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "better-acme" -version = "0.0.1" -dependencies = [ - "async-trait", - "base64 0.22.1", - "chrono", - "futures", - "pem", - "rustls 0.23.6", - "rustls-acme", - "sha2", - "tokio", - "x509-parser 0.16.0", -] - [[package]] name = "bigdecimal" version = "0.4.3" @@ -627,20 +520,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "blocking" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "495f7104e962b7356f0aeb34247aca1fe7d2e783b346582db7f2904cb5717e88" -dependencies = [ - "async-channel", - "async-lock", - "async-task", - "futures-io", - "futures-lite", - "piper", -] - [[package]] name = "borsh" version = "1.5.0" @@ -855,15 +734,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "cookie" version = "0.18.1" @@ -1162,48 +1032,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "event-listener" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" -dependencies = [ - "event-listener 4.0.3", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" -dependencies = [ - "event-listener 5.3.0", - "pin-project-lite", -] - [[package]] name = "fastrand" version = "2.1.0" @@ -1363,19 +1191,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" -[[package]] -name = "futures-lite" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "parking", - "pin-project-lite", -] - [[package]] name = "futures-macro" version = "0.3.30" @@ -1394,7 +1209,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f2f12607f92c69b12ed746fabf9ca4f5c482cba46679c1a75b874ed7c26adb" dependencies = [ "futures-io", - "rustls 0.23.6", + "rustls 0.23.12", "rustls-pki-types", ] @@ -2213,7 +2028,6 @@ dependencies = [ "axum", "axum-extra", "base64 0.22.1", - "better-acme", "chownr", "chrono", "clap", @@ -2238,7 +2052,7 @@ dependencies = [ "rand", "rcgen", "reqwest 0.12.4", - "rustls 0.23.6", + "rustls 0.23.12", "serde", "serde_json", "sha1", @@ -2402,7 +2216,7 @@ dependencies = [ "ms-mdm", "mx-db", "mx-policy", - "rustls 0.23.6", + "rustls 0.23.12", "serde", "serde_json", "tracing", @@ -2772,12 +2586,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "parking" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" - [[package]] name = "parking_lot" version = "0.12.2" @@ -2948,17 +2756,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "piper" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464db0c665917b13ebb5d453ccdec4add5658ee1adc7affc7677615356a8afaf" -dependencies = [ - "atomic-waker", - "fastrand", - "futures-io", -] - [[package]] name = "pkg-config" version = "0.3.30" @@ -2979,21 +2776,6 @@ dependencies = [ "time", ] -[[package]] -name = "polling" -version = "3.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645493cf344456ef24219d02a768cf1fb92ddf8c92161679ae3d91b91a637be3" -dependencies = [ - "cfg-if", - "concurrent-queue", - "hermit-abi", - "pin-project-lite", - "rustix", - "tracing", - "windows-sys 0.52.0", -] - [[package]] name = "powerfmt" version = "0.2.0" @@ -3159,7 +2941,6 @@ name = "rcgen" version = "0.13.1" source = "git+https://github.com/oscartbeaumont/rcgen?rev=a3cd77f13f51b441b5d172aeac2f528c4a79c3bc#a3cd77f13f51b441b5d172aeac2f528c4a79c3bc" dependencies = [ - "aws-lc-rs", "pem", "ring 0.17.8", "rustls-pki-types", @@ -3496,9 +3277,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.6" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94cf0812de1f0cee6b163ce35c2f57b90e1ef5a2bed57bcf07c16475bac8c852" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ "aws-lc-rs", "log", @@ -3510,33 +3291,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "rustls-acme" -version = "0.10.1" -source = "git+https://github.com/oscartbeaumont/rustls-acme?rev=051ebd0433ad66855b728f7b848369a58ee4ebbf#051ebd0433ad66855b728f7b848369a58ee4ebbf" -dependencies = [ - "async-io", - "async-trait", - "async-web-client", - "aws-lc-rs", - "base64 0.22.1", - "blocking", - "chrono", - "futures", - "futures-rustls", - "http 1.1.0", - "log", - "pem", - "rcgen", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-util", - "webpki-roots", - "x509-parser 0.16.0", -] - [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -3564,9 +3318,9 @@ checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] name = "rustls-webpki" -version = "0.102.4" +version = "0.102.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" dependencies = [ "aws-lc-rs", "ring 0.17.8", @@ -5074,6 +4828,20 @@ name = "zeroize" version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.64", +] [[package]] name = "zstd" @@ -5102,3 +4870,8 @@ dependencies = [ "cc", "pkg-config", ] + +[[patch.unused]] +name = "rustls-acme" +version = "0.10.1" +source = "git+https://github.com/oscartbeaumont/rustls-acme?rev=051ebd0433ad66855b728f7b848369a58ee4ebbf#051ebd0433ad66855b728f7b848369a58ee4ebbf" diff --git a/README.md b/README.md index 23064d7e..8136281e 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,6 @@ The components are: - [`apps/mattraxd`](apps/mattraxd) - Agent for managed devices that manages script execution and more - [`apps/landing`](apps/landing) - [Landing website](https://mattrax.app) - [`apps/docs`](apps/docs) - [Documentation website](https://docs.mattrax.app) - - [`apps/android`](apps/android) - Android application for device management We mainly use the following technologies: - [SolidJS](https://www.solidjs.com) diff --git a/apps/android/.gitignore b/apps/android/.gitignore deleted file mode 100644 index aa724b77..00000000 --- a/apps/android/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea/caches -/.idea/libraries -/.idea/modules.xml -/.idea/workspace.xml -/.idea/navEditor.xml -/.idea/assetWizardSettings.xml -.DS_Store -/build -/captures -.externalNativeBuild -.cxx -local.properties diff --git a/apps/android/.idea/.gitignore b/apps/android/.idea/.gitignore deleted file mode 100644 index 26d33521..00000000 --- a/apps/android/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/apps/android/.idea/.name b/apps/android/.idea/.name deleted file mode 100644 index 2cf8ec24..00000000 --- a/apps/android/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -Mattrax \ No newline at end of file diff --git a/apps/android/.idea/codeStyles/Project.xml b/apps/android/.idea/codeStyles/Project.xml deleted file mode 100644 index 7643783a..00000000 --- a/apps/android/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/apps/android/.idea/codeStyles/codeStyleConfig.xml b/apps/android/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index 79ee123c..00000000 --- a/apps/android/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/apps/android/.idea/compiler.xml b/apps/android/.idea/compiler.xml deleted file mode 100644 index b589d56e..00000000 --- a/apps/android/.idea/compiler.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/apps/android/.idea/deploymentTargetDropDown.xml b/apps/android/.idea/deploymentTargetDropDown.xml deleted file mode 100644 index 0c0c3383..00000000 --- a/apps/android/.idea/deploymentTargetDropDown.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/apps/android/.idea/gradle.xml b/apps/android/.idea/gradle.xml deleted file mode 100644 index 0897082f..00000000 --- a/apps/android/.idea/gradle.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/apps/android/.idea/inspectionProfiles/Project_Default.xml b/apps/android/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 44ca2d9b..00000000 --- a/apps/android/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - \ No newline at end of file diff --git a/apps/android/.idea/kotlinc.xml b/apps/android/.idea/kotlinc.xml deleted file mode 100644 index 0fc31131..00000000 --- a/apps/android/.idea/kotlinc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/apps/android/.idea/migrations.xml b/apps/android/.idea/migrations.xml deleted file mode 100644 index f8051a6f..00000000 --- a/apps/android/.idea/migrations.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/apps/android/.idea/misc.xml b/apps/android/.idea/misc.xml deleted file mode 100644 index 8978d23d..00000000 --- a/apps/android/.idea/misc.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/apps/android/.idea/vcs.xml b/apps/android/.idea/vcs.xml deleted file mode 100644 index b2bdec2d..00000000 --- a/apps/android/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/apps/android/app/.gitignore b/apps/android/app/.gitignore deleted file mode 100644 index 42afabfd..00000000 --- a/apps/android/app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/apps/android/app/build.gradle.kts b/apps/android/app/build.gradle.kts deleted file mode 100644 index 3ad559ae..00000000 --- a/apps/android/app/build.gradle.kts +++ /dev/null @@ -1,66 +0,0 @@ -plugins { - id("com.android.application") - id("org.jetbrains.kotlin.android") -} - -android { - namespace = "app.mattrax.mattrax" - compileSdk = 33 - - defaultConfig { - applicationId = "app.mattrax.mattrax" - minSdk = 21 - targetSdk = 33 - versionCode = 1 - versionName = "1.0" - - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - vectorDrawables { - useSupportLibrary = true - } - } - - buildTypes { - release { - isMinifyEnabled = false - proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") - } - } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } - kotlinOptions { - jvmTarget = "1.8" - } - buildFeatures { - compose = true - } - composeOptions { - kotlinCompilerExtensionVersion = "1.4.3" - } - packaging { - resources { - excludes += "/META-INF/{AL2.0,LGPL2.1}" - } - } -} - -dependencies { - - implementation("androidx.core:core-ktx:1.9.0") - implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1") - implementation("androidx.activity:activity-compose:1.7.0") - implementation(platform("androidx.compose:compose-bom:2023.03.00")) - implementation("androidx.compose.ui:ui") - implementation("androidx.compose.ui:ui-graphics") - implementation("androidx.compose.ui:ui-tooling-preview") - implementation("androidx.compose.material3:material3") - testImplementation("junit:junit:4.13.2") - androidTestImplementation("androidx.test.ext:junit:1.1.5") - androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") - androidTestImplementation(platform("androidx.compose:compose-bom:2023.03.00")) - androidTestImplementation("androidx.compose.ui:ui-test-junit4") - debugImplementation("androidx.compose.ui:ui-tooling") - debugImplementation("androidx.compose.ui:ui-test-manifest") -} \ No newline at end of file diff --git a/apps/android/app/proguard-rules.pro b/apps/android/app/proguard-rules.pro deleted file mode 100644 index 481bb434..00000000 --- a/apps/android/app/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/apps/android/app/src/androidTest/java/app/mattrax/mattrax/ExampleInstrumentedTest.kt b/apps/android/app/src/androidTest/java/app/mattrax/mattrax/ExampleInstrumentedTest.kt deleted file mode 100644 index 8067f091..00000000 --- a/apps/android/app/src/androidTest/java/app/mattrax/mattrax/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,24 +0,0 @@ -package app.mattrax.mattrax - -import androidx.test.platform.app.InstrumentationRegistry -import androidx.test.ext.junit.runners.AndroidJUnit4 - -import org.junit.Test -import org.junit.runner.RunWith - -import org.junit.Assert.* - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("app.mattrax.mattrax", appContext.packageName) - } -} \ No newline at end of file diff --git a/apps/android/app/src/main/AndroidManifest.xml b/apps/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index b99962fb..00000000 --- a/apps/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/apps/android/app/src/main/java/app/mattrax/mattrax/MainActivity.kt b/apps/android/app/src/main/java/app/mattrax/mattrax/MainActivity.kt deleted file mode 100644 index d6fae88a..00000000 --- a/apps/android/app/src/main/java/app/mattrax/mattrax/MainActivity.kt +++ /dev/null @@ -1,43 +0,0 @@ -package app.mattrax.mattrax - -import android.os.Bundle -import androidx.activity.ComponentActivity -import androidx.activity.compose.setContent -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier -import androidx.compose.ui.tooling.preview.Preview -import app.mattrax.mattrax.ui.theme.MattraxTheme - -class MainActivity : ComponentActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContent { - MattraxTheme { - // A surface container using the 'background' color from the theme - Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) { - Greeting("Android") - } - } - } - } -} - -@Composable -fun Greeting(name: String, modifier: Modifier = Modifier) { - Text( - text = "Hello $name!", - modifier = modifier - ) -} - -@Preview(showBackground = true) -@Composable -fun GreetingPreview() { - MattraxTheme { - Greeting("Android") - } -} \ No newline at end of file diff --git a/apps/android/app/src/main/java/app/mattrax/mattrax/ui/theme/Color.kt b/apps/android/app/src/main/java/app/mattrax/mattrax/ui/theme/Color.kt deleted file mode 100644 index e008bf98..00000000 --- a/apps/android/app/src/main/java/app/mattrax/mattrax/ui/theme/Color.kt +++ /dev/null @@ -1,11 +0,0 @@ -package app.mattrax.mattrax.ui.theme - -import androidx.compose.ui.graphics.Color - -val Purple80 = Color(0xFFD0BCFF) -val PurpleGrey80 = Color(0xFFCCC2DC) -val Pink80 = Color(0xFFEFB8C8) - -val Purple40 = Color(0xFF6650a4) -val PurpleGrey40 = Color(0xFF625b71) -val Pink40 = Color(0xFF7D5260) \ No newline at end of file diff --git a/apps/android/app/src/main/java/app/mattrax/mattrax/ui/theme/Theme.kt b/apps/android/app/src/main/java/app/mattrax/mattrax/ui/theme/Theme.kt deleted file mode 100644 index a8842a8d..00000000 --- a/apps/android/app/src/main/java/app/mattrax/mattrax/ui/theme/Theme.kt +++ /dev/null @@ -1,70 +0,0 @@ -package app.mattrax.mattrax.ui.theme - -import android.app.Activity -import android.os.Build -import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.darkColorScheme -import androidx.compose.material3.dynamicDarkColorScheme -import androidx.compose.material3.dynamicLightColorScheme -import androidx.compose.material3.lightColorScheme -import androidx.compose.runtime.Composable -import androidx.compose.runtime.SideEffect -import androidx.compose.ui.graphics.toArgb -import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.platform.LocalView -import androidx.core.view.WindowCompat - -private val DarkColorScheme = darkColorScheme( - primary = Purple80, - secondary = PurpleGrey80, - tertiary = Pink80 -) - -private val LightColorScheme = lightColorScheme( - primary = Purple40, - secondary = PurpleGrey40, - tertiary = Pink40 - - /* Other default colors to override - background = Color(0xFFFFFBFE), - surface = Color(0xFFFFFBFE), - onPrimary = Color.White, - onSecondary = Color.White, - onTertiary = Color.White, - onBackground = Color(0xFF1C1B1F), - onSurface = Color(0xFF1C1B1F), - */ -) - -@Composable -fun MattraxTheme( - darkTheme: Boolean = isSystemInDarkTheme(), - // Dynamic color is available on Android 12+ - dynamicColor: Boolean = true, - content: @Composable () -> Unit -) { - val colorScheme = when { - dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { - val context = LocalContext.current - if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context) - } - - darkTheme -> DarkColorScheme - else -> LightColorScheme - } - val view = LocalView.current - if (!view.isInEditMode) { - SideEffect { - val window = (view.context as Activity).window - window.statusBarColor = colorScheme.primary.toArgb() - WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme - } - } - - MaterialTheme( - colorScheme = colorScheme, - typography = Typography, - content = content - ) -} \ No newline at end of file diff --git a/apps/android/app/src/main/java/app/mattrax/mattrax/ui/theme/Type.kt b/apps/android/app/src/main/java/app/mattrax/mattrax/ui/theme/Type.kt deleted file mode 100644 index edee75af..00000000 --- a/apps/android/app/src/main/java/app/mattrax/mattrax/ui/theme/Type.kt +++ /dev/null @@ -1,34 +0,0 @@ -package app.mattrax.mattrax.ui.theme - -import androidx.compose.material3.Typography -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.font.FontFamily -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.sp - -// Set of Material typography styles to start with -val Typography = Typography( - bodyLarge = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Normal, - fontSize = 16.sp, - lineHeight = 24.sp, - letterSpacing = 0.5.sp - ) - /* Other default text styles to override - titleLarge = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Normal, - fontSize = 22.sp, - lineHeight = 28.sp, - letterSpacing = 0.sp - ), - labelSmall = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Medium, - fontSize = 11.sp, - lineHeight = 16.sp, - letterSpacing = 0.5.sp - ) - */ -) \ No newline at end of file diff --git a/apps/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/apps/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml deleted file mode 100644 index 2b068d11..00000000 --- a/apps/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/apps/android/app/src/main/res/drawable/ic_launcher_background.xml b/apps/android/app/src/main/res/drawable/ic_launcher_background.xml deleted file mode 100644 index 07d5da9c..00000000 --- a/apps/android/app/src/main/res/drawable/ic_launcher_background.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/apps/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/apps/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index 6f3b755b..00000000 --- a/apps/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/apps/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/apps/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml deleted file mode 100644 index 6f3b755b..00000000 --- a/apps/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/apps/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/apps/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp deleted file mode 100644 index c209e78e..00000000 Binary files a/apps/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp and /dev/null differ diff --git a/apps/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/apps/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp deleted file mode 100644 index b2dfe3d1..00000000 Binary files a/apps/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and /dev/null differ diff --git a/apps/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/apps/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp deleted file mode 100644 index 4f0f1d64..00000000 Binary files a/apps/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp and /dev/null differ diff --git a/apps/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/apps/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp deleted file mode 100644 index 62b611da..00000000 Binary files a/apps/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and /dev/null differ diff --git a/apps/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/apps/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp deleted file mode 100644 index 948a3070..00000000 Binary files a/apps/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and /dev/null differ diff --git a/apps/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/apps/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp deleted file mode 100644 index 1b9a6956..00000000 Binary files a/apps/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and /dev/null differ diff --git a/apps/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/apps/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp deleted file mode 100644 index 28d4b77f..00000000 Binary files a/apps/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and /dev/null differ diff --git a/apps/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/apps/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp deleted file mode 100644 index 9287f508..00000000 Binary files a/apps/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and /dev/null differ diff --git a/apps/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/apps/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp deleted file mode 100644 index aa7d6427..00000000 Binary files a/apps/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and /dev/null differ diff --git a/apps/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/apps/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp deleted file mode 100644 index 9126ae37..00000000 Binary files a/apps/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and /dev/null differ diff --git a/apps/android/app/src/main/res/values/colors.xml b/apps/android/app/src/main/res/values/colors.xml deleted file mode 100644 index f8c6127d..00000000 --- a/apps/android/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - #FFBB86FC - #FF6200EE - #FF3700B3 - #FF03DAC5 - #FF018786 - #FF000000 - #FFFFFFFF - \ No newline at end of file diff --git a/apps/android/app/src/main/res/values/strings.xml b/apps/android/app/src/main/res/values/strings.xml deleted file mode 100644 index 779fc07d..00000000 --- a/apps/android/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - Mattrax - \ No newline at end of file diff --git a/apps/android/app/src/main/res/values/themes.xml b/apps/android/app/src/main/res/values/themes.xml deleted file mode 100644 index 67f91871..00000000 --- a/apps/android/app/src/main/res/values/themes.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - -