Skip to content

benjaminbelaga/discoworld

DiscoWorld

What if you could explore all electronic music as a 3D world?
Navigate 166 genres, 4.87 million releases, and 50 years of history — on a planet made of sound.

CI AGPL-3.0 Data: CC0 Tests: 346 React Three.js FastAPI PRs Welcome


What is DiscoWorld?

DiscoWorld maps millions of music releases into an explorable 3D world where spatial proximity reflects musical similarity. Navigate by genre, geography, and time. Connect your Discogs collection to see your musical footprint. Live-code music with Strudel as you explore.

Three ways to explore

View What you see
Genre World A procedural planet where genres form continents. Techno mountains, ambient oceans, house plains. Each territory has its own ambient soundscape synthesized in real-time. Buildings grow as sub-genres emerge through decades.
Earth Globe Real-world geography with 7K+ record shops, 30K geocoded labels, and city scenes from Detroit to Berlin to Tokyo. Distribution arcs trace how genres traveled across continents.
Genre Planet Orbital view of the genre universe. Zoom into clusters, see connections between genres, explore the full taxonomy at a glance.

Key features

  • 166 electronic genres mapped to 13 biomes with unique terrain, color palettes, and synthesized ambient audio
  • 4.87M releases from the Discogs CC0 dataset, each positioned in the world
  • Strudel live coding — press L to open a genre-aware music pattern generator (powered by Strudel)
  • Biome soundscapes — procedural ambient audio per territory via Web Audio API
  • 7,121 record shops from OpenStreetMap on the Earth Globe
  • 30,188 labels geocoded from the Discogs dump across 81 cities
  • Discogs collection sync — connect your account, see your musical footprint
  • "Describe a vibe" — natural language search lands you in the right neighborhood
  • Collection Passport — shareable card showing your musical DNA
  • Crate Neighbors — find collectors with similar taste
  • Recommendations — hybrid collaborative + content-based filtering
  • Community genre editing — propose changes, vote on edits, earn contributor points
  • 8 curated dig paths — preset journeys like "Detroit to Berlin" and "Birth of House"
  • Social sharing — generate OG images, share discoveries via Web Share API
  • Plugin API — any record store can integrate via RecordStoreAdapter (docs)

Quick Start

# Clone
git clone https://github.com/benjaminbelaga/discoworld.git
cd discoworld

# Frontend
cd packages/web
npm install
npm run dev
# Open http://localhost:5173

# API (in another terminal)
cd packages/api
pip install fastapi uvicorn httpx requests pydantic
cd ../..
python3 -m uvicorn packages.api.main:app --port 8000

# Optional: set env vars for Discogs features (see packages/api/main.py for required variables)
# DISCOGS_CONSUMER_KEY, DISCOGS_CONSUMER_SECRET, DISCOGS_TOKEN

Note: The 3D world loads from pre-built static JSON files in packages/web/public/data/. No database needed for basic exploration. The SQLite DB is only needed for search, recommendations, and collection features.

Building the database (optional)

# Download Discogs CC0 dump (~7GB compressed)
mkdir -p data/discogs-dump
# See packages/pipeline/README.md for download instructions

# Build the database
cd packages/pipeline
pip install -r requirements.txt
python build_db.py

Technical Highlights

Metric Value
Releases processed 4.87 million (Discogs CC0 dump)
Genre territories 166 across 13 biomes
Record shops 7,121 from OpenStreetMap
Labels geocoded 30,188 across 81 cities
MusicBrainz matches 80% match rate with cover art
Automated tests 346 (API, pipeline, frontend, E2E)
External audio files Zero — all audio is procedurally synthesized

Architecture

packages/
├── web/           React + Three.js + globe.gl frontend
│   ├── src/
│   │   ├── components/    40+ React components (GenreWorld, EarthGlobe, GenrePlanet, ...)
│   │   ├── stores/        Zustand state management
│   │   └── lib/           Core libraries
│   │       ├── plugins/       RecordStoreAdapter plugin system
│   │       ├── strudelPatterns.js  Genre→Strudel pattern generator
│   │       ├── soundscape.js      Procedural biome ambient audio
│   │       ├── shareCard.js       OG image generator (canvas)
│   │       ├── buildingSystem.js  Procedural genre architecture
│   │       └── driftEngine.js     Serendipity auto-navigation
│   └── e2e/           Playwright browser tests
├── api/           FastAPI Python backend (16 routers)
│   ├── routes/        genres, releases, search, auth, collection, recommendations,
│   │                  artists, cities, labels, shops, paths, taste_profile,
│   │                  personal_reco, crate_neighbors, contributors, genre_edits
│   └── tests/         103 API tests
└── pipeline/      Python data processing (15+ scripts)
    ├── build_db.py                 Orchestrator (XML → SQLite)
    ├── taxonomy_bridge.py          Discogs ↔ Ishkur genre mapping
    ├── similarity_index.py         Content-based recommendation engine
    ├── extract_label_locations.py  Label geocoding from Discogs dump
    ├── musicbrainz_crossref.py     MusicBrainz enrichment + cover art
    ├── enrich_community_stats.py   Discogs have/want/ratings
    └── extract_record_shops.py     OpenStreetMap vinyl shop extraction

Data Flow

Discogs Monthly Dump (CC0, ~7GB) ──► XML stream parser
                                          │
                                          ▼
                                    SQLite database
                                          │
                    ┌─────────────┬────────┼────────┬──────────────┐
                    ▼             ▼        ▼        ▼              ▼
              Genre mapping   Similarity  Heightmap  Label       Record
              (taxonomy      (content    generation  geocoding   shop
               bridge)        vectors)   (BPM→elev)  (30K)      extraction
                    │             │        │          │           (7K+)
                    └─────────────┴────────┼──────────┴───────────┘
                                           ▼
                                    Static JSON files
                                    (world.json, cities.json, ...)
                                           │
                                           ▼
                                    Three.js / globe.gl
                                    (browser, zero server needed for 3D)

Tech Stack

Layer Technology
Frontend Vite + React 19 + Zustand
3D (Genre World) Three.js + React Three Fiber + drei (InstancedMesh, custom shaders, selective bloom)
3D (Earth Globe) globe.gl (WebGL globe with arcs, points, HTML markers)
Live Coding Strudel (TidalCycles for the browser)
Audio Web Audio API (procedural biome soundscapes)
Backend FastAPI (Python 3.11+)
Database SQLite (main data + user data)
Testing pytest + Vitest + Playwright
CI GitHub Actions (3 parallel test jobs on PR)

World Design

The Genre World planet maps musical properties to terrain:

Musical Property Terrain
BPM Elevation (70 BPM = sea level, 170+ = volcanic summits)
Energy / Darkness Temperature + weather
Harmonic complexity Vegetation density
Release volume Territory area + building density
Influence between genres Rivers connecting territories

13 biomes — from the Techno Massif (basalt mountains, brutalist bunkers) to the Ambient Depths (ethereal harmonic drones) to the Disco Riviera (coastal resorts, mirror-ball lighthouses).

Each biome has its own procedurally generated ambient soundscape — no audio files, just oscillators, filters, and LFOs creating an immersive atmosphere.


Testing

346 automated tests across 4 layers:

# API tests (103 tests)
python3 -m pytest packages/api/tests/ -v

# Pipeline tests (63+ tests)
python3 -m pytest packages/pipeline/tests/ -v

# Frontend unit tests (137+ tests)
cd packages/web && npx vitest run

# Playwright E2E browser tests (43+ tests)
cd packages/web && npx playwright test

Contributing

We welcome contributions from everyone! See CONTRIBUTING.md for guidelines.

Five contributor roles:

Role What you do
Genre Cartographers Refine genre boundaries, connections, and descriptions
City Scouts Add cities and their musical scenes to Earth Mode
Crate Curators Suggest tracks that define a genre neighborhood
Data Enrichers Improve release metadata and genre classifications
Visual Builders Build UI components, shaders, and 3D features

All contributions earn points on the contributor leaderboard.


Data Sources

Source What License
Discogs Data Dumps 4.87M releases, artists, labels CC0
Ishkur's Guide to Electronic Music 167 genres, 353 connections, 11K tracks Community
OpenStreetMap 7,121 record/music shops worldwide ODbL
MusicBrainz Release metadata, cover art CC0
Discogs API Collections, community stats Free

License

  • Code: AGPL-3.0 — use it, modify it, but share your changes
  • Community data (genre mappings, city coordinates, taxonomy): CC0 — public domain

Credits


Created by Benjamin Belaga, who runs YOYAKU records in Paris.

About

Explore 4.87M electronic music releases on a 3D planet. 166 genres, 13 biomes, Discogs collection sync, live coding, 7K record shops. React + Three.js + FastAPI.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors