1
0
Fork
You've already forked ionic-veilid-example
0
No description
  • TypeScript 52.1%
  • CSS 37%
  • Java 6.3%
  • HTML 4.6%
2023年12月28日 03:39:43 -05:00
.vscode Scaffolded 2023年12月28日 03:20:45 -05:00
android Scaffolded 2023年12月28日 03:20:45 -05:00
e2e Scaffolded 2023年12月28日 03:20:45 -05:00
external Scaffolded 2023年12月28日 03:20:45 -05:00
public Scaffolded 2023年12月28日 03:20:45 -05:00
src Scaffolded 2023年12月28日 03:20:45 -05:00
.browserslistrc Scaffolded 2023年12月28日 03:20:45 -05:00
.editorconfig Scaffolded 2023年12月28日 03:20:45 -05:00
.eslintrc.cjs Scaffolded 2023年12月28日 03:20:45 -05:00
.gitignore Scaffolded 2023年12月28日 03:20:45 -05:00
.prettierignore Scaffolded 2023年12月28日 03:20:45 -05:00
capacitor.config.ts Scaffolded 2023年12月28日 03:20:45 -05:00
index.html Scaffolded 2023年12月28日 03:20:45 -05:00
ionic.config.json Scaffolded 2023年12月28日 03:20:45 -05:00
package.json Scaffolded 2023年12月28日 03:20:45 -05:00
playwright.config.ts Scaffolded 2023年12月28日 03:20:45 -05:00
pnpm-lock.yaml Scaffolded 2023年12月28日 03:20:45 -05:00
README.md Typo 2023年12月28日 03:39:43 -05:00
tsconfig.json Scaffolded 2023年12月28日 03:20:45 -05:00
tsconfig.node.json Scaffolded 2023年12月28日 03:20:45 -05:00
vite.config.ts Scaffolded 2023年12月28日 03:20:45 -05:00
vitest.config.ts Scaffolded 2023年12月28日 03:20:45 -05:00

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).