Skip to content
/ mars Public

Your listening history, beautifully organized. Mars (Music ARchival Software) automatically creates weekly and monthly playlists from your Spotify listening history.

Notifications You must be signed in to change notification settings

matt-dz/mars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mars

Your listening history, beautifully organized. Mars (Music ARchival Software) automatically creates weekly and monthly playlists from your Spotify listening history.

Table of Contents

Features

  • Automatic Playlist Generation: Weekly and monthly playlists created from your Spotify listening history image

  • Play Count Tracking: See how many times you've listened to each track image

  • Top Tracks View: View your most-played tracks with flexible time period filtering

    • Past 24 hours, 7 days, month-to-date, year-to-date
    • Custom date range selection with intuitive date picker
    image
  • Spotify Integration: Seamless OAuth integration with automatic token refresh

  • Export to Spotify: Add generated playlists directly to your Spotify account

  • Custom Playlists: Create playlists for any date range

Tech Stack

  • Backend: Go 1.25.1
  • Frontend: SvelteKit + Tailwind CSS
  • Database: PostgreSQL 18
  • Deployment: Docker Compose

Quick Start

Prerequisites

  • Docker & Docker Compose
  • Spotify Developer Account (for OAuth credentials)

Deployment

  1. Download the deployment files:
wget https://raw.githubusercontent.com/matt-dz/mars/refs/heads/main/docker/docker-compose.yaml
wget https://raw.githubusercontent.com/matt-dz/mars/refs/heads/main/docker/fileserver.conf
  1. Add your Spotify OAuth credentials for the api service:
api:
  environment:
    SPOTIFY_CLIENT_ID: your_client_id
    SPOTIFY_CLIENT_SECRET: your_client_secret
    SPOTIFY_REDIRECT_URI: http://localhost:8080/api/oauth/spotify
  1. Set the ADMIN_EMAIL, ADMIN_PASSWORD, and DATABASE_PASSWORD for the api service. Ensure the passwords are secure. Don't forget to set POSTGRES_PASSWORD to match DATABASE_PASSWORD!
api:
  environment:
    DATABASE_PASSWORD: your_password
    ADMIN_EMAIL: joe@mars.com
    ADMIN_PASSWORD: secure-password # ensure this matches POSTGRES_PASSWORD in database

database:
  environment:
    POSTGRES_PASSWORD: secure-password # ensure this matches ADMIN_PASSWORD in api
  1. Start the environment:
docker compose up -d
  1. Access the application:

Development Setup

For local development with hot-reloading:

  1. Clone the repository:
git clone https://github.com/matt-dz/mars.git
cd mars
  1. Create environment file:
cp .env.backend.example .env.backend
  1. Add your Spotify OAuth credentials to .env.backend:
SPOTIFY_CLIENT_ID=your_client_id
SPOTIFY_CLIENT_SECRET=your_client_secret
SPOTIFY_REDIRECT_URI=http://localhost:8080/api/oauth/spotify/callback
  1. Start the development environment:
docker compose -f docker-compose.dev.yaml up

The development setup includes:

  • Hot-reloading for both frontend and backend
  • Volume mounts for live code updates
  • Debug capabilities with stdin/tty enabled

Default Credentials

Environment Variables

Create a .env.backend file with the following variables:

Variable Description
SPOTIFY_CLIENT_ID Your Spotify app client ID
SPOTIFY_CLIENT_SECRET Your Spotify app client secret
SPOTIFY_REDIRECT_URI OAuth callback URL

The Docker Compose setup handles all other configuration automatically.

About

Your listening history, beautifully organized. Mars (Music ARchival Software) automatically creates weekly and monthly playlists from your Spotify listening history.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published