|
| 1 | +# Spotify Viber |
| 2 | + |
| 3 | +A premium, fullscreen Spotify Web Visualizer that reacts to live audio using the Web Audio API and the device's microphone/system loopback. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- **Spotify OAuth Integration**: Authenticates with Spotify to fetch and display the currently playing track's artwork, song name, and artist. |
| 8 | +- **Ultra-Low Latency Audio Sync**: Bypasses rate-limited Web APIs by using the browser's native `AnalyserNode` to perform Fast Fourier Transforms (FFT) on your microphone or system audio feed, achieving near instant 0-latency synchronization. |
| 9 | +- **Dynamic Visualizer Modes**: |
| 10 | + - `HALO`: 3 overlapping layers of flowing Bezier curves mapped to polar coordinates around the album art. |
| 11 | + - `AURA`: A screen-filling, radial light gradient that pulses and morphs like a lava lamp. |
| 12 | + - `BARS`: A classic neon 64-band equalizer running across the bottom of the screen. |
| 13 | + |
| 14 | +## Project Structure |
| 15 | + |
| 16 | +- `frontend/`: The React+Vite frontend where all the visualization and Spotify player UI lives. |
| 17 | +- `server.js`: A minimalistic Node.js Express server to handle Spotify OAuth callbacks, token exchange, and environment variables without exposing secrets to the browser. |
| 18 | + |
| 19 | +## Installation & Setup |
| 20 | + |
| 21 | +1. Setup Spotify Developer Credentials |
| 22 | + - Go to your [Spotify Developer Dashboard](https://developer.spotify.com/dashboard/). |
| 23 | + - Create an App and get your `Client ID` and `Client Secret`. |
| 24 | + - Set your Redirect URI to `http://127.0.0.1:8888/callback` (must be `127.0.0.1`, not `localhost`). |
| 25 | + |
| 26 | +2. Create a `.env` file in the root directory: |
| 27 | + ```env |
| 28 | + SPOTIPY_CLIENT_ID=your_client_id |
| 29 | + SPOTIPY_CLIENT_SECRET=your_client_secret |
| 30 | + SPOTIPY_REDIRECT_URI=http://127.0.0.1:8888/callback |
| 31 | + ``` |
| 32 | +
|
| 33 | +3. Install dependencies: |
| 34 | + ```bash |
| 35 | + npm install |
| 36 | + cd frontend && npm install |
| 37 | + ``` |
| 38 | +
|
| 39 | +4. Run the full stack (backend Auth server + Vite development preview): |
| 40 | + ```bash |
| 41 | + npm run dev |
| 42 | + ``` |
0 commit comments