Skip to content

About

This is a backend programmed in Rust to work with Last.fm and build a analytics sheet that will be used for my last.fm TUI application

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

Last.fm Backend — Rust + Rocket

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.

About

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.

Current Routes

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.

Screenshots

alt text alt text

Tech Stack

  • Rust
  • Rocket
  • Last.fm API
  • Serde
  • Cargo

Current Development

Phase 1 — Backend Foundation 🚧

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.

What's Next

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

Future Plans

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.

Development

Clone the repository:

git clone https://github.com/0x2x/Lastfm-Backend-Rust-Rocket.rs.git
cd Lastfm-Backend-Rust-Rocket.rs

Run the backend:

cargo run

Check the project:

cargo check

Run tests:

cargo test

Format the code:

cargo fmt

Project Status

🚧 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.

Author

0x2x

Hand-coded with Rust.

Resources used

https://transform.tools/json-to-rust-serde https://chartdb.io

About

This is a backend programmed in Rust to work with Last.fm and build a analytics sheet that will be used for my last.fm TUI application

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages