a1f6701bac
- gRPC service with MusicBrainz provider - PostgreSQL schema with migrations - Service layer with database-first caching - Repository pattern for data access - YAML configuration support - Research documentation for 17 music metadata projects
85 lines
1.7 KiB
Markdown
85 lines
1.7 KiB
Markdown
# GraphBrainz
|
|
|
|
## Overview
|
|
|
|
A fully-featured GraphQL interface for the MusicBrainz API with an extensible schema that integrates Discogs, Spotify, Last.fm, fanart.tv, TheAudioDB, and more.
|
|
|
|
## Key Features
|
|
|
|
- **API**: GraphQL
|
|
- **Core**: Full MusicBrainz API coverage
|
|
- **Extensions**: Pluggable data sources via schema stitching
|
|
- **Caching**: Configurable TTL
|
|
- **License**: MIT
|
|
|
|
## Source
|
|
|
|
| Resource | URL |
|
|
|----------|-----|
|
|
| **Repository** | https://github.com/exogen/graphbrainz |
|
|
| **NPM Package** | https://www.npmjs.com/package/graphbrainz |
|
|
| **GraphiQL Demo** | Available when running server |
|
|
|
|
## Built-in Extensions
|
|
|
|
- **MusicBrainz** (core)
|
|
- **Cover Art Archive** - Album artwork
|
|
- **fanart.tv** - High-quality artwork
|
|
- **MediaWiki** - Wikipedia integration
|
|
- **TheAudioDB** - Artist/release info
|
|
|
|
## Additional Extensions (separate packages)
|
|
|
|
- **Last.fm** - Scrobbling and recommendations
|
|
- **Discogs** - Music database
|
|
- **Spotify** - Streaming metadata
|
|
|
|
## Query Example
|
|
|
|
```graphql
|
|
query {
|
|
lookup {
|
|
artist(mbid: "5b11f4ce-a62d-471e-81fc-a69a8278c7da") {
|
|
name
|
|
releaseGroups(type: ALBUM) {
|
|
edges {
|
|
node {
|
|
title
|
|
firstReleaseDate
|
|
}
|
|
}
|
|
}
|
|
fanArt {
|
|
thumbnails { url }
|
|
}
|
|
theAudioDB {
|
|
biography
|
|
}
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
## Self-Hosting
|
|
|
|
```bash
|
|
# As standalone server
|
|
npm install -g graphbrainz
|
|
graphbrainz
|
|
|
|
# As Express middleware
|
|
npm install graphbrainz
|
|
```
|
|
|
|
```javascript
|
|
const { middleware } = require('graphbrainz');
|
|
app.use('/graphql', middleware());
|
|
```
|
|
|
|
## Notes
|
|
|
|
- Extensible via custom extensions
|
|
- Smart rate limiting for external APIs
|
|
- Can run as server or library
|
|
- GraphiQL interface for exploration
|