This commit introduces the README.md file for the SoundSonic project. It provides a comprehensive overview of the project, its features, technologies used, installation instructions, API endpoints, user roles, configuration details, development guidance, supported extensions, license, contributing guidelines, and acknowledgments.
3.3 KiB
3.3 KiB
SoundSonic
A Rust-based music streaming server implementing the OpenSubsonic API protocol.
Overview
SoundSonic is a lightweight music streaming server built with Rust that implements the OpenSubsonic API specification. It allows you to stream your music collection to any OpenSubsonic-compatible client.
Features
- OpenSubsonic API Support: Compatible with any client supporting the OpenSubsonic protocol
- User Management: Role-based access control with customizable user permissions
- SQLite Database: Lightweight local storage with Diesel ORM
- RESTful API: Clean, well-structured API endpoints
- Async Runtime: Built on Tokio for high performance
Technologies
- Rust (Edition 2024)
- Axum - Web framework
- Tokio - Async runtime
- Diesel - ORM with SQLite
- Serde - Serialization/deserialization
Prerequisites
- Rust (latest stable version)
- SQLite
- Diesel CLI (for database migrations)
Installation
- Clone the repository:
git clone <repository-url>
cd soundsonic
- Set up the database URL:
export DATABASE_URL=database.db
Or create a .env file:
DATABASE_URL=database.db
- Run database migrations:
diesel migration run
- Build and run the server:
cargo run
The server will start on http://0.0.0.0:3311
API Endpoints
System
GET/POST /rest/getOpenSubsonicExtensions- Get supported OpenSubsonic extensions
User Management
GET/POST /rest/createUser.view- Create a new user with specified permissions
Request/Response Format
All API responses follow the OpenSubsonic response format:
{
"subsonic-response": {
"status": "ok",
"version": "1.16.1",
"type": "SoundSonic",
"serverVersion": "1.16.1",
"openSubsonic": true
}
}
User Roles
Users can have the following permissions:
adminRole- Administrative privilegesstreamRole- Stream musicdownloadRole- Download musicuploadRole- Upload musicplaylistRole- Manage playlistscoverArtRole- Manage cover artcommentRole- Add commentspodcastRole- Access podcastsshareRole- Share contentjukeboxRole- Jukebox controlvideoConversionRole- Video conversionsettingsRole- Change settingsldapAuthenticated- LDAP authentication
Configuration
The server can be configured via environment variables:
DATABASE_URL- Path to the SQLite database file (required)
Development
Running in development mode:
cargo run
Building for production:
cargo build --release
Database schema changes:
diesel migration generate <migration_name>
diesel migration run
Supported OpenSubsonic Extensions
apiKeyAuthentication- API key-based authenticationformPost- Form-based POST requestsindexBasedQueue- Index-based queue managementsongLyrics- Song lyrics supporttranscodeOffset- Transcoding offset supporttranscoding- Audio transcoding capabilities
License
[Your License Here]
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Acknowledgments
- OpenSubsonic - The API specification this server implements
- Subsonic - The original music streaming server