Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,33 @@ jobs:
- name: Install deps
run: npm ci

- name: Build client
run: npm run build -w apps/client
- name: Bundle client with esbuild
run: |
cd apps/client
npx esbuild src/index.tsx \
--bundle \
--platform=node \
--external:ink \
--external:react \
--external:eventsource \
--external:node-notifier \
--external:vax-core.*.node \
--outfile=dist/index.js \
--format=esm \
--sourcemap

- name: Copy runtime files
run: |
cp -r apps/client/dist release/
cp apps/client/package.json release/client/
cp package-lock.json release/client/
cp install.sh release/

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: client-dist
path: apps/client/dist
path: release
retention-days: 5

# ─── Assemble release package ──────────────────────────────────────────
Expand All @@ -134,7 +153,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: client-dist
path: release/client
path: release

- name: Determine version
id: version
Expand Down Expand Up @@ -285,8 +304,9 @@ jobs:
run: |
cd release
tar -czf client.tar.gz client/
zip -r client.zip client/
echo "Client package size:"
du -sh client.tar.gz
du -sh client.tar.gz client.zip

- name: Create Release
uses: softprops/action-gh-release@v2
Expand Down
158 changes: 95 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,70 @@
# vox - Secure Terminal Chat
# VAX Chat — Secure Terminal Chat

A cryptographically secure, end-to-end encrypted terminal chat application.

## Features

- **End-to-End Encryption**: All messages are encrypted using Ed25519 signatures and XChaCha20-Poly1305
- **Zero-Knowledge**: Server never sees message content - only encrypted payloads
- **End-to-End Encryption**: All messages encrypted with Ed25519 signatures and XChaCha20-Poly1305
- **Zero-Knowledge**: Server never sees message content only encrypted payloads
- **2FA Support**: TOTP-based two-factor authentication
- **Terminal-First**: Built with neo-blessed for a performant CLI experience
- **Terminal-First**: Built with Ink (React) for a reactive, modern CLI experience
- **Real-Time**: Server-Sent Events (SSE) for instant message delivery
- **Cross-Platform**: Linux, macOS, and Windows binaries via GitHub Releases

## Architecture
## Install

### Linux / macOS

```bash
curl -sSL https://raw.githubusercontent.com/LyeZinho/vox/main/install.sh | bash
```
┌─────────────────────────────────────────────────────┐
│ Terminal Client │
│ ┌─────────────┐ ┌──────────────┐ ┌────────────┐ │
│ │ TUI │ │ State │ │ Rust │ │
│ │ (blessed) │◄─┤ Manager │◄─┤ Core │ │
│ └─────────────┘ └──────────────┘ │ (crypto) │ │
│ └────────────┘ │
└─────────────────────────────────────────────────────┘
HTTPS + SSE
┌─────────────────────────────────────────────────────┐
│ Relay Server │
│ ┌─────────────┐ ┌──────────────┐ ┌────────────┐ │
│ │ NestJS │ │ Redis │ │ Postgres │ │
│ │ API │◄─┤ Pub/Sub │ │ Database │ │
│ └─────────────┘ └──────────────┘ └────────────┘ │
└─────────────────────────────────────────────────────┘

### Windows

```powershell
irm https://raw.githubusercontent.com/LyeZinho/vox/main/install.ps1 | iex
```

### Version

```bash
# Install specific version
curl -sSL https://raw.githubusercontent.com/LyeZinho/vox/main/install.sh | bash -s 1.0.0

# Install latest pre-release (dev build)
curl -sSL https://raw.githubusercontent.com/LyeZinho/vox/ink-migration/install.sh | bash
```

## Quick Start
### Custom Server

```bash
VAX_SERVER=https://your-server.com vax
# or
export VAX_SERVER=https://your-server.com
vax
```

Default server: `https://vox.devscafe.org`

## Development

### Prerequisites

- Node.js 20+
- Node.js 22+
- Rust (for building the crypto core)
- Docker & Docker Compose (for server)

### Development Setup
### Setup

```bash
# Clone the repository
git clone https://github.com/yourusername/tchat.git
cd tchat

# Install dependencies
git clone https://github.com/LyeZinho/vox.git
cd vox
npm install

# Build the Rust crypto core
npm run build:core

# Start the backend (requires Docker)
# Start the backend
docker-compose up -d

# Start the server
Expand All @@ -64,22 +74,56 @@ npm run dev:server
npm run dev:client
```

### Production Deployment

```bash
# Build everything
npm run build
## Architecture

# Deploy with Docker
docker-compose up -d --build
```
┌─────────────────────────────────────────────────────┐
│ Terminal Client │
│ ┌─────────────┐ ┌──────────────┐ ┌────────────┐ │
│ │ TUI │ │ State │ │ Rust │ │
│ │ (Ink) │◄─┤ (Store) │◄─┤ Core │ │
│ │ React │ │ useReducer │ │ (crypto) │ │
│ └─────────────┘ └──────────────┘ └────────────┘ │
└─────────────────────────────────────────────────────┘
HTTPS + SSE
┌─────────────────────────────────────────────────────┐
│ Relay Server │
│ ┌─────────────┐ ┌──────────────┐ ┌────────────┐ │
│ │ NestJS │ │ Redis │ │ Postgres │ │
│ │ API │◄─┤ Pub/Sub │ │ Database │ │
│ └─────────────┘ └──────────────┘ └────────────┘ │
└─────────────────────────────────────────────────────┘
```

## Usage

1. **First Launch**: Enter email and password to create your vault
2. **Subsequent Launches**: Enter password to unlock your private key
3. **Send Messages**: Type in the input bar and press Enter
4. **Navigate**: Use arrow keys to move between channels
4. **Commands**: Type `/help` to see all available commands

### Commands

| Command | Description |
|---------|-------------|
| `/join <room>` | Join a room |
| `/create <name>` | Create a new room |
| `/rooms` | List available rooms |
| `/leave` | Leave current room |
| `/theme <name>` | Switch theme (default, dracula, nord) |
| `/clear` | Clear chat |
| `/quit` | Exit VAX Chat |

### Keybindings

| Key | Action |
|-----|--------|
| `Ctrl+C` / `q` | Quit |
| `Ctrl+P` | Toggle privacy mode |
| `↑ / ↓` | Scroll chat history |
| `Tab` | Navigate form fields (onboarding) |

## Security

Expand All @@ -97,38 +141,26 @@ docker-compose up -d --build
3. Only the public key is ever transmitted to the server
4. Messages are signed before encryption

## API Endpoints

| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/chat/messages` | Send encrypted message |
| GET | `/chat/stream?roomId=X` | SSE message stream |
| GET | `/chat/history/:roomId` | Message history |
| POST | `/users/:pubKey/2fa/setup` | Setup 2FA |
| POST | `/users/:pubKey/2fa/enable` | Enable 2FA |

## Environment Variables

### Server
### Client

| Variable | Default | Description |
|----------|---------|-------------|
| DATABASE_URL | - | PostgreSQL connection string |
| REDIS_URL | redis://localhost:6379 | Redis connection string |
| PORT | 3000 | Server port |
| `VAX_API_URL` | `https://vox.devscafe.org` | Server URL |
| `VAX_SERVER` | `https://vox.devscafe.org` | Alias for `VAX_API_URL` |
| `VAX_HOME` | `~/.vax` | Installation directory |

### Client
### Server

| Variable | Default | Description |
|----------|---------|-------------|
| TCHAT_API_URL | http://localhost:3000 | Server URL |
| `DATABASE_URL` | — | PostgreSQL connection string |
| `REDIS_URL` | `redis://localhost:6379` | Redis connection string |
| `PORT` | `3000` | Server port |

## License

MIT License - see LICENSE file
See `.env.example` for a full configuration template.

## Contributing
## License

1. Fork the repository
2. Create a feature branch
3. Submit a Pull Request
MIT License — see LICENSE file
Loading
Loading