Skip to content

Latest commit

 

History

90 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ LineTalk

Secure, keyboard-driven terminal chat for the modern developer.

LineTalk is a lightweight, keyboard-driven terminal application engineered for private, zero-distraction 1-to-1 communication. Built entirely in Go using the Charm ecosystem (Bubble Tea, Lipgloss), it brings client-side security and real-time WebSocket communication directly to your command line.


Go Version Bubble Tea PostgreSQL WebSocket License: MIT Latest Release


Explore Features • Quick Start • Local Development • Multi-Session Testing • Keybindings • Makefile


📸 Interface Preview

💬 Active Conversation & Real-Time Presence

Real-time direct messaging with instant WebSocket synchronization, unread counters, and live status bar.

LineTalk Chat Dashboard


🔐 Authentication & Session Switcher 👤 Identity & Profile Management
LineTalk Login Screen LineTalk Profile Edit
Fast keyboard navigation with persistent login Custom status bio, display name, and active connection info

✨ Key Features

  • 🛡️ Zero-Trust Security: Built with client-side privacy in mind so your private 1-to-1 conversations remain strictly confidential.
  • 🎨 Cyberpunk Minimalist TUI: Rendered with custom Lipgloss styling (#00F5FF, #FF007F, #00FF66) designed to seamlessly integrate into any dark terminal workflow.
  • ⚡ Blazing Fast Go Architecture: Powered by a lean Go API engine and Bubble Tea model for instant startup times (<10ms), minimal RAM footprint (<15MB), and zero input lag.
  • 🎯 Pure 1-to-1 Focus: Strip away channel clutter, unread notification bloat, and server hierarchies to focus purely on direct, line-by-line conversation.
  • 🔄 Live WebSockets & Heartbeat Resilience: Instant bidirectional message dispatch with automated ping/pong keep-alives and seamless auto-reconnect.
  • 👥 Multi-Window Session Sync: Test and operate multiple isolated identities (alice, bob, charlie) simultaneously in split terminal panes.

🏛️ System Architecture

┌──────────────────────────────────────────────────────────────────────────────────┐
│                                CLIENT WORKSPACE                                  │
│                                                                                  │
│   ┌────────────────────────────────┐            ┌────────────────────────────┐   │
│   │    Terminal Split 1 (Alice)    │            │  Terminal Split 2 (Bob)    │   │
│   │  [ Bubble Tea + Lipgloss TUI ] │            │ [ Bubble Tea + Lipgloss ]  │   │
│   └───────────────┬────────────────┘            └─────────────┬──────────────┘   │
└───────────────────┼───────────────────────────────────────────┼──────────────────┘
                    │ HTTPS / WSS                               │ HTTPS / WSS
                    ▼                                           ▼
┌──────────────────────────────────────────────────────────────────────────────────┐
│                       PRODUCTION BACKEND INFRASTRUCTURE                          │
│                                                                                  │
│   [ LiteSpeed / Apache Reverse Proxy (.htaccess) ]                               │
│       ├── Routes REST API traffic  ──► http://127.0.0.1:8080                     │
│       └── Upgrades WebSockets      ──► ws://127.0.0.1:8080/api/v1/ws             │
│                                                                                  │
│   [ Go API Engine (Gin + Goroutines + WS Hub) ]                                  │
│       ├── JWT Authentication & Session Resolver                                  │
│       ├── Goose Migrations (Embedded via embed.FS)                               │
│       └── sqlc Type-Safe Query Execution                                         │
│                                                                                  │
│   [ Neon Serverless PostgreSQL Database ] (TLS 1.3 Encrypted Connection)        │
└──────────────────────────────────────────────────────────────────────────────────┘

🚀 Quick Start (Pre-built Binaries)

Zero dependencies required. Download and run the standalone executable for your operating system directly from GitHub Releases:

Linux (x86_64 / ARM64)

curl -L -o linetalk https://github.com/DanielJohn17/tui-chat/releases/latest/download/linetalk-linux-amd64
chmod +x linetalk
./linetalk

macOS (Apple Silicon / Intel)

curl -L -o linetalk https://github.com/DanielJohn17/tui-chat/releases/latest/download/linetalk-darwin-arm64
chmod +x linetalk
./linetalk

Windows (PowerShell / Command Prompt)

Download linetalk-windows-amd64.exe from Releases and launch:

.\linetalk-windows-amd64.exe

Tip

Pre-built binaries are pre-configured with the production API endpoint out-of-the-box. No setup or .env configuration is needed for general users!


🛠️ Local Development Setup

1. Prerequisites

  • Go 1.22+
  • PostgreSQL (Local installation or free cloud instance on Neon)
  • Make

2. Clone Repository

git clone https://github.com/DanielJohn17/tui-chat.git
cd tui-chat

3. Environment Configuration (.env)

Create a .env file in the project root:

# Neon PostgreSQL Connection URI (or local database)
DATABASE_URL=postgresql://user:password@ep-sample-pooler.neon.tech/tui_chat_db?sslmode=require

# Server & Auth Configuration
PORT=8080
GO_ENV=development
JWT_SECRET_KEY=your_development_secret_key_here
JWT_EXP=259200

4. Database Setup & Automated Migrations

Migrations are embedded inside the Go executable and applied automatically on API startup. You can also manage them via make:

# Apply pending schema migrations
make migrate

# Populate database with sample mock users (alice, bob, charlie, etc.) and chat history
make seed

5. Launch Development Servers

Open two terminal splits to run the API and TUI client:

# Pane 1: Start Backend API (Listening on :8080)
make run-api

# Pane 2: Launch TUI Client
make run-tui

👥 Multi-Window Session Testing

LineTalk includes isolated session profile switches for seamless real-time testing across multiple accounts on the same machine:

# Terminal Split 1: Launch session for Alice
make dev-user1

# Terminal Split 2: Launch session for Bob
make dev-user2

# Launch custom isolated session profile
make run-tui SESSION=charlie

Note

Session tokens and identity states are stored locally per-profile in isolated session cache files so switching users never overwrites your default account.


⌨️ Keyboard Shortcuts

LineTalk is designed for fluid, 100% keyboard-driven interaction:

Navigation & Chat Controls

Keybinding Scope Action
j / k or ↑ / ↓ Global Navigate conversation list up / down
i / Enter Global Focus message input box (Typing Mode)
Esc Typing Mode Unfocus message input box (Navigation Mode)
Enter Typing Mode Send message
n Navigation Open New Direct Message modal
p Navigation Open Profile & Identity screen
? / Ctrl+H / F1 Global Open Interactive Keybinding Help
q / Ctrl+C Global Quit LineTalk cleanly

📋 Makefile Reference

Target Category Description
make build Build Compiles host binaries for both API and TUI into bin/
make build-api Build Compiles standalone backend API server binary
make build-tui Build Compiles host TUI client binary with embedded API_URL
make build-linux Build Cross-compiles Linux TUI binaries (amd64, arm64, 386, arm)
make build-windows Build Cross-compiles Windows executables (amd64, arm64, 386)
make build-all Build Compiles all platform release targets into bin/
make run-api Execute Starts Go Gin API server directly
make run-tui Execute Launches TUI client with default development profile
make dev-user1 Execute Launches TUI authenticated as sample user alice
make dev-user2 Execute Launches TUI authenticated as sample user bob
make seed Database Populates database with sample users, conversations, and chats
make migrate Database Applies goose database migrations
make migrate-down Database Rolls back the latest database migration
make test Quality Runs all unit and integration test suites
make sqlc Generate Regenerates type-safe database query models with sqlc
make fmt / make vet Quality Formats code and executes go vet static analysis

🚢 CI/CD & Automated Deployment

LineTalk uses a dual-pipeline GitHub Actions workflow:

  • Continuous Integration (ci.yml): Runs on every pull request to verify dependency checksums, validate test suites, and ensure clean multi-platform compilation.
  • Continuous Delivery (release.yml): Triggered automatically on version tags (git tag v1.0.1 && git push origin v1.0.1):
    1. Compiles standalone TUI client binaries for Linux, macOS, and Windows.
    2. Generates SHA256 checksums and publishes a GitHub Release.
    3. Securely deploys the private server binary to production cPanel hosting via SCP/SSH and executes a zero-downtime background restart.

📄 License

Distributed under the MIT License. See LICENSE for more information.

Built with ❤️ in Go and Bubble Tea.

About

Keyboard-driven Terminal User Interface (TUI) real-time chat client and Go backend built with Bubble Tea, Lip Gloss, and WebSockets.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages