Readme update

This commit is contained in:
2026-03-06 05:29:04 +01:00
parent 10467dfccb
commit 0fd7d8ce27
2 changed files with 33 additions and 51 deletions

View File

@@ -1,53 +1,49 @@
# Basic readme for Tuju / Zoracord
Peer-to-peer discord alternative for free
# Tuju / Zoracord
### Run it
1. npm i
2. add .env to root containing `SSL=true`
3. npm run dev
Desktop chat app with three parts:
## Code scaffolding
- `src/` Angular client
- `electron/` desktop shell, IPC, and local database
- `server/` directory server, join request API, and websocket events
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
## Install
```bash
ng generate component component-name
```
1. Run `npm install`
2. Run `cd server && npm install`
3. Copy `.env.example` to `.env`
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
## Config
```bash
ng generate --help
```
Root `.env`:
## Building
- `SSL=true` uses HTTPS for Angular, the server, and Electron dev mode
- `PORT=3001` changes the server port
To build the project run:
If `SSL=true`, run `./generate-cert.sh` once.
```bash
ng build
```
Server files:
This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.
- `server/data/variables.json` holds `klipyApiKey`
## Running unit tests
## Main commands
To execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command:
- `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
```bash
ng test
```
## Server project
## Running end-to-end tests
The code in `server/` is a small Node and TypeScript service.
It handles the public server directory, join requests, websocket updates, and Klipy routes.
For end-to-end (e2e) testing, run:
Inside `server/`:
```bash
ng e2e
```
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
## Additional Resources
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
- `npm run dev` starts the server with reload
- `npm run build` compiles to `dist/`
- `npm run start` runs the compiled server