| .vscode | Scaffolded | |
| android | Scaffolded | |
| e2e | Scaffolded | |
| external | Scaffolded | |
| public | Scaffolded | |
| src | Scaffolded | |
| .browserslistrc | Scaffolded | |
| .editorconfig | Scaffolded | |
| .eslintrc.cjs | Scaffolded | |
| .gitignore | Scaffolded | |
| .prettierignore | Scaffolded | |
| capacitor.config.ts | Scaffolded | |
| index.html | Scaffolded | |
| ionic.config.json | Scaffolded | |
| package.json | Scaffolded | |
| playwright.config.ts | Scaffolded | |
| pnpm-lock.yaml | Scaffolded | |
| README.md | Typo | |
| tsconfig.json | Scaffolded | |
| tsconfig.node.json | Scaffolded | |
| vite.config.ts | Scaffolded | |
| vitest.config.ts | Scaffolded | |
Ionic Framework + React + Android (Capacitor) + Veilid
This is an example project to see the possibility of running a Veilid node on Web Browsers and Android with Ionic Framework.
Getting Started
Prerequisites
- Node.js (Latest LTS)
- pnpm
- Android Studio
- Android SDK
How to Run
You need to build veilid-wasm first.
Clone the veilid repository.
git clone https://gitlab.com/veilid/veilid.git
cd veilid
Install Rust and wasm-pack. Then run the following command:
cd veilid-wasm
wasm-pack build --release
This builds the necessary files in pkg directory. You will need this directory later.
Then, leave veilid direcotry and clone this repository.
git clone https://codeberg.org/namekuji/ionic-veilid-example.git
cd ionic-veilid-example
Copy the contents in pkg directory to external/veilid-wasm directory. Then run the following command.
pnpm i
Run on Browsers
Run the following command to build and start the debug server via Vite.
pnpm dev
Then open https://localhost:5173. Once you press "Connect" button and the connection to the Veilid network is established, your node ID will appear.
Try to send AppMessage from veilid-server via veilid-cli, e.g., appmessage <your_node_id> "Hello, world". Your message will appear at the bottom.
Run on Android
Follow the documantation of Capacitor to install dependencies.
Once you have all Android tools ready, run the following command to run this app.
pnpm ionic run android
The app will open on your device (or emulator).