.gitlab/issue_templates | ||
android | ||
assets | ||
dev-setup | ||
doc | ||
flatpak | ||
ios | ||
lib | ||
linux | ||
macos | ||
packages/veilid_support | ||
snap/gui | ||
test | ||
web | ||
windows | ||
.bumpversion.cfg | ||
.gitignore | ||
.gitlab-ci.yml | ||
.metadata | ||
analysis_options.yaml | ||
build.yaml | ||
CHANGELOG.md | ||
code_of_conduct.md | ||
CONTRIBUTING.md | ||
devtools_options.yaml | ||
flutter_01.png | ||
flutter_02.png | ||
flutter_03.png | ||
LICENSE | ||
process_flame.sh | ||
pubspec.lock | ||
pubspec.yaml | ||
README.md | ||
reset_run.bat | ||
reset_run.sh | ||
update_generated_files.bat | ||
update_generated_files.sh | ||
update_icons.sh | ||
version_bump.sh |
VeilidChat
Overview
VeilidChat is a decentralized, secure, and private chat application built upon the Veilid 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 VeilidChat: https://veilid.com/chat/
For more information about the Veilid network protocol and app development platform: https://veilid.com
Setup
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.
your_workspace/
├── veilid/ <-- Veilid core repository
└── veilidchat/ <-- This repository
Refer to the main Veilid repository for instructions.
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.
Option 2: Installation via IDE Extension (Beginner-friendly for VS Code)
Various 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.
- Open VS Code.
- Go to the Extensions view (
Ctrl+Shift+X
orCmd+Shift+X
). - Search for "Flutter" and install the official extension published by Dart Code.
- Follow the prompts from the extension to install the Flutter SDK.
Running Veilid Core Setup Scripts:
In order to run the VeilidChat application, you will need the Veilid repository repository set up correctly as mentioned in Prerequisites above. The veilidchat setup scripts in ./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
directory):
- For Linux Systems: Run ./dev-setup/setup_linux.sh (Installs protoc and protoc-gen-dart)
- For Mac Systems: Run ./dev-setup/setup_macos.sh (Installs protoc and protoc-gen-dart)
- For Windows Systems: Run ./dev-setup/setup_windows.bat (Requires manual installation of protoc beforehand)
(check
./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):
$ 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)
! Doctor found issues in 1 category.
Address any issues reported by `flutter doctor` before proceeding.
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
.
-
Ensure Flutter dependencies are installed: From the
veilidchat
directory, run:flutter pub get
-
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:
flutter devices
-
Run on a specific device: Use the
flutter run
command followed by the-d
flag and the device ID from theflutter devices
list.-
Example (Android emulator/device): Assuming an Android device ID like
emulator-5554
: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
:flutter run -d xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` (replace with actual ID)
Or, to target the default iOS simulator:
flutter run -d simulator
-
Example (Linux Desktop):
flutter run -d linux
-
Example (macOS Desktop):
flutter run -d macos
-
Example (Windows Desktop):
flutter run -d windows
-
Example (Web):
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.
-
Updating the WASM Binary
To update the WASM binary
[from the veilid-wasm
package located in ../veilid/veilid-wasm
]
From the VeilidChat repository working directory (./veilidchat
), run the appropriate script:
- Debug WASM:
./dev-setup/wasm_update.sh
- Release WASM:
./dev-setup/wasm_update.sh release
Refer to the official Flutter documentation for more detailed information on building and deployment with Flutter.