Skip to content

mah-jp/context-dj

Repository files navigation

[ Languages: English | 日本語 (Japanese) ]

ContextDJ

ContextDJ Icon

License Next.js TypeScript

ContextDJ - AI Music Curator. It turns your vague requests (e.g., "Play music that fits the mood of a walk by the sea. I want to listen to piano jazz from 11 PM.") into a perfectly curated scheduling of tracks.

Unlike standard shuffle or playlists, ContextDJ builds a context-aware schedule, mimicking a radio DJ that understands the flow of time and mood.

🌐 Try it now: contextdj.remoteroom.jp

ContextDJ QR Code

ContextDJ: Request Input (Screenshot: Inputting a request)

ContextDJ: Result Screen (Screenshot: Main player interface with AI-generated queue)

✨ Key Features

  • 🗣️ Natural Language Interface: Just tell the DJ what you want to hear. No complex filters needed.
    • 🎙️ Voice Input: Speak your request directly. Supports multiple languages (configurable in settings).
  • 🧠 AI-Powered Curation: Supports OpenAI (GPT-4o) and Google Gemini models to understand nuance and musical context.
  • 🎯 Smart Selection (AI Filtering): (Experimental) Automatically verifies if searched tracks genuinely match your request before adding them to the queue. Enabled by default for higher relevance.
  • 🥣 Auto-Refill (Okawari): The DJ automatically queues up more tracks ("Okawari") when the playlist runs low, ensuring the music never stops.
  • 📱 PWA Support: Install ContextDJ as a Progressive Web App (PWA) on your mobile or desktop for a native app-like experience.
  • 🔒 Privacy First: Bring Your Own Key (BYOK) architecture. Your API keys (OpenAI/Gemini/Spotify) are stored locally in your browser (localStorage). We never see your data.
  • 🌊 Seamless Spotify Integration: Connects with your Spotify Premium account on the web to play curated playlists on your devices (Spotify app on phone or PC).

🚀 Getting Started

Prerequisites

To use ContextDJ (even the hosted version), you need:

  1. Spotify Premium Account: Required for the Web API playback controls.
  2. Spotify Client ID: You need to create a simple app in the Spotify Developer Dashboard.
    • Redirect URIs: https://contextdj.remoteroom.jp/ (or http://127.0.0.1:3000/ for local dev)
    • APIs used: Web API
  3. AI API Key: key from either OpenAI or Google AI Studio.

Setup Guide

  1. Go to ContextDJ. ContextDJ: Start Screen
  2. Click the Settings (⚙️) icon in the top right. ContextDJ: Settings Screen
  3. Enter your Spotify Client ID.
  4. Enter your AI API Key (OpenAI or Gemini).
  5. Click Save Configuration.
  6. Return to the home page, type a prompt (e.g., "Bright jazz for the afternoon, and winter a cappella for the night"), and hit Send!

🛠️ Development

If you want to run ContextDJ locally or contribute:

  1. Clone the repository

    git clone https://github.com/mah-jp/context-dj.git
    cd context-dj
  2. Install dependencies

    npm install
    # or
    yarn install
  3. Run the development server

    npm run dev
  4. Open http://127.0.0.1:3000 with your browser.

📦 Tech Stack

  • Framework: Next.js (App Router)
  • Language: TypeScript
  • Styling: CSS Modules (Custom Dark Theme)
  • State Management: React Context API
  • APIs:
    • Spotify Web API
    • OpenAI API / Google Gemini API

📄 Privacy Notice

ContextDJ is a client-side application.

  • We allow you to input your sensitive API keys only to communicate directly with the respective services (Spotify, OpenAI, Google) from your browser.
  • No data is sent to our servers. All configuration is persisted in your browser's localStorage.

🤝 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

AI Music Curator. It turns your vague requests into a perfectly curated scheduling of tracks.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors