A lofi-styled pomodoro timer with Spotify integration. Focus on your work while your favorite playlists play in the background.
- Configurable focus and break durations (click the minutes to edit)
- Timer counts up after completion (overtime mode) - you decide when to take a break
- Spotify integration with playlist selection
- Auto-shuffle and repeat for continuous music
- Light/dark theme toggle
- Keyboard-first controls
- Audio notification when timer ends
- Bun v1.0+
- A Spotify Developer account
git clone https://github.com/davidlbowman/spotify-pomodoro.git
cd spotify-pomodoro
bun install- Go to Spotify Developer Dashboard
- Click "Create App"
- Fill in the details:
- App name: Spotify Pomodoro (or whatever you prefer)
- App description: Pomodoro timer with Spotify
- Redirect URI:
http://127.0.0.1:4321/callback - APIs used: Check "Web API"
- Click "Save"
- In your app's settings, copy the Client ID
Create a .env file in the project root:
PUBLIC_SPOTIFY_CLIENT_ID=your_client_id_here
PUBLIC_SPOTIFY_REDIRECT_URI=http://127.0.0.1:4321/callbackReplace your_client_id_here with the Client ID from step 2.
bun run devOpen http://localhost:4321 in your browser.
- Click the "spotify" button
- Authorize the app with your Spotify account
- Select a playlist and start focusing!
| Key | Action |
|---|---|
Space / Enter |
Start/pause timer |
R |
Reset timer (when paused or in overtime) |
S |
Switch phase (when in overtime) |
- Runtime: Bun
- Framework: Astro with React
- Styling: Tailwind CSS v4 + shadcn/ui
- State Management: Effect-TS
- Linting: Biome
| Command | Description |
|---|---|
bun run dev |
Start development server |
bun run build |
Build for production |
bun run preview |
Preview production build |
bun run lint |
Check for linting issues |
bun run lint:fix |
Auto-fix linting issues |
bun run typecheck |
Run TypeScript type checking |
Make sure the redirect URI in your Spotify app settings exactly matches PUBLIC_SPOTIFY_REDIRECT_URI in your .env file, including the protocol (http:// vs https://).
Spotify requires an active device to control playback. Open Spotify on your computer or phone before selecting a playlist.
Browser autoplay policies may block audio. Interact with the page (click anywhere) before the timer ends to enable audio.
See CONTRIBUTING.md for development guidelines.
MIT