Ongaku 音楽 ("Music")
Personal Vinyl Record Player
- Generate your own Music Cards and listen with a simple tap!
- Every Music Card (NFC Tag) is linked to a Spotify song, playlist, or album based off the Spotify URI
Inspired by Spotify Vinyl Emulator
How it works?
- A Music Card is pretty much a NFC Tag
- NFC Reader scans the Music Card to read NFC UID
- With the NFC UID, it makes an API call to the server to see what music to play
- Server will look for the
music_id
andplatform
for the associated NFC UID (tag_id) - Based off the platform, it will make an API call to the associated platform API
- Spotify API will play music on the current ACTIVE DEVICE
Server
Getting Started
-
Login on
https://developer.spotify.com/dashboard/login
to setup your developer credentials -
Create an app
-
Go to
Edit Settings
-
Add
http://localhost:8888/api/auth/spotify/callback
inRedirect URIs
section -
Create a copy
.env.config
to.env
cp .env.config .env
-
Create a copy of the Tags JSON
cp ./server/data/tags.sample.json ./server/data/tags.json
-
Copy
Client ID
&Client Secret
to.env
# Credentials client_id='[your-client-id]' client_secret='[your-client-secret]' redirect_uri='http://localhost:8888/api/auth/spotify/callback '
-
Install the project with
npm install
and run application withnpm run start
Client
Getting Started
npm install
npm run start
- Create a copy
.env.config
to.env
Dashboard
See all Music Cards
- Using the
tags.json
as a database
Modify Music Card to link to a different Spotify URI
- Update the Spotify URI
- You don't have to do anything to the Music Card
- Scan the Music Card and it will play the new tunes!
- Update Title
Add new Music Card
- Tag ID is the UID of the NFC Tag
- Note: Currently, only Spotify is supported.
NFC
Getting Started
PN532 NFC Hat for Raspberry Pi
- https://www.waveshare.com/wiki/PN532_NFC_HAT
- Support for SPI, I2C, UART
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python3 pn532_read_nfc.py
- Create a copy
.env.config
to.env
TODO
- Search Spotify songs/albums/artists on the Admin UI instead of copying the Spotify URI
- Customized Raspberry PI case
- Customized NFC cards
- Support for other Music Platforms
- Create an Empty Tag Record when scanning an unused Music Card to modify on the Admin Dashboard
- Guide for Raspberry PI setup