Sign inSign up

ponylucky/manga-sync

By ponylucky

•Updated 3 months ago

API written in Rust to manage manga reading progress across devices and sources, for a single user.

Image
0

480

ponylucky/manga-sync repository overview

A self-hosted REST API written in Rust to manage manga reading progress across devices and sources, for a single user. This API doesn't provide a frontend.

Links:


⁠Key Features

  • Security: Bearer token authentication with SHA-256 hashing. Automatic key generation and rotation (after 365 days) with warnings after 90 days.
  • Persistence: SQLite database with automatic migrations on startup.
  • Manga Management: Track manga, sources, and reading history.
  • Website Management: Manage supported manga websites/domains.
  • Settings: Simple key-value store for user preferences.
  • Dockerized: Ready for deployment using Docker with volume support for data persistence.

⁠Technical Stack

  • Language: Rust
  • Web Framework: Axum
  • Runtime: Tokio
  • Database: SQLite (via sqlx)
  • Caching: Moka
  • Containerization: Docker

⁠API Key Management

On first startup, the API generates a random key (24–64 characters) if secret/key.pub does not exist.

  • The plaintext key is printed once to the console.
  • Only the SHA-256 hash is stored in secret/key.pub.
  • The key is automatically rotated if it's older than 365 days.
  • A warning is logged if the key is older than 90 days.

⁠Run it

# Get the image
docker pull ponylucky/manga-sync:latest
# Run the image into a container
docker run --name manga-sync -p 7783:7783 -v <LOCAL>:/usr/local/bin/secret manga-sync --pull missing manga-sync:latest

⁠Persistence

The API uses SQLite for storage. The database file manga.db and the authentication hash key.pub are stored in the secret/ directory. Database migrations are applied automatically on startup.

Now also a secret/ssl/ folder for self-signed TLS certificates generated at first startup, to allow https.

⁠License

This project is licensed under the GNU AGPLv3

Tag summary

Content type

Image

Digest

sha256:e9a2e06a1…

Size

315.1 MB

Last updated

3 months ago

docker pull ponylucky/manga-sync