feat: add initial project README detailing features, tech stack, structure, and setup instructions.

This commit is contained in:
2025-12-02 18:05:24 +01:00
parent 2003a55ff7
commit c8403d70da

103
README.md Normal file
View File

@@ -0,0 +1,103 @@
# 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
- [Rust](https://www.rust-lang.org/tools/install) (latest stable)
- [Node.js](https://nodejs.org/) (v20+ recommended) & npm/pnpm/yarn
- [Docker](https://www.docker.com/) & Docker Compose
## Getting Started
### 1. Start Infrastructure Services
Start the PostgreSQL database and NATS server using Docker Compose:
```bash
docker compose up -d
```
### 2. Run the Backend
You can run the API server and Worker separately.
**Run the API:**
```bash
cargo run -p libertas_api
```
**Run the Worker:**
```bash
cargo run -p libertas_worker
```
### 3. Run the Frontend
Navigate to the frontend directory and start the development server:
```bash
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:
```bash
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
[MIT](LICENSE)