Skip to content

AriajSarkar/ByteHub

⚡ ByteHub

GitHub → Governance → Discord

A powerful bridge that connects your GitHub repositories to Discord, providing real-time notifications, project governance, and community engagement tools.

License Rust CI

Buy Me A Coffee


✨ Features

  • 🔔 Real-time GitHub Notifications - Issues, PRs, Releases, Workflow runs
  • 🏛️ Project Governance - Approve/deny projects via Discord commands
  • 📢 Smart Announcements - Auto-announce releases and bounty issues
  • 🤖 Bot Filtering - Automatically filter out bot activity
  • 🧵 Forum Integration - Create dedicated forum channels per project
  • 🔐 Secure - Signature verification for GitHub webhooks and Discord interactions

🦀 Powered By

CrabGraph

ByteHub uses CrabGraph - a safe, ergonomic, high-performance cryptographic library for Rust built on audited primitives.

crabgraph = "0.3"

🚀 Quick Start

Prerequisites

  • Rust 1.91+
  • Convex account (free tier available)
  • Node.js 18+ (for Convex functions)
  • Discord Bot Token
  • GitHub Webhook Secret

Environment Variables

cp .env.example .env

Edit .env with your credentials:

CONVEX_URL=https://your-project.convex.cloud
GITHUB_WEBHOOK_SECRET=your_secret
DISCORD_PUBLIC_KEY=your_key
DISCORD_BOT_TOKEN=your_token
DISCORD_APPLICATION_ID=your_app_id

Setup Convex

pnpm install
npx convex dev --once --configure=new

Run Locally

cargo run

Run with Docker

# Build the image
docker build -t bytehub .

# Run with runtime environment
docker run -p 3000:3000 --env-file .env bytehub

📡 Endpoints

Method Path Description
GET / Health check
GET /health JSON status
POST /webhooks/github GitHub webhook receiver
POST /webhooks/discord Discord interactions endpoint

🛠️ Discord Commands

Command Description
/setup-server Initialize ByteHub channels in your server
/approve <repo> Approve a project for tracking
/deny <repo> Deny/remove a project
/submit-project <repo> Submit a project for approval
/list List all tracked projects

🧪 Testing

# Run all tests
cargo test

# Run specific test suite
cargo test --test discord_interactions
cargo test --test github_issue

🏗️ Project Structure

src/
├── discord/       # Discord client, commands, formatters
├── github/        # GitHub webhook handling, events
├── governance/    # Project approval, rules, whitelist
├── router/        # Event dispatching
└── storage/       # Database layer

tests/
├── discord/       # Discord interaction tests
├── github/        # GitHub webhook tests
└── common/        # Shared test utilities

📜 License

This project is licensed under the ByteHub Source Available License.

  • ✅ Free for revenue under $10,000/year
  • 💰 3% royalty for $10K-$100K revenue
  • 💰 5% royalty for $100K+ revenue
  • 📝 Attribution required

See LICENSE.md for full terms.


🤝 Contributing

We welcome contributions! Please read our Contributing Guide before submitting PRs.

⚠️ By contributing, you agree to our Contributor License Agreement.


🔒 Security

Found a vulnerability?

See SECURITY.md for our security policy.


💖 Support

If ByteHub helps your project, consider supporting development:

Buy Me A Coffee


Made with ❤️ in India

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Contributors 2

  •  
  •