first attempt at code mostly working
This commit is contained in:
64
spec.md
64
spec.md
@@ -6,6 +6,70 @@ A self-hosted Discord bot that plays local MP3 files in a voice channel on conti
|
||||
|
||||
---
|
||||
|
||||
## Implementation Status
|
||||
|
||||
**Current Status:** ✅ **Phase 1 (MVP) - COMPLETE**
|
||||
|
||||
**Last Updated:** 2025-12-12
|
||||
|
||||
### Phase 1 (MVP) - ✅ COMPLETE
|
||||
|
||||
All Phase 1 features have been implemented and are fully functional:
|
||||
|
||||
| Feature | Status | Implementation Notes |
|
||||
|---------|--------|---------------------|
|
||||
| Bot auto-join | ✅ Complete | Bot automatically joins configured voice channel on startup |
|
||||
| Continuous playback | ✅ Complete | Loops through all MP3s in music directory, reloads library when empty |
|
||||
| Now playing display | ✅ Complete | Web UI shows track title, artist, duration with real-time progress bar |
|
||||
| Skip track | ✅ Complete | Working skip button with WebSocket notification |
|
||||
| Pause/Resume | ✅ Complete | Full pause/resume functionality with state persistence |
|
||||
| Track list | ✅ Complete | Full library display with track metadata, duration, and file size |
|
||||
| MP3 upload | ✅ Complete | Drag-and-drop upload with validation, progress, and batch support |
|
||||
| Volume control | ✅ Complete | Real-time volume adjustment (0-100%) with visual slider |
|
||||
| Shuffle mode | ✅ Complete | Queue shuffling with toggle state |
|
||||
| Real-time updates | ✅ Complete | WebSocket connection for live playback state changes |
|
||||
|
||||
**Technology Stack Chosen:**
|
||||
- **Bot Service:** Node.js + discord.js + @discordjs/voice
|
||||
- **API Backend:** Node.js + Express + ws (WebSocket) + multer + music-metadata
|
||||
- **Web Frontend:** React 18 + Vite + Tailwind CSS
|
||||
- **Deployment:** Docker Compose with 3 services
|
||||
|
||||
**Architecture Decisions:**
|
||||
- Bot-API Communication: HTTP Internal API (Option A from spec)
|
||||
- Music metadata: Extracted on upload and library scan using music-metadata
|
||||
- File upload: Multer with configurable size limits and duplicate handling
|
||||
- Real-time updates: WebSocket server with 2-second polling of bot state
|
||||
|
||||
### Phase 2 - ⏳ NOT STARTED
|
||||
|
||||
The following Phase 2 features are planned but not yet implemented:
|
||||
|
||||
| Feature | Status | Notes |
|
||||
|---------|--------|-------|
|
||||
| Queue reordering | ⏳ Not started | Requires drag-and-drop UI and queue management in bot |
|
||||
| Search | ⏳ Not started | Filter/search tracks in library |
|
||||
| Track progress seek | ⏳ Not started | Seekable progress bar (discord.js limitation may apply) |
|
||||
| Album art | ⏳ Not started | Display embedded album art from MP3 metadata |
|
||||
| Previous track | ⏳ Not started | History tracking and previous button |
|
||||
|
||||
**Challenges for Phase 2:**
|
||||
- Seek functionality may be limited by Discord.js voice implementation
|
||||
- Album art extraction and caching needs design
|
||||
- Queue reordering requires persistent queue state
|
||||
|
||||
### Phase 3 - ⏳ NOT STARTED
|
||||
|
||||
| Feature | Status | Notes |
|
||||
|---------|--------|-------|
|
||||
| Multi-channel support | ⏳ Not started | Multiple bots or channel switching |
|
||||
| User authentication | ⏳ Not started | Password protection for DJ interface |
|
||||
| Discord slash commands | ⏳ Not started | Control bot via Discord commands |
|
||||
| Listening history | ⏳ Not started | Requires database for logging |
|
||||
| Favorites/playlists | ⏳ Not started | Custom playlist management |
|
||||
|
||||
---
|
||||
|
||||
## Goals
|
||||
|
||||
- **Always-on music**: Bot joins a designated voice channel and plays music 24/7
|
||||
|
||||
Reference in New Issue
Block a user