Skip to content

Introduction

EchoStats is a self-hosted Spotify analytics platform that connects to your Spotify account, automatically syncs your listening history, and delivers 40+ pages of beautiful dashboards, charts, and insights about your music taste. Think of it as Spotify Wrapped β€” but year-round, running entirely on your own server.

Who is EchoStats for?

  • Self-hosters who want full control over their data and infrastructure
  • Privacy-conscious Spotify users who don’t want analytics data sent to third parties
  • Music data enthusiasts who want deeper insights than Spotify provides natively
  • Developers looking for a modern full-stack reference project (FastAPI + Next.js + MongoDB)

Key Features

πŸŽ›οΈ Analytics & Visualization

  • 40+ Dashboard Pages β€” Stats, charts, heatmaps, radar charts, listening calendars, mood analysis, and more
  • Listening Analytics β€” Top tracks, artists, genres, and albums with time-range filters (week / month / year / all-time)
  • Music DNA β€” Audio feature radar showing danceability, energy, valence, acousticness, tempo, and more
  • Artist Map β€” Explore connections between favorite artists with play-share distribution
  • Taste Profile β€” Deep analysis of your listening patterns and preferences
  • Year in Review β€” Spotify Wrapped-style annual summary generated from your data

πŸ”„ Sync & Data

  • Auto Sync β€” Background worker syncs your Spotify data every 15 minutes via ARQ cron
  • Data Import β€” Import your full Spotify extended streaming history (JSON from privacy data export)
  • Sync Job Tracking β€” View step-by-step sync progress with detailed API call history
  • API Logs Dashboard β€” Monitor all Spotify API calls with status distribution and latency stats

🎡 Playback & Discovery

  • Spotify Playback Control β€” Play, pause, skip, view queue, and switch devices from the dashboard
  • Recommendations β€” Discover new music based on your listening patterns
  • Browse β€” New releases, featured playlists, and categories from Spotify

🎨 Customization & UX

  • 6 Themes + 8 Accent Colors β€” Dark, Light, Dim, Ocean, Midnight, Forest + custom color picker
  • PWA β€” Install on any device (mobile and desktop), works offline
  • Single-User Auto-Login β€” Auto-authenticates when only one user exists (ideal for self-hosting)
  • Update Notifications β€” Dashboard banner when a new version is available on GitHub

🏠 Deployment

  • Docker Compose β€” One-command deployment with all services included
  • Helm Chart β€” Kubernetes deployment via OCI registry with full configurability
  • Version Indicator β€” Deployed version shown in sidebar and API health endpoint

How It Works

  1. Authenticate β€” Connect your Spotify account via OAuth
  2. Sync β€” EchoStats automatically syncs your listening data every 15 minutes
  3. Explore β€” Browse 40+ dashboard pages of analytics, charts, and insights
  4. Import β€” Optionally import your full Spotify history from privacy data exports

Tech Stack

LayerTechnologyPurpose
FrontendNext.js 16 / React 19 / TypeScriptSSR dashboard with 42 pages
StylingTailwind CSS 4 / Framer Motion6 themes + spring animations
ChartsRechartsInteractive data visualizations
BackendPython 3.12 / FastAPIREST API with 30+ endpoints
DatabaseMongoDB 7 / Beanie ODMDocument storage for analytics
Cache / QueueRedis 7 / ARQBackground sync + task queue
ContainerDocker / HelmKubernetes-ready deployment
CI/CDGitHub ActionsAutomated testing + GHCR publishing

Architecture Overview

EchoStats follows a modern microservices architecture with clear separation between the frontend, backend API, background workers, and data stores.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Next.js 16 (Web) │────▢│ FastAPI (API) β”‚
β”‚ React 19 / TS β”‚ β”‚ Python 3.12 β”‚
β”‚ Tailwind / Motion β”‚ β”‚ 38 REST endpoints β”‚
β”‚ Port 3000 β”‚ β”‚ Port 8000 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ β”‚
β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β” β”Œβ”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ MongoDB β”‚ β”‚ Redis β”‚
β”‚ 7.x β”‚ β”‚ 7.x β”‚
β”‚ Beanie β”‚ β”‚ Cache+Queue β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
β”‚
β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
β”‚ ARQ Worker β”‚
β”‚ Cron every β”‚
β”‚ 15 minutes β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Flow

  1. Spotify OAuth β†’ User authenticates with their Spotify account
  2. Initial Sync β†’ The API triggers the first full data sync on login
  3. Background Worker β†’ ARQ cron syncs recently played tracks every 15 minutes and refreshes analytics every 6 hours
  4. API Layer β†’ FastAPI serves 38 endpoints covering auth, analytics, history, playlists, playback, and sync management
  5. Frontend β†’ Next.js renders 40+ pages with interactive Recharts visualizations, Framer Motion animations, and responsive layouts

Key Design Decisions

  • Self-hosted first β€” All data stays on your infrastructure. No third-party analytics or telemetry.
  • Single-user optimized β€” Auto-login when one user exists, no registration flow needed.
  • PWA-native β€” Installable on mobile and desktop with service worker caching for offline access.
  • Encrypted tokens β€” Spotify API tokens are encrypted at rest using your ENCRYPTION_KEY.

Environment Requirements

RequirementMinimumRecommended
Docker24.xLatest
Docker Composev2.xLatest
RAM1 GB2 GB
Disk1 GB5 GB
Spotify AccountFree or PremiumPremium (for playback controls)

You also need a Spotify Developer Application with a Client ID and Client Secret.

  • Installation β€” Get EchoStats running in under 5 minutes with Docker Compose
  • Configuration β€” Environment variables, Spotify app setup, and deployment options
  • Dashboard Guide β€” Navigate the dashboard, keyboard shortcuts, and responsive layouts
  • Analytics Guide β€” Understand the 40+ analytics pages and visualizations
  • Importing History β€” Import your full Spotify extended streaming history
  • API Authentication β€” JWT session cookies, OAuth flow, and dev login
  • Troubleshooting β€” Solutions to common deployment and runtime issues
  • FAQ β€” Answers to frequently asked questions

Getting Started

Head to the Installation guide to get EchoStats running in under 5 minutes.