No description
https://made-by.hlib.cz/
- Rust 71%
- JavaScript 23.5%
- CSS 3.9%
- HTML 0.8%
- Jinja 0.4%
- Other 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| ci | ||
| config | ||
| frontend | ||
| migrations | ||
| src | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| .gitmodules | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
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
Argon2for password hashing and secure cookie-based session management. - 📊 Built-in Observability: Out-of-the-box Prometheus metrics export (
/metrics) and structured logging withtracing. - 🖼️ 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
cargoinstalled) - Node.js: 18+ and
yarn(ornpm)
📦 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