A hand-coded backend API built with Rust and Rocket for working with Last.fm data.
The project is currently focused on building the backend foundation and API. The next stage will be a TUI (Terminal User Interface) application that uses this backend to provide an interactive terminal-based experience.
This project was built from scratch as a way to develop practical experience with Rust backend development, API design, external API integration, and building a service using Rocket.
The backend communicates with the Last.fm API and exposes structured endpoints that can be consumed by the upcoming TUI application and potentially other clients in the future.
The API currently provides routes for:
- User information
- Currently playing tracks
- Recently played tracks
- Top albums
- Top tracks
- Top artists
- API health checks
Example routes:
GET /api/lastfm/
GET /api/lastfm/health
GET /api/lastfm/user/{username}
GET /api/lastfm/user/{username}/nowplaying
GET /api/lastfm/user/{username}/recentTracks
GET /api/lastfm/user/{username}/top/albums
GET /api/lastfm/user/{username}/top/tracks
GET /api/lastfm/user/{username}/top/artists
The API is still in development and routes may be added or changed.
- Rust
- Rocket
- Last.fm API
- Serde
- Cargo
Phase 1 is still in progress.
The current focus is continuing to build and refine the backend, including expanding the API and improving the overall structure of the project.
The next major project will be a TUI application built to consume this backend.
The TUI is planned to provide an interactive way to:
- View Last.fm user information
- See what is currently playing
- Browse recent tracks
- Explore top artists
- Explore top albums
- Explore top tracks
- Navigate music data directly from the terminal
As development continues, I plan to expand the backend with:
- Music analytics
- Listening history analysis
- Artist and user matching
- Similarity algorithms
- Music recommendations
- Additional Last.fm functionality
- More API endpoints
The long-term goal is to build a music application around the Last.fm API with a Rust backend, terminal-based frontend, and music analytics/recommendation features.
Clone the repository:
git clone https://github.com/0x2x/Lastfm-Backend-Rust-Rocket.rs.git
cd Lastfm-Backend-Rust-Rocket.rsRun the backend:
cargo runCheck the project:
cargo checkRun tests:
cargo testFormat the code:
cargo fmt🚧 Active Development
This project is being built incrementally. The backend is currently in its foundation phase, with the TUI application planned as the next major stage.
0x2x
Hand-coded with Rust.
https://transform.tools/json-to-rust-serde https://chartdb.io

