2 releases
0.1.1 | Feb 11, 2024 |
---|---|
0.1.0 | Feb 2, 2024 |
#802 in HTTP server
350KB
3K
SLoC
A simple and fast Self-host Audiobook server and player written fully in rust
this is a simple hobby project built with leptos + axum + sea-orm + tailwind. It's simple but fast
compare to AudiobookShelf
- very fast (that the reason I decide to write this for my own use): the AudiobookShelf would take 1-3s to change the page. while in audiobookroom. every operation are finished in 10ms.
- very pool functionality: This is just an audio server and audio player, nothing else (like metadata fetch. Audio analysis)
features
- record reading history and progress.
- user and password protected.
- the server and client are very lightweight, you could run it on your very old PC.
install and serve
- clone this repo
- Prepare the perquisites:
- pnpm: this project use tailwindcss, so pnpm is needed (or NPM, yarn as you like)
- cargo-leptos:
cargo install cargo-leptos
- sea-orm-cli:
cargo install sea-orm-cli
- just:
cargo install just
- install the node_modules:
pnpm -i
- fresh the database (only do this for the first time to run. This will erase all previous data):
just fresh
- start the server:
just serve
- read the output, the site should be served at http://127.0.0.1:3003
notes
- when you run with
cargo leptos serve
, it will read the config in Config.toml leptos config. Feel free to change - when you run manually (read justfile (deploy) to know more how to run it manually). You should write your own config in .env file(please read leptos doc to know more about leptos config)
- Generally you should not listen to 127.0.0.1. But if you listen on 0.0.0.0. Make sure to use a reverse proxy to provide https connection: *this is very important
screenshots
- login
- player
- addbook
todo
- there are a lot of things unfinished...
- manage current user
- implement profiles for authors and books.
- prettify the UI
- ...
Dependencies
~21–44MB
~747K SLoC