# Lightify — Quick Setup Guide

## Requirements

- **Windows 10 (21H2+) or Windows 11** — Edge WebView2 comes pre-installed
- **Spotify Premium account** — required for the Web Playback SDK (streaming scope)
- **A web browser** — needed once for Spotify login

> On older Windows builds (pre-21H2), install the [WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download) manually.

---

## Step 1 — Create a Spotify Developer App

1. Go to [developer.spotify.com/dashboard](https://developer.spotify.com/dashboard)
2. Log in with your Spotify account
3. Click **Create App**
4. Fill in:
   - **App Name:** `Lightify` (or anything you want)
   - **App Description:** anything
   - **Redirect URI:** `http://127.0.0.1:8901/callback`
   - **Which API/SDKs are you planning to use?** Select **Web Playback SDK**
5. Check the terms of service box and click **Save**
6. On the app's settings page, copy your **Client ID** (a 32-character hex string)

> **Important:** The redirect URI must be exactly `http://127.0.0.1:8901/callback` — no trailing slash, no https.

---

## Step 2 — Launch Lightify

1. Run `Lightify.exe`
2. On the auth screen, paste your **Client ID** into the `CLIENT_ID >` field
3. Click **AUTHORIZE**
4. Your browser opens to Spotify's login page — log in and click **Agree**
5. The browser redirects back to `127.0.0.1:8901/callback` and Lightify picks up the token automatically
6. You're in — Lightify registers as a Spotify Connect device and starts playing

---

## That's It

- Your login is cached in `.lightify_cache` next to the exe — you won't need to log in again unless the token is revoked or expires
- Config is saved to `lightify_config.json` next to the exe
- To log out or switch accounts, delete `.lightify_cache` and relaunch
