From 2dca17f3947ee2b1e317f74bf9bef0162276f179 Mon Sep 17 00:00:00 2001 From: orfelorfel23 Date: Wed, 26 Aug 2026 00:35:20 +0200 Subject: [PATCH] Cleanup: Move specs to docs, delete mockups, enhance README --- Idea/KeySelector_Mockup_Wheel.css | 200 ------ Idea/KeySelector_Mockup_Wheel.html | 647 ------------------ README.md | 63 +- {Idea => docs}/Camelot-Wheel-Chart.png | Bin ...lot-Wheel-Mixed-In-Key-Harmonic-Mixing.png | Bin {Idea => docs}/KeySelector_SPEC.md | 0 6 files changed, 53 insertions(+), 857 deletions(-) delete mode 100644 Idea/KeySelector_Mockup_Wheel.css delete mode 100644 Idea/KeySelector_Mockup_Wheel.html rename {Idea => docs}/Camelot-Wheel-Chart.png (100%) rename {Idea => docs}/Camelot-Wheel-Mixed-In-Key-Harmonic-Mixing.png (100%) rename {Idea => docs}/KeySelector_SPEC.md (100%) diff --git a/Idea/KeySelector_Mockup_Wheel.css b/Idea/KeySelector_Mockup_Wheel.css deleted file mode 100644 index 88632d4..0000000 --- a/Idea/KeySelector_Mockup_Wheel.css +++ /dev/null @@ -1,200 +0,0 @@ -/* ------------------------------------------------------------------ */ - /* THEME */ - /* ------------------------------------------------------------------ */ - :root, [data-theme="dark"] { - --bg: #0E0E14; - --surface: #16161E; - --surface-2: #1E1E28; - --border: #2A2A36; - --text: #ECECF2; - --text-dim: #7878A0; - --text-bright: #FFFFFF; - --key-current: #4F9D69; /* 4B = A-Dur green */ - --bpm: #E0B423; - --match: #4F9D69; - --mic: #D62828; - } - [data-theme="light"] { - --bg: #F4F4F8; - --surface: #FFFFFF; - --surface-2: #ECECF1; - --border: #DCDCE4; - --text: #1A1A22; - --text-dim: #6A6A78; - --text-bright: #000000; - --key-current: #2E7A48; - --bpm: #B88A1A; - --match: #2E7A48; - --mic: #C4202A; - } - * { box-sizing: border-box; margin: 0; padding: 0; } - html, body { - background: var(--bg); - color: var(--text); - font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; - -webkit-font-smoothing: antialiased; - transition: background-color .18s, color .18s; - } - body { padding: 24px 32px; min-height: 100vh; } - .container { max-width: 1600px; margin: 0 auto; } - - /* ------------------------------------------------------------------ */ - /* TOPBAR */ - /* ------------------------------------------------------------------ */ - .topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } - .brand { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.3em; } - .topbar-right { display: flex; align-items: center; gap: 18px; } - .status { display: flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-dim); letter-spacing: 0.12em; text-transform: uppercase; } - .mic { width: 14px; height: 14px; fill: var(--mic); } - .theme-toggle { - background: none; border: 1px solid var(--border); border-radius: 4px; - padding: 5px 12px; color: var(--text-dim); - font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; - cursor: pointer; transition: all .12s; - } - .theme-toggle:hover { color: var(--text); border-color: var(--text-dim); } - - /* ------------------------------------------------------------------ */ - /* HERO */ - /* ------------------------------------------------------------------ */ - .hero { - display: grid; - grid-template-columns: 240px 1fr; - gap: 24px; - background: var(--surface); - border: 1px solid var(--border); - border-radius: 12px; - padding: 24px; - position: relative; - overflow: hidden; - transition: grid-template-columns .3s ease, padding .3s ease, min-height .3s ease; - min-height: 280px; - } - .hero::before { - content: ''; position: absolute; left: 0; top: 0; bottom: 0; - width: 3px; background: var(--key-current); - transition: background-color .18s; - } - /* WHEEL expanded mode */ - .hero.wheel-mode { - grid-template-columns: 1fr; - padding: 48px; - min-height: 600px; - } - .hero.wheel-mode .cover, - .hero.wheel-mode .info-top, - .hero.wheel-mode .info-mid { display: none; } - .hero.wheel-mode .info-bot { padding-top: 0; justify-content: center; } - .hero.wheel-mode .wheel-container { width: 100%; max-width: 520px; height: 520px; } - /* COVER expanded mode */ - .hero.cover-mode { grid-template-columns: 1fr; min-height: 540px; } - .hero.cover-mode .info { display: none; } - .hero.cover-mode .cover { - width: 100%; max-width: 480px; margin: 0 auto; - aspect-ratio: 1; max-height: 460px; - } - @media (max-width: 760px) { - .hero { grid-template-columns: 1fr; } - } - - .cover { - width: 100%; aspect-ratio: 1; max-height: 240px; - border-radius: 8px; background: var(--surface-2); - overflow: hidden; position: relative; cursor: pointer; - transition: transform .15s; - } - .cover:hover { transform: scale(1.01); } - .cover img { width: 100%; height: 100%; object-fit: cover; display: block; } - .cover::after { - content: ''; position: absolute; inset: 0; - background: linear-gradient(135deg, rgba(79, 157, 105, 0.20), transparent 60%); - pointer-events: none; - } - .cover-placeholder { - position: absolute; inset: 0; - display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; - font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-dim); - letter-spacing: 0.2em; text-transform: uppercase; - } - .cover-placeholder .note { font-size: 32px; opacity: 0.3; } - - .info { display: flex; flex-direction: column; min-width: 0; } - .info-top { display: flex; flex-direction: column; } - .info-mid { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; } - .info-bot { margin-top: auto; padding-top: 20px; display: flex; justify-content: flex-end; align-items: flex-end; min-height: 160px; } - - .track-title { font-size: 30px; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; margin-bottom: 4px; } - .track-artist { font-size: 15px; color: var(--text-dim); } - - .stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; } - .stat { background: var(--surface); padding: 12px 14px; } - .stat-label { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 6px; } - .stat-value { font-family: 'JetBrains Mono', monospace; font-size: 22px; font-weight: 700; font-feature-settings: 'tnum'; line-height: 1; } - .stat-value.k { color: var(--key-current); } - .stat-value.b { color: var(--bpm); } - .stat-value.m { color: var(--match); } - .stat-sub { font-size: 10px; color: var(--text-dim); margin-top: 4px; font-family: 'JetBrains Mono', monospace; } - - .tags-row { display: flex; flex-wrap: wrap; gap: 6px; } - .tag { padding: 4px 10px; border-radius: 4px; font-size: 11px; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.04em; } - .tag-key { background: var(--key-current); color: #fff; font-weight: 700; } - .tag-genre { background: rgba(90, 138, 229, 0.13); color: #8AA8D8; border: 1px solid rgba(90, 138, 229, 0.32); } - [data-theme="light"] .tag-genre { background: rgba(52, 90, 156, 0.10); color: #345A9C; border-color: rgba(52, 90, 156, 0.28); } - .tag-mood { background: rgba(214, 41, 102, 0.13); color: #D88096; border: 1px solid rgba(214, 41, 102, 0.32); } - [data-theme="light"] .tag-mood { background: rgba(168, 51, 106, 0.10); color: #A8336A; border-color: rgba(168, 51, 106, 0.28); } - - /* ------------------------------------------------------------------ */ - /* WHEEL */ - /* ------------------------------------------------------------------ */ - .wheel-container { - width: 140px; height: 140px; - position: relative; cursor: pointer; - transition: transform .15s, width .3s ease, height .3s ease; - } - .wheel-container:hover { transform: scale(1.04); } - .wheel-container svg { width: 100%; height: 100%; display: block; } - .close-btn { - position: absolute; top: 12px; right: 12px; - width: 32px; height: 32px; - background: var(--surface-2); border: 1px solid var(--border); - border-radius: 50%; color: var(--text-dim); - font-size: 18px; cursor: pointer; - display: none; align-items: center; justify-content: center; - line-height: 1; z-index: 5; - transition: color .12s, border-color .12s; - } - .close-btn:hover { color: var(--text); border-color: var(--text-dim); } - .hero.wheel-mode .close-btn, - .hero.cover-mode .close-btn { display: flex; } - - /* ------------------------------------------------------------------ */ - /* SUGGESTIONS */ - /* ------------------------------------------------------------------ */ - .section-title { - font-family: 'JetBrains Mono', monospace; font-size: 11px; - letter-spacing: 0.25em; text-transform: uppercase; color: var(--text-dim); - margin: 28px 0 12px; - } - .suggestions { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; } - .sug { - background: var(--surface); - border: 1px solid var(--border); - border-radius: 8px; padding: 10px; - display: flex; flex-direction: column; gap: 8px; - cursor: pointer; - transition: border-color .12s, transform .12s; - } - .sug:hover { border-color: var(--text-dim); transform: translateY(-2px); } - .sug-cover { width: 100%; aspect-ratio: 1; border-radius: 4px; background: var(--surface-2); overflow: hidden; position: relative; } - .sug-cover img { width: 100%; height: 100%; object-fit: cover; display: block; } - .sug-cover-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; opacity: 0.25; } - .sug-meta { display: flex; justify-content: space-between; align-items: center; } - .sug-key { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 3px; color: #fff; letter-spacing: 0.04em; } - .sug-bpm { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-dim); } - .sug-title { font-size: 13px; font-weight: 500; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } - .sug-artist { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-dim); } - .sug-compat { - font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.12em; - text-transform: uppercase; color: var(--text-dim); - padding-top: 4px; border-top: 1px solid var(--border); - } \ No newline at end of file diff --git a/Idea/KeySelector_Mockup_Wheel.html b/Idea/KeySelector_Mockup_Wheel.html deleted file mode 100644 index 186c7f3..0000000 --- a/Idea/KeySelector_Mockup_Wheel.html +++ /dev/null @@ -1,647 +0,0 @@ - - - - - - KeySelector - - - - - - -
-
-
KeySelector
-
-
- - Listening -
- -
-
- -
-
-
- ♪ - No Cover -
-
-
-
-
Made in Japan
-
Alphaville
-
-
-
-
-
Key
-
4B
-
A-Dur
-
-
-
BPM
-
118
-
± 2
-
-
-
Match
-
98%
-
acoustid
-
-
-
- 4B - Synth-Pop - New Wave - 80s - Energetic - Retro - Euphoric -
-
-
-
- -
-
-
- -
- -
Up Next
-
-
- - - - diff --git a/README.md b/README.md index ca90356..ea298a6 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,61 @@ # KeySelector -Browser-basiertes DJ-Tool für Harmonic Mixing mit automatischer Song-Erkennung. +KeySelector ist ein browserbasiertes DJ-Tool, das dir dabei hilft, harmonisch passende Tracks für dein nächstes Set zu finden. Es nutzt Audio-Fingerprinting (über das Mikrofon), um laufende Songs zu erkennen, analysiert deren BPM sowie die musikalische Tonart (ausgedrückt als Camelot-Code) und schlägt darauf basierend harmonisch kompatible Nachfolgetracks vor. -## Setup -1. Kopiere `.env.sample` zu `.env` und fülle die API-Keys aus (via `./generate-env.sh`) -2. Starte mit Docker Compose: +## 🌟 Features + +- **🎤 Live Audio Recognition**: Erkennt den aktuell laufenden Track in der Umgebung (via AcoustID / Mock). +- **🎛️ Harmonic Mixing Suggestions**: Nutzt die "Mixed In Key"-Regeln, um perfekte Übergänge (Perfect, Quinte, Energy, Scale etc.) vorzuschlagen. +- **🎡 Interaktives Camelot Wheel**: Visualisiert die aktuelle Tonart und hebt kompatible Tonarten direkt im Wheel hervor. +- **🔍 Manueller Fallback**: Song nicht erkannt? Die manuelle Suche findet Tracks über Metadaten. +- **🌓 Dark/Light Mode**: Nahtloser Wechsel zwischen verschiedenen Farbschemata. + +## 🏗️ Architektur + +Das Projekt ist bewusst leichtgewichtig aufgebaut und auf Dauerbetrieb in der Cloud ausgelegt: +- **Frontend (`public/`)**: Pures Vanilla JS, HTML und CSS. Kein Build-Schritt, schnelle Ladezeiten. +- **Backend (`server/`)**: Node.js mit Express. Handhabt das Audio-Fingerprinting, ruft Metadaten ab (GetSongBPM, Last.fm) und liefert Cover via iTunes-API (umgeht Frontend-CORS). +- **Shared (`shared/`)**: Geteilte Logik für Camelot-Geometrie und Harmonie-Regeln. +- **Datenbank (`db/`)**: PostgreSQL (via Jannik-Cloud bereitgestellt) für einen massiven Seed aus AcousticBrainz-Daten. + +## 🚀 Installation & Setup (Lokale Entwicklung) + +Voraussetzungen: [Node.js](https://nodejs.org/) und [Docker](https://www.docker.com/). + +1. **Repository klonen** + ```bash + git clone https://git.orfel.de/Jannik/KeySelector.git + cd KeySelector ``` + +2. **Umgebungsvariablen einrichten** + ```bash + ./generate-env.sh + # Danach die erstellte .env Datei bearbeiten und API-Keys eintragen + ``` + +3. **Lokal mit Docker starten** + ```bash docker-compose up -d ``` + Die App ist danach unter `http://localhost:3000` erreichbar. -## Development -- Frontend ist reines Vanilla JS in `public/` -- Backend ist Express in `server/` -- `shared/` enthält Logik, die in beiden genutzt wird (Farben, Camelot-Angles, Mixing-Rules). +4. **Entwicklung ohne Docker (nur Node.js)** + ```bash + cd server + npm install + npm start + ``` -## Architecture -Siehe [KeySelector_SPEC.md](Idea/KeySelector_SPEC.md) für detaillierte Spezifikationen. +## ☁️ Deployment (Jannik-Cloud) + +KeySelector ist als nativer Service in die **Jannik-Cloud** integriert. +Die Deployment-Files (wie z.B. das Caddy-Routing und das Produktions-`docker-compose.yml`) befinden sich im zentralen Cloud-Infrastruktur-Repository unter `services/keyselector`. + +Sobald Code auf den `main`-Branch dieses Repos gepusht wird, kann der Service in der Jannik-Cloud hochgezogen werden. Er zieht sich automatisch den neuesten Code, baut den Container und geht online unter `keyselector.orfel.de`. + +## 📚 Dokumentation + +Weitere technische Details und Spezifikationen (sowie die initiale Konzept-Idee) findest du im `docs/` Ordner: +- `docs/KeySelector_SPEC.md` +- `docs/Camelot-Wheel-Chart.png` diff --git a/Idea/Camelot-Wheel-Chart.png b/docs/Camelot-Wheel-Chart.png similarity index 100% rename from Idea/Camelot-Wheel-Chart.png rename to docs/Camelot-Wheel-Chart.png diff --git a/Idea/Camelot-Wheel-Mixed-In-Key-Harmonic-Mixing.png b/docs/Camelot-Wheel-Mixed-In-Key-Harmonic-Mixing.png similarity index 100% rename from Idea/Camelot-Wheel-Mixed-In-Key-Harmonic-Mixing.png rename to docs/Camelot-Wheel-Mixed-In-Key-Harmonic-Mixing.png diff --git a/Idea/KeySelector_SPEC.md b/docs/KeySelector_SPEC.md similarity index 100% rename from Idea/KeySelector_SPEC.md rename to docs/KeySelector_SPEC.md