5.2 KiB
Toju / Zoracord
Desktop chat app with three parts:
src/Angular clientelectron/desktop shell, IPC, and local databaseserver/directory server, join request API, and websocket events
Install
- Run
npm install - Run
cd server && npm install - Copy
.env.exampleto.env
Config
Root .env:
SSL=trueuses HTTPS for Angular, the server, and Electron dev modePORT=3001changes the server port
If SSL=true, run ./generate-cert.sh once.
Server files:
server/data/variables.jsonholdsklipyApiKeyserver/data/variables.jsonalso holdsreleaseManifestUrlfor desktop auto updates
Desktop auto updates
The packaged Electron app now reads a hosted release manifest from the active server's /api/health response.
Release flow:
-
Build the desktop packages with
npm run electron:buildor the platform-specific Electron Builder commands. -
Upload one version folder that contains the generated
latest.yml,latest-mac.yml,latest-linux.yml, and the matching installers/artifacts. -
Generate or update the hosted manifest JSON with:
npm run release:manifest -- --feed-url https://your-cdn.example.com/metoyou/1.2.3 -
Set
releaseManifestUrlinserver/data/variables.jsonto the hosted manifest JSON URL.
GitHub / Gitea release assets
If you publish desktop builds as release assets, use the release download URL as the manifest feedUrl.
Examples:
-
GitHub tag
v1.2.3:https://github.com/OWNER/REPO/releases/download/v1.2.3 -
Gitea tag
v1.2.3:https://gitea.example.com/OWNER/REPO/releases/download/v1.2.3
That release must include these assets with their normal Electron Builder names:
latest.ymllatest-mac.ymllatest-linux.yml- Windows installer assets (
.exe,.blockmap) - macOS assets (
.dmg,.zip) - Linux assets (
.AppImage,.deb)
You should also upload release-manifest.json as a release asset.
For a stable manifest URL, point the server at the latest-release asset URL:
-
GitHub:
https://github.com/OWNER/REPO/releases/latest/download/release-manifest.json -
Gitea: use the equivalent latest-release asset URL if your instance supports it, otherwise publish
release-manifest.jsonat a separate stable URL.
If you want the in-app "Specific version" option to list older releases too, keep one cumulative manifest and merge the previous file when generating the next one:
`npm run release:manifest -- --existing ./release-manifest.json --feed-url https://github.com/OWNER/REPO/releases/download/v1.2.3 --version 1.2.3`
The manifest format is:
{
"schemaVersion": 1,
"generatedAt": "2026-03-10T12:00:00.000Z",
"minimumServerVersion": "1.0.0",
"pollIntervalMinutes": 30,
"versions": [
{
"version": "1.2.3",
"feedUrl": "https://your-cdn.example.com/metoyou/1.2.3",
"publishedAt": "2026-03-10T12:00:00.000Z"
}
]
}
feedUrl must point to a directory that contains the Electron Builder update descriptors for Windows, macOS, and Linux.
Automated Gitea release queue
The Gitea workflows in .gitea/workflows/release-draft.yml and .gitea/workflows/publish-draft-release.yml keep the existing desktop auto-update flow intact.
On every push to main or master, the release workflow:
- Computes a semver release version from the current
package.jsonmajor/minor version and the workflow run number. - Builds the Linux and Windows Electron packages.
- Builds standalone server executables for Linux and Windows.
- Downloads the latest published
release-manifest.json, merges the new release feed URL, and uploads the updated manifest to the draft release. - Uploads the desktop installers, update descriptors, server executables, and
release-manifest.jsonto the matching Gitea release page.
The draft release uses the standard Gitea download path as its feedUrl:
`https://YOUR_GITEA_HOST/OWNER/REPO/releases/download/vX.Y.Z`
That means the current desktop auto-updater keeps working without any client-side changes once the draft release is approved and published.
To enable the workflow:
- Add a repository secret named
GITEA_RELEASE_TOKENwith permission to create releases and upload release assets. - Make sure your Gitea runner labels match the workflow
runs-onvalues (linuxandwindows). - After the draft release is reviewed, publish it either from the Gitea release page or by running the
Publish Draft Releaseworkflow with the queued release tag.
Main commands
npm run devstarts Angular, the server, and Electronnpm run electron:devstarts Angular and Electronnpm run server:devstarts only the servernpm run buildbuilds the Angular clientnpm run build:electronbuilds the Electron codenpm run build:allbuilds client, Electron, and servernpm run lintruns ESLintnpm run lint:fixformats templates, sorts template props, and fixes lint issuesnpm run testruns Angular tests
Server project
The code in server/ is a small Node and TypeScript service.
It handles the public server directory, join requests, websocket updates, and Klipy routes.
Inside server/:
npm run devstarts the server with reloadnpm run buildcompiles todist/npm run startruns the compiled server