LibRate
This project aims to bring a website combining the functionality of such projects as Bookwyrm, RateYourMusic/Sonemic, IMDB and similar to the #fediverse.
This project is currently in early beta stage, bugs are expected and PRs are very welcome.
The first public beta instance is expected to launch by the end of December 2023.
Table of contents
Roadmap:
Social features:
- Basic registration support
- User profile cards
- (WIP)Full profile pages
- Tagging and mentions
- (WIP) Advanced profile and UI customization
- Groups
- Direct messages (E2EE)
- Group chats, more group-friendly design, like Lemmy or Kbin
- (WIP) User-generated content tagging and categorization
- (WIP) Following
- Sharing
- (WIP) ActivityPub support, with selective federation
- Album cards
- Carousels showing random media
- Relevant DB setup
- Film and series cards
- Trailers and stills support
- Release notifications
- Sending them as DMs to federated service accounts
- Content filters
- Book cards and pages
- Anime and manga cards/pages
- Games support
- Customizable, shareable media collections and logging
- (WIP) Convenient submission form, with decentralized deduplication and POW-based anti-spam (a bit similar to Bookwyrm)
- Automated imports from 3rd party sources
- DRM-free audio hosting and streaming, federation with Funkwhale
- Artwork galleries for visual artists(?)
Reviews
- Basic review form
- Backend logic for submission and fetching of reviews
- (WIP) Review feed
- Commenting and voting on reviews and media items
- Importing from 3rd party sources
Recommendations
- Prototype logic
- Actual working implementation
- Personalized feeds
- Advanced algorithm powered by ML and graph-like database structure - already implemented
Other
- Extended configurability
- Internationalization
- Admin panel
- Events, federating with Mobilizon
- Federated merch and works marketplace, possibly an alternative to Bandcamp
- Mobile app (although the frontend is and will be mobile friendly, but also never at the expense of desktop experience. We'll also try to make it work with Fedilab, though the number of distinctive features may make it difficult)
Deploying
Just run
just write_tags
docker compose up -d
The git tag part is needed only for displaying the version in the footer
Prerequisites for running natively:
Get the Dependencies
SOPS and age for handling secrets (see next section)
pnpm
, yarn
or npm
, for building the frontend
Python 3 for setting up the uint Postgres extension
- working Postgres and Redis instances. You'll also need to install the development files package for postgres since LibRate uses Postgres extensions. You may also need to manually build the sequential UUIDs extension
Setup secrets
NOTE: currently you may skip reading this section, leaving it here as it'll be more likely that I'll remember to delete a single line than not let this rot somewhere in a Git stash since I'm too lazy to bother setting up a git hook. X25519 secrets are currently generated with intentional opacity and volatility.
A foreword: you may ask about other storage options for secrets.
Well, relying on local storage and age is the simplest way for now, but luckily
thanks to sops' versatility, we'll successively work on adding support for more ways of handling them.
Please don't hesitate to open an issue if you feel the need for support for a particular secrets storage option supported by SOPS (see their README linked in dependencies list) to be added first.
In a production environment, you're strongly advised to create a separate user for LibRate
and use that to handle the config, run the binary and store the
age keys.
All you need to do is generate an age X25519 identity
and then encrypt the secrets file
(by default, this is ./secrets.enc.yaml, but you may specify a different path using
secretsPath
key in your config file) with SOPS.
Note that you must encrypt the secrets file, otherwise it will not work.
Development prerequisites
To develop the recommendations feature, you'll need:
protoc
and protoc-gen-go
for generating code from the protocol buffers files.
- Rust and Go toolchains
Building and installing
If you have installed just, you can simply run:
just first_run
Alternatively, edit the example config file and run:
go mod tidy && \
cd fe && pnpm install \
&& pnpm run build && \
go run . -init -exit && \
go run . migrate -auto-migrate
For subsequent runs of course you shouldn't use the init
flag.
You can then test your instance at http://127.0.0.1:3000 (or the other port you've specified)
Testing
In order to test the database code, you should create a librate_test
database.
If you set the $CLEANUP_TEST_DB
variable to 0, the test database will not be cleaned up by the deferred function in the database initialization unit test.