Skip to content

About

Threadbyte is a group chat platform built for developers and small teams working on real code together.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

39 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Threadbyte ⚑

Next-Gen AI-Powered Developer Chat & Collaboration Platform

CI/CD Pipeline Go Version Next.js PostgreSQL TypeScript Tailwind CSS Docker License: MIT


🌐 Live Demo

Live Deployment: https://threadbyte.vercel.app/ (Demo URL Placeholder)


πŸ“– Overview

Threadbyte is a high-performance, real-time developer communication and collaboration platform designed specifically for software engineering teams. It bridges instant WebSocket communication with contextual AI code analysis, multi-provider model routing, zero-trust security, and group membership governance.

Developers can discuss codebases, upload multi-file archives, review algorithm snippets, and interact with AI models (OpenRouter Free, Google Gemini, OpenAI) that understand the entire conversation history.


πŸ“Έ Visual Showcase

1. Authentication (Login & Register)

Login Screen

Threadbyte Login Screen

Registration Screen

Threadbyte Register Screen

2. Collaboration Hub & Developer Profile

Main Chat Interface (Dual-Card AI Analysis & Code View)

Threadbyte Main Chat

Developer Profile & Activity

Threadbyte User Profile

3. Comprehensive Group Settings

General Settings & Repo Links

Group General Settings

Multi-Provider AI Keys (UUID Management)

Group AI Settings

Membership Join Requests

Join Requests Management

✨ Key Features

  • ⚑ Real-Time Collaboration: Sub-millisecond WebSocket bidirectional chat, live typing indicators, and user presence tracking.
  • πŸ€– Context-Aware Multi-Provider AI:
    • Full group conversational memory fed into AI queries for deep, continuous context.
    • Seamless switching between OpenRouter (Free), Google Gemini, and OpenAI / ChatGPT.
    • 3-level prompt hierarchy: Hardened System Prompt $\rightarrow$ Group Custom Prompt $\rightarrow$ Message-level Override.
  • πŸ”’ Zero-Trust Security & Data Sanitization:
    • Strict server-side verification: Group settings and AI configurations are strictly restricted to the group creator (created_by).
    • Passwords (bcrypt), OAuth tokens, and API keys are masked with json:"-" and never returned in API payloads.
  • πŸ‘₯ Invite Link & Join Requests System:
    • Secure invite codes preview group information without automatically granting entry.
    • Owners review pending join requests with one-click Approve or Reject actions.
  • 🌐 Instant Multilingual Translation:
    • Translate any message or AI analysis into Persian (فارسی), English, German (Deutsch), French (FranΓ§ais), Spanish (EspaΓ±ol), Arabic (Ψ§Ω„ΨΉΨ±Ψ¨ΩŠΨ©), Russian (Русский), and Chinese (δΈ­ζ–‡).
  • πŸ“‚ Developer File Attachments:
    • Native support for ZIP code archives, PDFs, audio, video, and high-resolution images.

πŸ› οΈ Architecture & Tech Stack

graph TD
    Client["Client (Next.js 16 + React 19 + Tailwind CSS)"]
    WS["WebSocket Gateway"]
    API["Gin HTTP Router (Go 1.25)"]
    Auth["JWT & Security Middleware"]
    DB[(PostgreSQL 16 Database)]
    AI["AI Engine (OpenRouter / Gemini / OpenAI)"]

    Client <-->|Real-time Events| WS
    Client <-->|REST API| API
    API --> Auth
    Auth --> DB
    API --> DB
    API --> AI
Loading

Frontend

  • Framework: Next.js 16 (App Router, Turbopack)
  • UI & Styling: React 19, Tailwind CSS 4, Radix / Shadcn primitives, Lucide Icons, Sonner
  • State & Communication: React Hook Form, Zod, Axios, WebSockets
  • Testing: Jest, Testing Library (@testing-library/react, @testing-library/jest-dom)

Backend

  • Language & Server: Go 1.25, Gin Web Framework
  • Persistence & ORM: PostgreSQL 16, SQLC (Type-safe SQL generation), pgx/v5
  • Authentication: Stateless JWT (golang-jwt/jwt/v5), bcrypt password hashing, AES encryption
  • Testing: Go standard testing package, race detector, mock queries

πŸ“ Repository Structure

Threadbyte/
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”‚       └── ci.yml                 # Automated CI/CD workflow
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ cmd/server/main.go         # Application entry point
β”‚   β”œβ”€β”€ db/
β”‚   β”‚   β”œβ”€β”€ migrations/            # Versioned SQL schema migrations
β”‚   β”‚   └── queries/               # SQLC prepared query definitions
β”‚   β”œβ”€β”€ internal/
β”‚   β”‚   β”œβ”€β”€ ai/                    # Multi-provider AI engine (OpenAI, Gemini)
β”‚   β”‚   β”œβ”€β”€ api/                   # Handlers, routes, and security middleware
β”‚   β”‚   β”œβ”€β”€ database/              # PostgreSQL connection & auto-migrations
β”‚   β”‚   └── service/               # Core business logic & sanitized DTOs
β”‚   β”œβ”€β”€ pkg/utils/                 # JWT, password hashing, cryptography
β”‚   β”œβ”€β”€ Dockerfile                 # Multi-stage production Docker build
β”‚   └── Makefile                   # Build and development scripts
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ app/                       # Next.js App Router (pages & layouts)
β”‚   β”œβ”€β”€ components/                # Modular React UI components
β”‚   β”œβ”€β”€ lib/                       # API clients, types, validations, auth context
β”‚   β”œβ”€β”€ __tests__/                 # Jest unit and component test suites
β”‚   └── Dockerfile                 # Next.js standalone container
β”œβ”€β”€ screenshots/                   # Application screenshots for documentation
└── docker-compose.yml             # Full-stack container orchestration

πŸš€ Getting Started

Prerequisites

  • Docker & Docker Compose
  • Or for local development: Go 1.25+, Node.js 20+, pnpm 10+, PostgreSQL 16+

Option 1: Quickstart with Docker Compose (Recommended)

  1. Clone the repository:

    git clone https://github.com/v-urit/Threadbyte.git
    cd Threadbyte
  2. Configure environment variables: Create a .env file in the root or backend/ directory:

    PORT=8080
    DATABASE_URL=postgres://postgres:postgres@postgres:5432/threadbyte?sslmode=disable
    JWT_SECRET=super-secure-production-jwt-secret-key-32-chars
    CORS_ALLOWED_ORIGINS=http://localhost:3000
    OPENAI_API_KEY=sk-or-v1-your-openrouter-key
    GEMINI_API_KEY=your-gemini-key
  3. Start the full stack:

    docker compose up --build
  4. Access the application:


Option 2: Local Development Setup

1. Backend Setup

cd backend
# Start PostgreSQL database (via local docker or system service)
docker compose up -d postgres

# Run database migrations and start server
make run
# Or directly: go run cmd/server/main.go

2. Frontend Setup

cd frontend
# Install dependencies
pnpm install

# Start Next.js development server
pnpm run dev

πŸ§ͺ Testing

Backend Unit & Integration Tests

cd backend
go test -v -race ./...

Frontend Unit & Component Tests

cd frontend
pnpm test

πŸ“œ License

This project is licensed under the MIT License β€” see the LICENSE file for details.

About

Threadbyte is a group chat platform built for developers and small teams working on real code together.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages