Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(desktop-app): tauri setup #1160

Open
wants to merge 67 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
1c62021
feat(tauri-app): initial tauri setup
May 13, 2024
734c6cf
feat(tauri-app): working offline signer | modal in progress
May 23, 2024
0b58621
Merge branch 'master' of https://github.com/cybercongress/cyb-ts into…
Jun 2, 2024
02df9e7
feat(tauri-app): working mnemonics modal
Jun 10, 2024
3c9419b
Create build_tauri_app.yml
dr-leevsey Jun 11, 2024
966df5d
fix(tauri-build): removed empty step
Jun 11, 2024
56dd77f
chore(tauri-app): trigger manually
Jun 11, 2024
cf53df6
feat(tauri-app): connect wallet modal updates and cleanup
Jun 16, 2024
5c6c6fa
feat(tauri-app): signer modal window
Jun 17, 2024
7021878
feat(tauri-app): cancel button and basic validation
Jun 17, 2024
2e01ed7
fix(tauri-app): webkit does not support persistent storage
Jun 18, 2024
be48fa2
feat(offline-signer): signer modal used to sign transaction
Jun 19, 2024
e99509a
Merge branch 'master' of https://github.com/cybercongress/cyb-ts into…
Jun 19, 2024
2080067
feat(tauri-app): use workers in app | modals refactoring
Jun 21, 2024
e7936b1
Merge branch 'chore/build-tauri-app' of https://github.com/cybercongr…
Jun 30, 2024
05168c6
feat(tauri-app): switched signer from modal to /sign page
Jul 3, 2024
0de0392
feat(tauri-app): changed action bar state management moved to redux
Jul 8, 2024
fa3ce94
feat(tauri-app): fetch and run kubo on app start
Jul 10, 2024
1e61c49
feat(tarui-app): detect platform when downloading ipfs
Jul 11, 2024
5c428fb
feat(tauri-app): wip
Jul 21, 2024
0fc73ab
feat(tauri-app): action bar refactoring, ipfs initialization after do…
Jul 26, 2024
ca86120
Merge branch master of https://github.com/cybercongress/cyb-ts into f…
dr-leevsey Jul 31, 2024
619a6fa
Merge branch 'master' of https://github.com/cybercongress/cyb-ts into…
Aug 3, 2024
6bef546
- feat(tauri-app): cozodb with rocksdb as an engine
Aug 8, 2024
9ae6107
fix(tauri-app): should serialize cozoDB output with native methods
Aug 9, 2024
197d3f7
chore(tauri-app): version bump
Aug 13, 2024
d87d467
add tauriScript to build opt
mrlp4 Aug 13, 2024
f1472ed
Merge branch 'master' of https://github.com/cybercongress/cyb-ts into…
Aug 15, 2024
2b8eff3
debug tauri build workflow
mrlp4 Aug 19, 2024
8dc94d0
Merge branch 'master' of https://github.com/cybercongress/cyb-ts into…
Aug 20, 2024
ffe4957
Tauri app build action (#1257)
dr-leevsey Aug 20, 2024
a4bec24
chore(tauri-app): increased tauri window initial size
Aug 24, 2024
edea2c7
Merge branch 'feat/tauri-app' of https://github.com/cybercongress/cyb…
Aug 24, 2024
9dd6f9d
rename access token
mrlp4 Aug 25, 2024
77e3cd1
rename access token for actions (#1266)
mrlp4 Aug 25, 2024
078f995
feat(tauri-app): #1262 Add option to enable internal signer confirmat…
Aug 25, 2024
50d1b8b
Merge branch 'feat/tauri-app' of https://github.com/cybercongress/cyb…
Aug 25, 2024
f41ddf1
feat(tauri-app): make signer a separate app page with URL params
Aug 29, 2024
4967920
chore(tauri-app): merge branch master of https://github.com/cybercong…
Sep 22, 2024
3ad90ac
chore(tauri-app): rust deps upgraded and uncommented browser specific…
Sep 23, 2024
6cbe52d
chore(cyb): fixed phrasing
Sep 29, 2024
7f18399
Merge branch 'master' of https://github.com/cybercongress/cyb-ts into…
Sep 29, 2024
e7eb12f
chore(cyb): jsx to tsx
Sep 30, 2024
3b357d4
Merge branch 'master' of https://github.com/cybercongress/cyb-ts into…
Oct 3, 2024
48a6cd8
cleanup
Oct 3, 2024
d939ada
merge from master into tauri app
Oct 6, 2024
ef9dd19
Merge branch master of https://github.com/cybercongress/cyb-ts into f…
Oct 7, 2024
3f7447a
Merge branch master of https://github.com/cybercongress/cyb-ts into f…
Oct 7, 2024
eb3aa1c
Merge branch 'feat/tauri-app' of https://github.com/cybercongress/cyb…
Oct 7, 2024
377aa86
fix(tauri-app): lost merges and enabled keplr signer
Oct 7, 2024
55076b4
fix(tauri-app): error on fetching transaction
Oct 7, 2024
0398c17
Merge branch master of https://github.com/cybercongress/cyb-ts into f…
Oct 11, 2024
45c710a
feat(tauri-app): sign full screen modal instead of global transaction…
Oct 13, 2024
a2700b9
fix(tauri-app): offline signer when keplr not available and getting g…
Oct 17, 2024
c3ec103
Merge branch 'master' of https://github.com/cybercongress/cyb-ts into…
Oct 18, 2024
7eeb994
Merge branch 'master' of https://github.com/cybercongress/cyb-ts into…
Oct 19, 2024
4c50514
fix(tauri-app): version bump and review comments
Oct 19, 2024
3c0eb6e
fix(tauri-app): review comments
Oct 19, 2024
d39f95c
Merge branch 'master' of https://github.com/cybercongress/cyb-ts into…
Nov 18, 2024
b2be0e7
feat(tauri-app): restart kubo on reconnect | fix: concurrency issue f…
Nov 23, 2024
469ff12
chore(tauri-app): version bump
Nov 23, 2024
67ffb1e
chore(tauri-app): consider to use yarn.lock when build on pipeline
Nov 27, 2024
e9d2bf9
Merge branch 'master' of https://github.com/cybercongress/cyb-ts into…
Dec 3, 2024
324e1b6
fix(tauri-app): start ipfs before app has started
Dec 5, 2024
c0aee7b
feat(tauri-app): load latest ipfs version
Dec 8, 2024
0afa6b8
feat(tauri-app): basic splashscreen implementation
Dec 8, 2024
6d15c8c
feat(tauri-app): splashscreen
Dec 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/build_tauri_app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: 'publish_tauri_app'

on:
push:
tags:
- '*'
workflow_dispatch:

jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
settings:
- platform: 'macos-latest' # for Arm based macs (M1 and above).
args: '--target aarch64-apple-darwin'
- platform: 'macos-latest' # for Intel based macs.
args: '--target x86_64-apple-darwin'
- platform: 'ubuntu-22.04'
args: ''
- platform: 'windows-latest'
args: ''

runs-on: ${{ matrix.settings.platform }}
steps:
- uses: actions/checkout@v4
- name: install dependencies (ubuntu only)
if: matrix.settings.platform == 'ubuntu-22.04' # This must match the platform value defined above.
run: |
sudo apt-get update
sudo apt-get install -y build-essential libssl-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
echo "PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig" >> $GITHUB_ENV
echo "LIBRARY_PATH=\$LIBRARY_PATH:/usr/local/opt/openssl/lib" >> $GITHUB_ENV
echo "C_INCLUDE_PATH=\$C_INCLUDE_PATH:/usr/local/opt/openssl/include" >> $GITHUB_ENV

- name: setup node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'

- name: cache node modules
uses: actions/cache@v3
with:
path: |
**/node_modules
~/.yarn/cache
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'

- name: install deps
run: yarn install

- name: install frontend dependencies
run: yarn tauri build ${{ matrix.settings.args }}
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_RELEASE_ACCESS_TOKEN }}
with:
tauriScript: true
tagName: cyb-tauri-${{ github.sha }}
releaseName: 'Cyb standalone app ${{ github.sha }}'
releaseBody: 'See the assets to install this version.'
releaseDraft: true
prerelease: false
args: ${{ matrix.settings.args }}
33 changes: 28 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ example of [random citizen](https://cyb.ai/pgraph/bostrom1d8754xqa9245pctlfcyv8e
<img width="1190" alt="Screen Shot 2022-12-18 at 20 45 02" src="https://user-images.githubusercontent.com/410789/208318513-bdded618-8ed0-4d1c-b3cf-8cec8c8473a8.png">

# features

- [my robot](https://cyb.ai): your robot
- [energy](https://cyb.ai/grid): superintelligence dashboard
- [sense](https://cyb.ai/sixthSense): strictly defined feed
- [log](https://cyb.ai/network/bostrom/contract/bostrom1d8754xqa9245pctlfcyv8eah468neqzn3a0y0t/txs): publish important particles
- [brain](https://cyb.ai/pgraph/bostrom1d8754xqa9245pctlfcyv8eah468neqzn3a0y0t): surf robot brain
- [karma](https://cyb.ai/network/bostrom/contract/bostrom1d8754xqa9245pctlfcyv8eah468neqzn3a0y0t/community): enhance valuable connections
- [energy](https://cyb.ai/grid): superintelligence dashboard
- [sense](https://cyb.ai/sixthSense): strictly defined feed
- [log](https://cyb.ai/network/bostrom/contract/bostrom1d8754xqa9245pctlfcyv8eah468neqzn3a0y0t/txs): publish important particles
- [brain](https://cyb.ai/pgraph/bostrom1d8754xqa9245pctlfcyv8eah468neqzn3a0y0t): surf robot brain
- [karma](https://cyb.ai/network/bostrom/contract/bostrom1d8754xqa9245pctlfcyv8eah468neqzn3a0y0t/community): enhance valuable connections
- [nebula](https://cyb.ai/nebula): discover particles through tokens
- [portal](https://cyb.ai/portal): create public and private robot avatar and invite friends
- [oracle](https://cyb.ai/bootloader): discover particles, neurons, signals and steps of [superintelligence](https://github.com/cybercongress/go-cyber)
Expand All @@ -28,6 +29,28 @@ example of [random citizen](https://cyb.ai/pgraph/bostrom1d8754xqa9245pctlfcyv8e
$ yarn install
$ yarn start
```

## Tauri app

For local development

```sh
$ yarn install
$ yarn tauri dev
```

To make production build with

```sh
$ yarn tauri build
```

for ability to open devtools on production build use `--debug` option

```sh
$ yarn tauri build --debug
```

then pray that node.js will build something

# join
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"packageManager": "yarn@1.22.19",
"scripts": {
"start": "webpack serve --config=webpack.config.dev.js",
"start:tauri": "webpack serve --config=webpack.config.dev.tauri.js",
"build": "webpack --config=webpack.config.prod.js && yarn copy-public",
"build:tauri": "webpack --config=webpack.config.prod.tauri.js && yarn copy-public",
"copy-public": "cp -r public/* build/",
"build-ipfs": "IPFS_DEPLOY=1 webpack --config=webpack.config.prod.js --mode production",
"devserver": "yarn serve -s build",
Expand Down Expand Up @@ -55,6 +57,7 @@
"@storybook/react": "^7.2.3",
"@storybook/react-webpack5": "^7.2.3",
"@storybook/testing-library": "^0.2.0",
"@tauri-apps/cli": "^1.6.2",
"@testing-library/react": "^14.0.0",
"@types/compression-webpack-plugin": "^9.1.1",
"@types/dateformat": "^5.0.0",
Expand Down Expand Up @@ -147,6 +150,7 @@
"dependencies": {
"@ai-sdk/openai": "^0.0.63",
"@apollo/client": "^3.9.4",
"@chain-registry/utils": "^1.51.1",
"@chainsafe/libp2p-noise": "^13.0.1",
"@chainsafe/libp2p-yamux": "^5.0.0",
"@confio/relayer": "0.4.0",
Expand Down Expand Up @@ -181,6 +185,7 @@
"@tanstack/react-query": "^4.22.0",
"@tanstack/react-query-devtools": "^4.22.0",
"@tanstack/react-table": "^8.9.1",
"@tauri-apps/api": "^1.6.0",
"@types/file-saver": "^2.0.5",
"@types/history": "^5.0.0",
"@types/jest": "^29.5.11",
Expand All @@ -195,6 +200,7 @@
"bignumber.js": "^9.0.0",
"blockstore-core": "^4.3.4",
"blockstore-idb": "^1.1.4",
"chain-registry": "^1.69.3",
"cjs-to-es6": "^2.0.1",
"classnames": "^2.3.1",
"codemirror": "5.58.2",
Expand Down
Binary file added public/fonts/Play-Regular.ttf
Binary file not shown.
40 changes: 40 additions & 0 deletions public/images/robot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions public/splashscreen.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<html>
<style>
body {
margin: 0;
padding: 0;
font-family: 'Play';
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: black;
color: white;
}

@font-face {
font-family: 'Play';
src: url('fonts/Play-Regular.ttf');
font-weight: 400;
font-style: normal;
}

</style>
<body>
<img src="images/robot.svg" />
<h4>CYB.AI</h4>
<div id="message"></div>
<script>
window.updateSplashMessage = (text) => {
document.getElementById('message').innerText = text;
};
</script>
</body>
</html>
3 changes: 3 additions & 0 deletions src-tauri/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by Cargo
# will have compiled files and executables
/target/
Loading
Loading