c8403d70daee1592f8d8728c95af6c64d75a746b
Libertas
Libertas is a modern, self-hosted media library and management system built with performance and privacy in mind. It allows you to organize your photos and videos, automatically extract metadata, and manage your collection through a beautiful web interface.
Features
- Media Management: Securely upload, store, and organize your photos and videos.
- Smart Import: Bulk import existing media collections using the CLI importer, with automatic duplicate detection and storage quota management.
- Metadata Extraction: Automatically extracts and indexes EXIF data (camera model, date taken, etc.) for powerful search and filtering.
- Albums: Create and manage albums to organize your memories.
- People & Face Detection: (In Development) Detect faces and tag people in your photos.
- Background Processing: Efficient asynchronous processing for thumbnail generation and metadata analysis using NATS messaging.
- User Management: Multi-user support with configurable storage quotas.
Tech Stack
Backend
- Language: Rust
- Framework: Axum
- Database: PostgreSQL (via SQLx)
- Messaging: NATS
- Async Runtime: Tokio
Frontend
- Framework: React 19
- Build Tool: Vite
- Styling: Tailwind CSS v4
- Routing: TanStack Router
- State Management: Zustand
- UI Components: Radix UI, Shadcn UI
Infrastructure
- Containerization: Docker & Docker Compose
Project Structure
libertas_api: The main REST API server.libertas_core: Shared business logic, models, and database repositories.libertas_frontend: The React-based web user interface.libertas_importer: CLI tool for bulk importing media from the local filesystem.libertas_infra: Infrastructure code and factory functions for dependency injection.libertas_worker: Background worker service for processing media tasks (e.g., thumbnail generation).
Prerequisites
Getting Started
1. Start Infrastructure Services
Start the PostgreSQL database and NATS server using Docker Compose:
docker compose up -d
2. Run the Backend
You can run the API server and Worker separately.
Run the API:
cargo run -p libertas_api
Run the Worker:
cargo run -p libertas_worker
3. Run the Frontend
Navigate to the frontend directory and start the development server:
cd libertas-frontend
npm install
npm run dev
The web interface should now be accessible at http://localhost:5173 (or the port shown in your terminal).
CLI Importer Usage
To import an existing folder of photos/videos for a specific user:
cargo run -p libertas_importer -- --username <USERNAME> --path /path/to/media --recursive
Options:
-u, --username: The username of the account to import media into.-p, --path: The local path to the directory containing media files.-r, --recursive: (Optional) Recursively search for media files in subdirectories.
License
Description
Languages
TypeScript
52.9%
Rust
46.1%
CSS
0.8%
JavaScript
0.1%