feat: Add TURN server support
All checks were successful
Queue Release Build / prepare (push) Successful in 15s
Deploy Web Apps / deploy (push) Successful in 5m35s
Queue Release Build / build-linux (push) Successful in 24m45s
Queue Release Build / build-windows (push) Successful in 13m52s
Queue Release Build / finalize (push) Successful in 23s
All checks were successful
Queue Release Build / prepare (push) Successful in 15s
Deploy Web Apps / deploy (push) Successful in 5m35s
Queue Release Build / build-linux (push) Successful in 24m45s
Queue Release Build / build-windows (push) Successful in 13m52s
Queue Release Build / finalize (push) Successful in 23s
This commit is contained in:
165
README.md
165
README.md
@@ -1,119 +1,88 @@
|
||||
<img src="./images/icon.png" width="100" height="100">
|
||||
|
||||
# MetoYou / Toju
|
||||
|
||||
# Toju / Zoracord
|
||||
MetoYou is a desktop-first chat stack managed as an npm monorepo. The repository contains the Angular 21 product client, the Electron desktop shell, the Node/TypeScript signaling server, the Playwright E2E suite, and the Angular 19 marketing website.
|
||||
|
||||
Desktop chat app with four parts:
|
||||
## Packages
|
||||
|
||||
- `src/` Angular client
|
||||
- `electron/` desktop shell, IPC, and local database
|
||||
- `server/` directory server, join request API, and websocket events
|
||||
- `website/` Toju website served at toju.app
|
||||
| Path | Purpose | Docs |
|
||||
| --- | --- | --- |
|
||||
| `toju-app/` | Angular 21 product client | [toju-app/README.md](toju-app/README.md) |
|
||||
| `electron/` | Electron main process, preload bridge, IPC, and desktop integrations | [electron/README.md](electron/README.md) |
|
||||
| `server/` | Signaling server, server-directory API, and websocket runtime | [server/README.md](server/README.md) |
|
||||
| `e2e/` | Playwright end-to-end coverage for the product client | [e2e/README.md](e2e/README.md) |
|
||||
| `website/` | Angular 19 marketing site served separately from the product client | [website/README.md](website/README.md) |
|
||||
|
||||
## Install
|
||||
|
||||
1. Run `npm install`
|
||||
2. Run `cd server && npm install`
|
||||
3. Copy `.env.example` to `.env`
|
||||
1. Run `npm install` from the repository root.
|
||||
2. Run `cd server && npm install` for the server package.
|
||||
3. If you need to work on the marketing site, run `cd website && npm install`.
|
||||
4. Copy `.env.example` to `.env`.
|
||||
|
||||
## Config
|
||||
## Configuration
|
||||
|
||||
Root `.env`:
|
||||
- Root `.env` controls local SSL with `SSL=true|false`.
|
||||
- The server also honors an optional `PORT` environment override at runtime.
|
||||
- When `SSL=true`, run `./generate-cert.sh` once or let `./dev.sh` generate local certificates on first launch.
|
||||
- `server/data/variables.json` stores `klipyApiKey`, `releaseManifestUrl`, `serverPort`, `serverProtocol`, `serverHost`, and `linkPreview`. The server normalizes this file on startup.
|
||||
- When `serverProtocol` is `https`, the certificates in `.certs/` must exist and match the configured host or IP.
|
||||
|
||||
- `SSL=true` uses HTTPS for Angular, the server, and Electron dev mode
|
||||
- `PORT=3001` changes the server port in local development and overrides the server app setting
|
||||
## Main Commands
|
||||
|
||||
If `SSL=true`, run `./generate-cert.sh` once.
|
||||
- `npm run dev` starts the full desktop stack: server, product client, and Electron.
|
||||
- `npm run start` starts only the Angular product client in `toju-app/`.
|
||||
- `npm run electron:dev` starts the Angular product client and Electron together.
|
||||
- `npm run server:dev` starts only the server with reload.
|
||||
- `npm run build` builds the Angular product client to `dist/client`.
|
||||
- `npm run build:electron` builds the Electron code to `dist/electron`.
|
||||
- `npm run build:all` builds the product client, Electron, and server.
|
||||
- `npm run test` runs the product-client Vitest suite.
|
||||
- `npm run lint` runs ESLint across the repo.
|
||||
- `npm run lint:fix` formats Angular templates, sorts template properties, and applies ESLint fixes.
|
||||
- `npm run test:e2e`, `npm run test:e2e:ui`, `npm run test:e2e:debug`, and `npm run test:e2e:report` run the Playwright suite and report tooling.
|
||||
|
||||
Server files:
|
||||
|
||||
- `server/data/variables.json` holds `klipyApiKey`
|
||||
- `server/data/variables.json` also holds `releaseManifestUrl` for desktop auto updates
|
||||
- `server/data/variables.json` can now also hold optional `serverHost` (an IP address or hostname to bind to)
|
||||
- `server/data/variables.json` can now also hold `serverProtocol` (`http` or `https`)
|
||||
- `server/data/variables.json` can now also hold `serverPort` (1-65535)
|
||||
- When `serverProtocol` is `https`, the certificate must match the configured `serverHost` or IP
|
||||
|
||||
## Main commands
|
||||
|
||||
- `npm run dev` starts Angular, the server, and Electron
|
||||
- `npm run electron:dev` starts Angular and Electron
|
||||
- `npm run server:dev` starts only the server
|
||||
- `npm run build` builds the Angular client
|
||||
- `npm run build:electron` builds the Electron code
|
||||
- `npm run build:all` builds client, Electron, and server
|
||||
- `npm run lint` runs ESLint
|
||||
- `npm run lint:fix` formats templates, sorts template props, and fixes lint issues
|
||||
- `npm run test` runs 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 dev` starts the server with reload
|
||||
- `npm run build` compiles to `dist/`
|
||||
- `npm run start` runs the compiled server
|
||||
|
||||
# Images
|
||||
<img src="./website/src/images/screenshots/gif.png" width="700" height="400">
|
||||
<img src="./website/src/images/screenshots/screenshare_gaming.png" width="700" height="400">
|
||||
|
||||
## Main Toju app Structure
|
||||
## Repository Map
|
||||
|
||||
| Path | Description |
|
||||
|------|-------------|
|
||||
| `src/app/` | Main application root |
|
||||
| `src/app/core/` | Core utilities, services, models |
|
||||
| `src/app/domains/` | Domain-driven modules |
|
||||
| `src/app/features/` | UI feature modules |
|
||||
| `src/app/infrastructure/` | Low-level infrastructure (DB, realtime, etc.) |
|
||||
| `src/app/shared/` | Shared UI components |
|
||||
| `src/app/shared-kernel/` | Shared domain contracts & models |
|
||||
| `src/app/store/` | Global state management |
|
||||
| `src/assets/` | Static assets |
|
||||
| `src/environments/` | Environment configs |
|
||||
| --- | --- |
|
||||
| `toju-app/src/app/domains/` | Product-client bounded contexts and domain facades |
|
||||
| `toju-app/src/app/infrastructure/` | Shared client-side technical runtime such as persistence and realtime |
|
||||
| `toju-app/src/app/shared-kernel/` | Cross-domain contracts shared inside the product client |
|
||||
| `electron/` | Electron bootstrap, preload surface, IPC handlers, CQRS, and desktop adapters |
|
||||
| `server/src/` | Express app, websocket runtime, config, CQRS, and persistence layers |
|
||||
| `e2e/` | Playwright tests, helpers, fixtures, and page objects |
|
||||
| `website/src/` | Marketing-site pages, assets, and SSR entry points |
|
||||
| `tools/` | Build, release, formatting, and packaging scripts |
|
||||
|
||||
---
|
||||
## Product Client Docs
|
||||
|
||||
### Domains
|
||||
| Area | Docs |
|
||||
| --- | --- |
|
||||
| Domains index | [toju-app/src/app/domains/README.md](toju-app/src/app/domains/README.md) |
|
||||
| Access Control | [toju-app/src/app/domains/access-control/README.md](toju-app/src/app/domains/access-control/README.md) |
|
||||
| Attachment | [toju-app/src/app/domains/attachment/README.md](toju-app/src/app/domains/attachment/README.md) |
|
||||
| Authentication | [toju-app/src/app/domains/authentication/README.md](toju-app/src/app/domains/authentication/README.md) |
|
||||
| Chat | [toju-app/src/app/domains/chat/README.md](toju-app/src/app/domains/chat/README.md) |
|
||||
| Notifications | [toju-app/src/app/domains/notifications/README.md](toju-app/src/app/domains/notifications/README.md) |
|
||||
| Profile Avatar | [toju-app/src/app/domains/profile-avatar/README.md](toju-app/src/app/domains/profile-avatar/README.md) |
|
||||
| Screen Share | [toju-app/src/app/domains/screen-share/README.md](toju-app/src/app/domains/screen-share/README.md) |
|
||||
| Server Directory | [toju-app/src/app/domains/server-directory/README.md](toju-app/src/app/domains/server-directory/README.md) |
|
||||
| Theme | [toju-app/src/app/domains/theme/README.md](toju-app/src/app/domains/theme/README.md) |
|
||||
| Voice Connection | [toju-app/src/app/domains/voice-connection/README.md](toju-app/src/app/domains/voice-connection/README.md) |
|
||||
| Voice Session | [toju-app/src/app/domains/voice-session/README.md](toju-app/src/app/domains/voice-session/README.md) |
|
||||
| Persistence | [toju-app/src/app/infrastructure/persistence/README.md](toju-app/src/app/infrastructure/persistence/README.md) |
|
||||
| Realtime | [toju-app/src/app/infrastructure/realtime/README.md](toju-app/src/app/infrastructure/realtime/README.md) |
|
||||
| Shared Kernel | [toju-app/src/app/shared-kernel/README.md](toju-app/src/app/shared-kernel/README.md) |
|
||||
|
||||
| Path | Link |
|
||||
|------|------|
|
||||
| Attachment | [app/domains/attachment/README.md](src/app/domains/attachment/README.md) |
|
||||
| Auth | [app/domains/auth/README.md](src/app/domains/auth/README.md) |
|
||||
| Chat | [app/domains/chat/README.md](src/app/domains/chat/README.md) |
|
||||
| Screen Share | [app/domains/screen-share/README.md](src/app/domains/screen-share/README.md) |
|
||||
| Server Directory | [app/domains/server-directory/README.md](src/app/domains/server-directory/README.md) |
|
||||
| Voice Connection | [app/domains/voice-connection/README.md](src/app/domains/voice-connection/README.md) |
|
||||
| Voice Session | [app/domains/voice-session/README.md](src/app/domains/voice-session/README.md) |
|
||||
| Domains Root | [app/domains/README.md](src/app/domains/README.md) |
|
||||
## Supporting Docs
|
||||
|
||||
---
|
||||
- [doc/monorepo.md](doc/monorepo.md)
|
||||
- [doc/typescript.md](doc/typescript.md)
|
||||
- [docs/architecture.md](docs/architecture.md)
|
||||
|
||||
### Infrastructure
|
||||
## Screenshots
|
||||
|
||||
| Path | Link |
|
||||
|------|------|
|
||||
| Persistence | [src/app/infrastructure/persistence/README.md](src/app/infrastructure/persistence/README.md) |
|
||||
| Realtime | [src/app/infrastructure/realtime/README.md](src/app/infrastructure/realtime/README.md) |
|
||||
|
||||
---
|
||||
|
||||
### Shared Kernel
|
||||
|
||||
| Path | Link |
|
||||
|------|------|
|
||||
| Shared Kernel | [src/app/shared-kernel/README.md](src/app/shared-kernel/README.md) |
|
||||
|
||||
---
|
||||
|
||||
### Entry Points
|
||||
|
||||
| File | Link |
|
||||
|------|------|
|
||||
| Main | [main.ts](src/main.ts) |
|
||||
| Index HTML | [index.html](src/index.html) |
|
||||
| App Root | [app/app.ts](src/app/app.ts) |
|
||||
<img src="./website/src/images/screenshots/gif.png" width="700" height="400">
|
||||
<img src="./website/src/images/screenshots/screenshare_gaming.png" width="700" height="400">
|
||||
|
||||
Reference in New Issue
Block a user