A full-stack application built with a Go backend and Next.js frontend for analyzing music files to detect BPM and Musical Key.
- Format Support: Accepts MP3, WAV, and MP4 files.
- BPM Detection: Leverages the
benjojo/bpmalgorithm for accurate beat detection. - Key Detection: Implements a custom Krumhansl-Schmuckler algorithm using FFT and Chroma mapping.
- Modern UI: A clean, responsive dashboard built with Next.js, Tailwind CSS, and Roboto typography.
- Dockerized Backend: Seamless environment setup with FFmpeg pre-installed in the container.
backend/: Go server using the Gin framework and Docker.frontend/: Next.js 15+ application using Bun and Tailwind CSS.
You can start both the backend and frontend simultaneously using the root development script.
bun install
bun devThe application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
If you need to start them separately:
Backend (Docker)
bun run backendFrontend (Next.js)
bun run frontendIf you wish to use the backend API directly:
- Endpoint:
POST /analyze - Payload:
multipart/form-data - Field:
file(your audio file)
Example:
curl -F "[email protected]" http://localhost:8080/analyze- FFmpeg Errors: Ensure the backend container is running, as it contains all necessary audio codecs.
- CORS/Proxy Issues: The frontend uses
next.config.tsrewrites to proxy/apirequests to port8080. Ensure both are running simultaneously.