mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-20 05:09:51 -04:00
refactor README.md for clarity and structure; enhance setup instructions and...
This commit is contained in:
parent
04092fed74
commit
ee37d0dbba
1 changed files with 160 additions and 13 deletions
173
README.md
173
README.md
|
@ -1,28 +1,175 @@
|
|||
# VeilidChat
|
||||
|
||||
VeilidChat is a chat application written for the Veilid (https://www.veilid.com) distributed application platform. It has a familiar and simple interface and is designed for private, and secure person-to-person communications.
|
||||
## Overview
|
||||
|
||||
For more information about VeilidChat: https://veilid.com/chat/
|
||||
VeilidChat is a decentralized, secure, and private chat application built upon the [Veilid](https://www.veilid.com) distributed application platform. It offers a familiar messaging interface while leveraging Veilid's underlying end-to-end encrypted and peer-to-peer communication capabilities to ensure privacy and security for person-to-person communications without relying on centralized servers.
|
||||
|
||||
For more information about the Veilid network protocol and app development platform: https://veilid.com
|
||||
For more information about VeilidChat: <https://veilid.com/chat/>
|
||||
|
||||
For more information about the Veilid network protocol and app development platform: <https://veilid.com>
|
||||
|
||||
## Setup
|
||||
|
||||
While this is still in development, you must have a clone of the Veilid source checked out at `../veilid` relative to the working directory of this repository.
|
||||
### Prerequisites
|
||||
|
||||
VeilidChat is a Flutter application that interacts with the core Veilid library via Foreign Function Interface (FFI). While this is still in development, you **must** have a clone of the Veilid source checked out at `../veilid` relative to the working directory of this repository for the setup scripts to work. This is because the veilid-core source and build setup (including FFI components), which Veilidchat relies on, reside there.
|
||||
|
||||
### For Linux Systems:
|
||||
```
|
||||
./dev-setup/setup_linux.sh
|
||||
your_workspace/
|
||||
├── veilid/ <-- Veilid core repository
|
||||
└── veilidchat/ <-- This repository
|
||||
```
|
||||
|
||||
### For Mac Systems:
|
||||
```
|
||||
./dev-setup/setup_macos.sh
|
||||
Refer to the main [Veilid repository](https://gitlab.com/veilid/veilid) for instructions.
|
||||
|
||||
<br>
|
||||
|
||||
### Flutter Installation
|
||||
|
||||
VeilidChat requires the Flutter SDK to build and run. Ensure Flutter is installed and available in your system's PATH. Choose one of the methods below:
|
||||
|
||||
|
||||
**Option 1: Standard Installation (Recommended)**
|
||||
|
||||
Follow the official Flutter documentation for your operating system to install the SDK directly.
|
||||
|
||||
* **Official Flutter Install Guides:**
|
||||
* [Windows](https://docs.flutter.dev/get-started/install/windows)
|
||||
* [macOS](https://docs.flutter.dev/get-started/install/macos)
|
||||
* [Linux](https://docs.flutter.dev/get-started/install/linux)
|
||||
* [ChromeOS](https://docs.flutter.dev/get-started/install/chromeos)
|
||||
|
||||
|
||||
**Option 2: Installation via IDE Extension (Beginner-friendly for VS Code)**
|
||||
|
||||
Varioius IDEs may offer Flutter extensions that can assist with setup. For VS Code, the official Flutter extension can assist you through the SDK installation process.
|
||||
|
||||
1. Open VS Code.
|
||||
2. Go to the Extensions view (`Ctrl+Shift+X` or `Cmd+Shift+X`).
|
||||
3. Search for "Flutter" and install the official extension published by Dart Code.
|
||||
4. Follow the prompts from the extension to install the Flutter SDK.
|
||||
|
||||
<br>
|
||||
|
||||
**Running Veilid Core Setup Scripts:**
|
||||
|
||||
In order to run the VeilidChat application, you will need the [Veilid repository](https://gitlab.com/veilid/veilid) repository set up correctly as mentioned in [Prerequisites](#prerequisites) above. The veilidchat setup scripts in [`./dev-setup`](./dev-setup) handle building the necessary Veilid components and checking for or installing other required tools like `protoc`.
|
||||
|
||||
**Note:** These scripts require Flutter to be **already installed and accessible in your system's PATH** before they are run.
|
||||
|
||||
To run these setup scripts (from the [`veilidchat`](veilidchat) directory):
|
||||
|
||||
* For Linux Systems: Run [./dev-setup/setup_linux.sh](./dev-setup/setup_linux.sh) (Installs protoc and protoc-gen-dart)
|
||||
* For Mac Systems: Run [./dev-setup/setup_macos.sh](./dev-setup/setup_macos.sh) (Installs protoc and protoc-gen-dart)
|
||||
* For Windows Systems: Run [./dev-setup/setup_windows.bat](./dev-setup/setup_windows.bat) (**Requires manual installation of protoc beforehand**)
|
||||
(check [`./dev-setup`](./dev-setup) for other platforms)
|
||||
|
||||
These scripts will check for required dependencies and set up the environment. For Windows users, please ensure you have manually downloaded and installed the protoc compiler (version 25.3 or higher is recommended) and added its directory to your system's PATH *before* running the setup script. The Windows script will verify its presence.
|
||||
|
||||
|
||||
**Note on Python Environments:** The dev-setup scripts in the main Veilid repository may utilize Python virtual environments (`venv`) for managing dependencies needed for build processes (like FFI generation scripts). If your system uses a system-managed Python environment or you encounter permission issues, ensure you follow any instructions provided by the setup scripts regarding environment activation or configuration.
|
||||
|
||||
|
||||
### Verifying Installation
|
||||
|
||||
After installing Flutter and running the ./dev-setup scripts, verify that everything is set up correctly. Open a terminal and run the following command from anywhere accessible by your PATH:
|
||||
|
||||
`$ flutter doctor`
|
||||
|
||||
This command checks your environment and displays a report of the status of your Flutter installation and connected devices. It will list any missing dependencies or configuration issues for common development platforms (Android, iOS, Web, Desktop).
|
||||
|
||||
|
||||
**Example Output (Partial):**
|
||||
```
|
||||
|
||||
## Updating Code
|
||||
$ flutter doctor
|
||||
Doctor summary (to see all details, run flutter doctor -v):
|
||||
[√] Flutter (Channel stable, 3.x.x, on macOS 13.x.x 22Gxxx darwin-x64, locale en-US)
|
||||
[√] Android toolchain - develop for Android devices (Android SDK version 3x.x.x)
|
||||
[!] Xcode - develop for iOS and macOS
|
||||
✗ Xcode installation is incomplete.
|
||||
Install Xcode from the App Store.
|
||||
[√] Chrome - develop for the web
|
||||
[√] Linux toolchain - develop for Linux desktop
|
||||
[√] VS Code (version 1.xx.x)
|
||||
[√] Connected device (1 available)
|
||||
|
||||
### To update the WASM binary from `veilid-wasm`:
|
||||
* Debug WASM: run `./dev-setup/wasm_update.sh`
|
||||
* Release WASM: run `./dev-setup/wasm_update.sh release`
|
||||
! Doctor found issues in 1 category.
|
||||
|
||||
Address any issues reported by `flutter doctor` before proceeding.
|
||||
```
|
||||
<br>
|
||||
|
||||
## Building and Launching
|
||||
|
||||
VeilidChat is a Flutter application and can be built and launched on various platforms supported by Flutter, provided you have the necessary SDKs and devices/emulators configured as verified by `flutter doctor`.
|
||||
|
||||
1. **Ensure Flutter dependencies are installed**:
|
||||
From the `veilidchat` directory, run:
|
||||
```bash
|
||||
flutter pub get
|
||||
```
|
||||
|
||||
2. **List available devices**:
|
||||
To see which devices (simulators, emulators, connected physical devices, desktop targets, web browsers) are available to run the application on, use the command:
|
||||
```bash
|
||||
flutter devices
|
||||
```
|
||||
|
||||
3. **Run on a specific device**:
|
||||
Use the `flutter run` command followed by the `-d` flag and the device ID from the `flutter devices` list.
|
||||
|
||||
* **Example (Android emulator/device):**
|
||||
Assuming an Android device ID like `emulator-5554`:
|
||||
```bash
|
||||
flutter run -d emulator-5554
|
||||
```
|
||||
If only one device is connected, you can often omit the `-d` flag.
|
||||
|
||||
* **Example (iOS simulator/device):**
|
||||
Assuming an iOS simulator ID like `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`:
|
||||
```bash
|
||||
flutter run -d xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` (replace with actual ID)
|
||||
```
|
||||
Or, to target the default iOS simulator:
|
||||
```bash
|
||||
flutter run -d simulator
|
||||
```
|
||||
|
||||
* **Example (Linux Desktop):**
|
||||
```bash
|
||||
flutter run -d linux
|
||||
```
|
||||
|
||||
* **Example (macOS Desktop):**
|
||||
```bash
|
||||
flutter run -d macos
|
||||
```
|
||||
|
||||
* **Example (Windows Desktop):**
|
||||
```bash
|
||||
flutter run -d windows
|
||||
```
|
||||
|
||||
* **Example (Web):**
|
||||
```bash
|
||||
flutter run -d web # Or a specific browser like 'chrome' or 'firefox' if listed by `flutter devices`
|
||||
```
|
||||
This will typically launch the application in your selected web browser.
|
||||
|
||||
<br>
|
||||
|
||||
## Updating the WASM Binary
|
||||
|
||||
### To update the WASM binary
|
||||
[from the `veilid-wasm` package located in [`../veilid/veilid-wasm`](../veilid/veilid-wasm)]
|
||||
|
||||
|
||||
From the VeilidChat repository working directory ([`./veilidchat`](./veilidchat)), run the appropriate script:
|
||||
|
||||
* Debug WASM: [`./dev-setup/wasm_update.sh`](./dev-setup/wasm_update.sh)
|
||||
* Release WASM: [`./dev-setup/wasm_update.sh release`](./dev-setup/wasm_update.sh)
|
||||
|
||||
<br>
|
||||
|
||||
Refer to the official [Flutter documentation](https://docs.flutter.dev/) for more detailed information on building and deployment with Flutter.
|
Loading…
Add table
Add a link
Reference in a new issue