A desktop version of the Tella app made to share files offline via Nearby Sharing. This application enables secure, encrypted file transfers between devices without relying on external servers, prioritizing privacy and security for sensitive data exchange.
Nearby Sharing is available for Tella Android, Tella iOS and Tella Desktop.
User facing documentation:
- about the Nearby Sharing in general: https://tella-app.org/nearby-sharing
- about Tella Desktop: https://tella-app.org/get-started-desktop/
- Go 1.24 or later
- Node.js 20.11.1 or later
- Wails CLI (v2.10.1+)
To install Wails:
go install github.com/wailsapp/wails/v2/cmd/wails@latest- Clone the repository
- Install frontend dependencies:
cd frontend
npm install --include=dev- Run in development mode:
wails devFor Linux systems, you may need to use:
wails dev -tags webkit2_41This will start both the backend server and frontend development server with hot reload.
Note: during development (running with wails dev) the application will output debug logs that are
not visible when running a release build.
Frontend files (React) can be found at frontend/src/. The vast majority of
all the React code resides in frontend/src/Components.
Backend files reside in backend split across folders app,
core, and utils.
app: Logic to bootstrap the application. Also declares public methods on the backend which can be called by the frontend.core: Holds majority of the code - all logic, database operations, http handlers and routes, and any other server-side handling.utils: Various utilities dealing with auth, file storage, network, and TLS.
The backend is divided logically across different "services" for the following domains:
- Database: everything related to the database
- Authentication: deals with user authentication and local encryption
- Registration: handles setting up a new transfer session
- Transfer: takes care of an ongoing transfer session
- Server: the HTTPS server
- File storage: bundles together all file storage and file manipulation functions
Each service package has the following structure:
handler.go: sets up any HTTP handlers if needed / instantiates the service.ports.go: declare the public interface of the server.service.go: the concrete implementation of the specific service.models.go: declares struct types.
To build a production version:
wails buildThe built application will be in the build/bin directory.
We can leverage the Zig toolchain to easily cross-compile golang projects with CGO dependencies, as demonstrated in article 1, article 2 and combine that with Wails manual builds.
- Install the Zig compiler
- Run the script
build-for-windows.sh
The Windows executable will be saved as tella.exe.
build-for-windows.sh
#!/bin/bash
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 CC="zig cc -target x86_64-windows" CXX="zig cc -target x86_64-windows" wails build -ldflags "-w -s" -o tella.exeA basic configuration file exists called desktop-settings.toml. It currently controls the
following settings:
# the maximum allowed file size to be sent. currently 3GB
maxFileSizeBytes = 3000000000
# maximum amount of files allowed to be sent in a single transfer session
maxFileCount = 1000
# the default port used
defaultPort = 53320The config file can be found at:
- Linux:
~/.config/desktop-settings.toml - Windows:
~\AppData\Local\Tella\desktop-settings.toml - OSX:
~/Library/Application Support/Tella/desktop-settings.toml
If you need to change the default port, changing this file is how you can accomplish it currently. In the future a settings pane will be added for changing settings directly in the application.
The application implements the Tella Nearby Sharing protocol with the following endpoints:
- Default Port: 53320
POST /api/v1/ping- Initial handshake for manual connectionsPOST /api/v1/register- Device registration with PIN authenticationPOST /api/v1/prepare-upload- Prepare file transfer sessionPUT /api/v1/upload- File upload with binary data
POST /api/v1/close-connection
The application is configured for code signing and notarization on macOS for distribution outside the App Store:
- Uses Developer ID Application certificate for notarization
- Includes hardened runtime options for security
- Requires valid Apple Developer account for signing
The GitHub Actions macOS build expects these repository secrets:
MACOS_CERTIFICATE_BASE64- Base64 encoded.p12certificateMACOS_CERTIFICATE_PASSWORD- Password for the.p12certificateKEYCHAIN_PASSWORD- Temporary CI keychain passwordAPPLE_ID- Apple ID email with access to the developer teamAPPLE_APP_SPECIFIC_PASSWORD- App-specific password for notarization
The certificate identity is configured in wails.json as Developer ID Application: Horizontal (6ZG9T42688).
- Mobile: Compatible with Tella iOS and Android apps using the same P2P protocol
- Network: Requires devices to be on the same local network (Wi-Fi)