Your sound. Your stream. Your rules.
A modern, full-stack music streaming application inspired by Spotify, built with cutting-edge technologies.
Streamletz is a self-hosted music streaming platform that gives you complete control over your listening experience. Stream your favorite tracks, discover new music, and enjoy a seamless audio experience with a modern, intuitive interface.
Important: This application is designed for personal, private use only. It allows you to stream your own music collection that you legally own.
Legal Notice: Users are responsible for ensuring they have the legal rights to stream any music files they add to their library. This software is provided for personal use only and should not be used to infringe on copyright laws.
Clone the repository:
git clone https://github.com/rol2005hun/Streamletz.git
cd Streamletz
Create environment file:
cp .env.example .env
# Edit .env with your configuration (database credentials, JWT secret, music/cover paths, etc.)
Mandatory: The .env file in the root is required for both backend and frontend to work. See .env.example for all required variables. You must set at least:
DATABASE_URL, DB_USERNAME, DB_PASSWORD, DB_NAME (PostgreSQL connection)JWT_SECRET (backend auth)MUSIC_PATH, COVER_PATH (absolute or relative paths to your music and cover folders)VITE_API_BASE_URL (frontend API URL, usually http://localhost:1124/api)Create music directory (if not using external path):
mkdir -p backend/music
Or set MUSIC_PATH in .env to any folder you want to use. The backend will scan this folder recursively (up to 3 levels deep) for audio files.
Start all services:
docker-compose up -d
Access the application:
# Create PostgreSQL database
psql -U postgres
CREATE DATABASE streamletz;
CREATE USER streamletz_user WITH PASSWORD 'your_password';
GRANT ALL PRIVILEGES ON DATABASE streamletz TO streamletz_user;
\q
cd backend
# Install dependencies
mvn clean install
# Run the application
mvn spring-boot:run
# Backend will be available at http://localhost:1124
cd frontend
# Install dependencies
npm install
# Run development server
npm run dev
# Frontend will be available at http://localhost:5173
Set the following in your .env (see .env.example):
MUSIC_PATH=./backend/music # or any absolute path
COVER_PATH=./backend/covers # or any absolute path
You can use any folder path (absolute or relative). The backend will scan all music files (recursively, up to 3 levels deep) in the folder you specify. You do not need to copy files manually to a fixed directoryโjust set the correct path in your .env.
Album covers will be generated and stored in the covers folder you specify. Existing covers are detected automatically; no manual intervention is needed.
Streamletz/
โโโ backend/ # Java Spring Boot backend
โ โโโ src/main/java/com/streamletz/
โ โ โโโ controller/ # REST API endpoints
โ โ โโโ service/ # Business logic
โ โ โโโ repository/ # Data access
โ โ โโโ model/ # Entity classes
โ โ โโโ config/ # Config (JWT, Security, etc.)
โ โ โโโ util/ # DTOs, helpers
โ โโโ src/main/resources/
โ โ โโโ application.properties
โ โโโ music/ # (Optional) Local music files
โ โโโ Dockerfile
โ โโโ pom.xml
โโโ frontend/ # Svelte + TypeScript frontend
โ โโโ src/
โ โ โโโ lib/ # API clients, stores, services
โ โ โโโ components/ # Svelte components
โ โ โโโ styles/ # SCSS modules
โ โ โโโ routes/ # SvelteKit routes
โ โโโ Dockerfile
โ โโโ package.json
โโโ .github/
โ โโโ workflows/
โ โโโ ci-cd.yml
โโโ docker-compose.yml
โโโ .env.example # Example env file (copy to .env)
โโโ README.md
Create a .env file in the root directory (see .env.example for all required and optional variables):
# Database
DATABASE_URL=postgresql://localhost:5432/streamletz
DB_USERNAME=streamletz_user
DB_PASSWORD=changeme123
DB_NAME=streamletz
# Backend
BACKEND_PORT=1124
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
JWT_EXPIRATION=86400000
MUSIC_PATH=./backend/music
COVER_PATH=./backend/covers
# Frontend
VITE_API_BASE_URL=http://localhost:1124/api
FRONTEND_PORT=5173
application.properties)Key settings (can be set via .env):
spring.datasource.* - Database connection (from DATABASE_URL, DB_USERNAME, DB_PASSWORD)jwt.secret - JWT signing key (JWT_SECRET)jwt.expiration - Token validity (JWT_EXPIRATION, default: 86400000ms = 24h)music.storage.path - Music files location (MUSIC_PATH)music.covers.path - Album covers location (COVER_PATH)server.port - Backend port (BACKEND_PORT, default: 1124)The project is containerized and ready for self-hosted deployment on your own server or local network. All configuration is handled via the .env file in the root.
Local Network (Recommended for Personal Use)
Private VPS/Cloud Server
โ ๏ธ Important Security Notes:
# Build images
docker-compose build
# Deploy
docker-compose up -d
For Personal/Private Use Only:
NOT Recommended for Public Deployment:
Once the backend is running, visit the Swagger UI for interactive API documentation:
http://localhost:1124/swagger-ui.html
POST /api/auth/register - Register new userPOST /api/auth/login - Login and receive JWT tokenGET /api/tracks - Get all tracksGET /api/tracks/{id} - Get track by IDGET /api/tracks/search?query={q} - Search tracksGET /api/tracks/stream/{id} - Stream audio filePOST /api/tracks/{id}/play - Increment play countContributions are welcome! Please check out our Contributing Guidelines for details.
Commit convention: Use Conventional Commits (e.g. feat: add playlist sharing, fix: correct play count logic).
git checkout -b feature/AmazingFeature)git commit -m 'feat: add some AmazingFeature')git push origin feature/AmazingFeature)This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
This software is for personal, self-hosted use only.
The developers of Streamletz are not responsible for any copyright infringement or illegal use of this software.
rol2005hun
Your sound. Your stream. Your rules. ๐ต
Your sound. Your stream. Your rules.
Made with โค๏ธ using Svelte and Spring Boot