|
1 | | -# bgce-stream |
2 | 1 |
|
3 | | -[](https://opensource.org/licenses/MIT) |
4 | | -[](https://golang.org/) |
5 | | -[](https://webrtc.org/) |
6 | | -[](CONTRIBUTING.md) |
| 2 | +## Backend Integration Notes |
7 | 3 |
|
8 | | -> **Simple audio streaming for small communities** - Create rooms instantly, share links, and start streaming music or voice with friends. |
| 4 | +To transform this frontend into a fully functional streaming application, the backend must handle the following events and data flow: |
9 | 5 |
|
10 | | -## 🎵 What is bgce-stream? |
| 6 | +### Socket Events |
| 7 | +- **`join-stream`**: Payload `{ username: string, role: string }`. Server should add user to the room and broadcast update. |
| 8 | +- **`start-broadcast`**: Server marks the stream as live. |
| 9 | +- **`end-broadcast`**: Server cleans up room and notifies listeners. |
| 10 | +- **`toggle-mic`**: Payload `{ isMuted: boolean }`. Server broadcasts this state to all listeners to update their UI. |
| 11 | +- **`user-joined` / `user-left`**: Broadcast to all clients to update the `UserList`. |
11 | 12 |
|
12 | | -bgce-stream is a lightweight, browser-based audio streaming platform designed for small-to-medium communities ("bhai-brother" groups). It enables instant room creation, shareable links, and high-quality audio streaming without complex setup or UI overhauls. |
| 13 | +### WebRTC / Streaming |
| 14 | +- **Signaling Server**: Implement Webrtc signaling (offer, answer, ice-candidate exchanges). |
| 15 | +- **Media Server (Optional)**: For scaling to many listeners, use an SFU (Selective Forwarding Unit) like meediasoup or Janus instead of mesh networking. |
13 | 16 |
|
14 | | -### Key Features |
15 | | - |
16 | | -- 🚀 **One-click room creation** - Generate unique, shareable links instantly |
17 | | -- 🎤 **Simple streaming experience** - Just click and stream |
18 | | -- 🎛️ **Audio enhancement** - Automatic gain control, noise filtering, and music mode |
19 | | -- 🔊 **Preserve audio richness** - Not compressed like standard voice calls |
20 | | -- 🌐 **Browser-based** - No downloads, works on any modern browser |
21 | | -- 👥 **Community-focused** - Designed for small groups (3-5 users) |
22 | | - |
23 | | -## 🚀 Quick Start |
24 | | - |
25 | | -### Prerequisites |
26 | | - |
27 | | -- **Backend**: Go 1.19 or higher |
28 | | -- **Frontend**: Modern web browser with WebRTC support |
29 | | -- **Network**: Stable internet connection |
30 | | - |
31 | | -### Installation |
32 | | - |
33 | | -1. **Clone the repository**: |
34 | | - ```bash |
35 | | - git clone https://github.com/your-username/bgce-stream.git |
36 | | - cd bgce-stream |
37 | | - ``` |
38 | | - |
39 | | -2. **Start the backend server**: |
40 | | - ```bash |
41 | | - cd backend |
42 | | - go mod tidy |
43 | | - go run ./cmd/server |
44 | | - ``` |
45 | | - |
46 | | -3. **Open the frontend**: |
47 | | - ```bash |
48 | | - cd frontend |
49 | | - # Use any static file server, e.g.: |
50 | | - python -m http.server 3000 |
51 | | - # or |
52 | | - npx serve public |
53 | | - ``` |
54 | | - |
55 | | -4. **Access the application**: |
56 | | - - Open `http://localhost:3000` in your browser |
57 | | - - Click "Create Room" to get started |
58 | | - |
59 | | -## 📖 Documentation |
60 | | - |
61 | | -- **[Contributing Guide](docs/CONTRIBUTING.md)** - How to contribute to bgce-stream |
62 | | -- **[Roadmap](docs/ROADMAP.md)** - Development plans and upcoming features |
63 | | -- **[v0.1.0 Release Notes](docs/releases/v0.1.0/README.md)** - Current MVP features |
64 | | -- **[Backend README](backend/README.md)** - Backend-specific documentation |
65 | | - |
66 | | -<!-- ## 🏗️ Architecture |
67 | | -
|
68 | | -### Backend (Go) |
69 | | -- **REST API** for room management |
70 | | -- **WebSocket signaling** for WebRTC peer connections |
71 | | -- **Room management** with automatic cleanup |
72 | | -- **CORS support** for cross-origin requests |
73 | | -
|
74 | | -### Frontend (Vanilla JavaScript) |
75 | | -- **WebRTC P2P mesh** for direct peer connections |
76 | | -- **Web Audio API** for audio processing |
77 | | -- **Responsive design** for desktop and mobile |
78 | | -- **Progressive enhancement** for browser compatibility |
79 | | -
|
80 | | -### Audio Processing |
81 | | -- **Automatic Gain Control (AGC)** - Adjusts volume automatically |
82 | | -- **Noise Suppression** - Reduces background noise |
83 | | -- **Music Mode** - Enhanced settings for instrument tones |
84 | | -- **High-quality audio** - Preserves audio richness via Opus tuning |
85 | | -
|
86 | | -## 🎯 Use Cases |
87 | | -
|
88 | | -- **Music jamming sessions** - Share and play music together |
89 | | -- **Voice chats** - High-quality voice conversations |
90 | | -- **Online rehearsals** - Practice sessions with band members |
91 | | -- **Community meetings** - Small group discussions |
92 | | -- **Gaming voice chat** - Low-latency audio for gaming --> |
93 | | - |
94 | | -## 🤝 Contributing |
95 | | - |
96 | | -We welcome contributions! Please see our [Contributing Guide](docs/CONTRIBUTING.md) for details. |
97 | | - |
98 | | -## 📋 Roadmap |
99 | | - |
100 | | -See [Roadmap](docs/ROADMAP.md) for detailed development plans and upcoming features for bgce-stream. |
101 | | - |
102 | | -## 🛠️ Technology Stack |
103 | | - |
104 | | -### Backend |
105 | | -- **Go** - High-performance server |
106 | | -- **Gorilla WebSocket** - WebSocket implementation |
107 | | -- **Standard Library** - Minimal dependencies |
108 | | - |
109 | | -### Frontend |
110 | | -- **Vanilla JavaScript** - No frameworks |
111 | | -- **WebRTC** - Peer-to-peer connections |
112 | | -- **Web Audio API** - Audio processing |
113 | | -- **CSS3** - Modern styling |
114 | | - |
115 | | -### Infrastructure |
116 | | -- **GitHub** - Version control and collaboration |
117 | | -- **GitHub Actions** - CI/CD (planned) |
118 | | -- **Docker** - Containerization (planned) |
119 | | - |
120 | | -## 📄 License |
121 | | - |
122 | | -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
123 | | - |
124 | | -## 🙏 Acknowledgments |
125 | | - |
126 | | -- **WebRTC community** - For the amazing real-time communication technology |
127 | | -- **Go community** - For the excellent ecosystem and tools |
128 | | -- **Contributors** - Everyone who helps make this project better |
129 | | -- **Users** - For feedback and support |
130 | | - |
131 | | -## 📞 Support |
132 | | - |
133 | | -- **GitHub Issues** - Bug reports and feature requests |
134 | | -- **GitHub Discussions** - Questions and general discussion |
135 | | -- **Email** - [Contact maintainers](mailto:rahim.cse.diu@gmail.com) |
136 | | - |
137 | | -## 🌟 Star History |
138 | | - |
139 | | -[](https://star-history.com/#your-username/bgce-stream&Date) |
140 | | - |
141 | | ---- |
142 | | - |
143 | | -### Made with ❤️ for the community |
144 | | ->>>>>>> Stashed changes |
| 17 | +### API Endpoints (Optional) |
| 18 | +- **`GET /api/status`**: To check if a broadcast is currently live before joining. |
0 commit comments