Music streaming web application developed as a coursework project for Financial University.
Svelte Music App is a web application with Flask/Python backend and Svelte frontend. It allows users to browse a collection of music tracks, search songs by title or artist, and play music through a web player.
Music tracks are sourced from Zaycev.net and cover images from Yandex Music. The audio files are loaded dynamically from external URLs provided by these services.
The project consists of two main parts:
Navigate to backend directory:
cd backend
Install dependencies (virtual environment recommended):
pip install flask flask-sqlalchemy flask-cors
Start the server:
python start.py
Backend will be available at: http://127.0.0.1:8000
Navigate to frontend directory:
cd frontend
Install dependencies:
npm install
Start dev server:
npm run dev
Frontend will be available at: http://localhost:5000
To create a production build of frontend:
cd frontend
npm run build
npm run start
/musicsReturns random tracks (limit: 9 tracks)
Response:
[
{
"id": 1,
"label": "Track title",
"author": "Artist",
"cover": "Cover URL",
"src": "Audio URL",
"duration": 267,
"liked": false,
"status": false
}
]
/music/filter/<label>/Search tracks by title or artist
Parameters:
label - search string (searches both title and artist)Response: Array of track objects
id (Integer) - unique identifierlabel (String) - track titleauthor (String) - artist namecover (String) - cover image URLsrc (String) - audio file URLduration (Integer) - duration in seconds