No description https://made-by.hlib.cz/
  • Rust 71%
  • JavaScript 23.5%
  • CSS 3.9%
  • HTML 0.8%
  • Jinja 0.4%
  • Other 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-25 12:10:38 +02:00
ci rename 2026-07-06 12:02:02 +02:00
config nginx 'production' config; rust: stream file 2026-07-04 17:21:58 +02:00
frontend scroll to top on page change 2026-07-10 17:29:59 +02:00
migrations session repository 2026-06-23 06:41:55 +02:00
src fix photo rotate 2026-07-10 17:14:04 +02:00
.gitignore cache in ci 2026-07-06 10:08:49 +02:00
.gitlab-ci.yml deploy in ci 2026-07-06 11:37:27 +02:00
.gitmodules deploy in ci 2026-07-06 11:37:27 +02:00
build.rs correct build.rs 2026-06-20 17:03:54 +02:00
Cargo.lock fix photo rotate 2026-07-10 17:14:04 +02:00
Cargo.toml fix photo rotate 2026-07-10 17:14:04 +02:00
README.md readme 2026-07-25 12:10:38 +02:00

Photo Share Service (made-by-hlib)

A fast, lightweight, and secure photo-sharing platform featuring a high-performance Rust backend, SQLite database, Argon2 password hashing, BLAKE3 hashing for media integrity, and a React 19 / Vite single-page application frontend.


Features & Advantages

  • 🚀 High Performance & Low Memory Footprint: Powered by Actix Web 4 and SQLite for low-latency operations and minimal resource usage.
  • 🔌 Dual Transport Modes: Run the server over standard TCP/HTTP or high-efficiency Unix Domain Sockets (UDS) for reverse-proxy setups (e.g., Nginx/Caddy).
  • 🛠️ Full-Featured CLI: Manage users (create, list, delete, reset passwords) and photos directly from the terminal without launching the web server.
  • 📦 Embedded Database Migrations: Compile-time baked SQL migrations for automated, hassle-free database setups.
  • 🔒 Robust Security: Uses Argon2 for password hashing and secure cookie-based session management.
  • 📊 Built-in Observability: Out-of-the-box Prometheus metrics export (/metrics) and structured logging with tracing.
  • 🖼️ Metadata & Media Processing: Fast image processing and EXIF metadata extraction powered by BLAKE3 hashing.

🛠️ Tech Stack

  • Backend: Rust (Edition 2024), Actix Web 4, SQLite, Clap CLI, Argon2, BLAKE3, Prometheus
  • Frontend: React 19, Vite, React Router v8, JavaScript

🚀 Getting Started

Prerequisites

  • Rust: 1.80+ (with cargo installed)
  • Node.js: 18+ and yarn (or npm)

📦 Building & Running

1. Build the Frontend

cd frontend
yarn install
yarn build

(For local frontend development with hot-reload, run yarn dev)


2. Build the Backend

From the root directory of the repository:

# Build release binary
cargo build --release

The compiled binary will be located at ./target/release/made-by-hlib.


🎮 Usage Guide

User Management (CLI)

# Create a new user
cargo run -- user create <username>

# List all users
cargo run -- user list

# Reset user password
cargo run -- user reset-password <username>

# Delete a user
cargo run -- user delete <username>

Photo Management (CLI)

# Add a photo manually
cargo run -- photo add --title "My Photo" --description "A nice view" --path /path/to/image.jpg

# List photos
cargo run -- photo list

Running the Web Server

HTTP Mode (Default: 127.0.0.1:8080):

cargo run -- web http --listen 127.0.0.1 --port 8080

Unix Domain Socket Mode:

cargo run -- web socket --path /tmp/photo-share.sock

Custom Database & Storage Paths:

cargo run -- --db ./custom_db.sqlite --storage ./my_storage web http --port 8080

📈 Monitoring

  • Prometheus Metrics: Available at http://<host>:<port>/metrics