https://github.com/bravo68web/is-he-online
Live Presense Tracker // ๐
https://github.com/bravo68web/is-he-online
discord livestream presense rpc sse vscode-extension
Last synced: 8 months ago
JSON representation
Live Presense Tracker // ๐
- Host: GitHub
- URL: https://github.com/bravo68web/is-he-online
- Owner: BRAVO68WEB
- Created: 2025-08-07T10:32:40.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-08-07T19:39:24.000Z (8 months ago)
- Last Synced: 2025-08-18T02:50:01.910Z (8 months ago)
- Topics: discord, livestream, presense, rpc, sse, vscode-extension
- Language: TypeScript
- Homepage:
- Size: 199 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Is He Online? ๐
[](https://turbo.build)
[](https://github.com/uNetworking/uWebSockets.js)
[](https://typescriptlang.org)
A blazing-fast, real-time presence monitoring system for Discord and VSCode activity broadcasting built with modern tools and architecture.
## ๐๏ธ Architecture
This project uses a **Turborepo monorepo** structure for better organization and development experience:
```
โโโ packages/
โ โโโ api/ # @is-he-online/broadcast-api - Ultra-fast uWebSockets.js server
โโโ apps/
โ โโโ demo/ # @is-he-online/demo - Real-time web dashboard
โ โโโ vscode-ext/ # @is-he-online/vsc - VS Code presence monitor
```
## โก Key Features
- ๐ **Ultra-fast uWebSockets.js** - C++ performance, 8x faster than Node.js HTTP
- ๐ก **Unlimited SSE streaming** - No timeout limitations, infinite connections
- ๐ **Secure API authentication** - API key-based middleware protection
- ๐ค **Real-time Discord monitoring** - Track user presence and activities
- ๐ป **VSCode integration** - Monitor coding sessions, workspace, and Git info
- ๐๏ธ **Modern monorepo** - Turborepo for efficient development workflow
- ๐ฏ **TypeScript everywhere** - Full type safety across all packages
## ๐ Quick Start
### Prerequisites
- Node.js 20+
- Discord Bot Token
- Target Discord User ID
### 1. Clone and Install
```bash
git clone https://github.com/BRAVO68WEB/is-he-online
cd is-he-online
yarn install
```
### 2. Configure Environment
```bash
cd packages/api
cp .env.example .env
# Edit .env with your Discord credentials
```
### 3. Build All Packages
```bash
yarn run build
```
### 4. Start Development
```bash
# Start API server
yarn run dev --workspace packages/api
# Start demo client (new terminal)
yarn run dev --workspace apps/demo
# Package VSCode extension (optional)
yarn run build --workspace apps/vscode-ext
yarn run package --workspace apps/vscode-ext
```
## ๐ฆ Packages
### ๐ Broadcast API (`@is-he-online/broadcast-api`)
Ultra-fast Discord and VSCode activity broadcasting API built with uWebSockets.js.
**Features:**
- Discord bot integration with presence monitoring
- Real-time SSE streaming without timeouts
- Secure API key authentication for VSCode endpoint
- Health monitoring and activity endpoints
**Tech Stack:**
- uWebSockets.js for ultra-fast HTTP/SSE
- Discord.js for bot functionality
- TypeScript for type safety
### ๐ Demo Dashboard (`@is-he-online/demo`)
Real-time web dashboard for visualizing Discord and VSCode presence activity.
**Features:**
- Live SSE connection to API server
- Real-time Discord presence display
- VSCode coding session visualization
- Modern, responsive UI
### ๐ง VS Code Presence Monitor (`@is-he-online/vsc`)
Bravo's VSCode extension that monitors presence activity and broadcasts it to the API.
**Features:**
- Real-time workspace and file tracking
- Git repository information detection
- Secure API communication with key authentication
- Configurable update intervals
- Status bar integration
## ๐ ๏ธ Development
### Available Scripts
| Command | Description |
|---------|-------------|
| `yarn run build` | Build all packages |
| `yarn run dev` | Start all packages in development mode |
| `yarn run lint` | Lint all packages |
| `yarn run clean` | Clean all build outputs |
### Workspace Commands
| Workspace | Description |
|-----------|-------------|
| `yarn run dev --workspace packages/api` | Start broadcast API server |
| `yarn run dev --workspace apps/demo` | Start demo dashboard |
| `yarn run build --workspace apps/vscode-ext` | Build VS Code extension |
## ๐ง Configuration
### API Server (packages/api/.env)
```env
DISCORD_TOKEN=your_discord_bot_token
TARGET_USER_ID=your_discord_user_id
PORT=3000
API_KEY=your_secure_api_key # Optional, auto-generated if not provided
```
### VS Code Extension Settings
- **Server URL**: `http://localhost:3000` (default)
- **Update Interval**: `1000ms` (default)
- **API Key**: Set via command palette
- **Enable/Disable**: Toggle presence monitoring
## ๐ API Endpoints
| Endpoint | Method | Description | Authentication |
|----------|--------|-------------|----------------|
| `/health` | GET | Health check and status | None |
| `/activity` | GET | Current Discord activity | None |
| `/events` | GET | SSE stream for real-time updates | None |
| `/vscode-activity` | POST | VSCode activity updates | ๐ API Key Required |
## ๐ฏ Performance Benefits
### uWebSockets.js vs Traditional Solutions
| Metric | uWebSockets.js | Node.js HTTP | Improvement |
|--------|----------------|--------------|-------------|
| **Throughput** | ~1M req/s | ~125k req/s | **8x faster** |
| **Memory Usage** | Low | High | **50% less** |
| **SSE Connections** | Unlimited | Limited | **No timeouts** |
| **Latency** | Ultra-low | Standard | **3x lower** |
## ๐งช Testing
Test individual components:
```bash
# Test API server
curl http://localhost:3000/health
# Test SSE connection
curl -N http://localhost:3000/events
# Test protected endpoint (with API key)
curl -X POST -H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{"workspace":{"name":"test"},"editor":{"fileName":"test.ts"}}' \
http://localhost:3000/vscode-activity
```
## ๐ค Contributing
1. Fork the repository
2. Create your feature branch: `git checkout -b feature/amazing-feature`
3. Commit your changes: `git commit -m 'Add amazing feature'`
4. Push to the branch: `git push origin feature/amazing-feature`
5. Open a Pull Request
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## ๐ Acknowledgments
- [uWebSockets.js](https://github.com/uNetworking/uWebSockets.js) - Ultra-fast WebSocket and HTTP library
- [Discord.js](https://discord.js.org) - Powerful Discord API library
- [Turborepo](https://turbo.build) - High-performance build system
- [TypeScript](https://typescriptlang.org) - Typed JavaScript at scale