#web #axum #image #cli #rust

bin+lib buru

A Rust application with both CLI and Web interface for data/image processing

12 releases

Uses new Rust 2024

new 0.3.7 May 14, 2025
0.3.6 May 14, 2025
0.2.0 May 12, 2025
0.1.3 May 12, 2025

#2208 in Command line utilities

Download history 724/week @ 2025-05-09

724 downloads per month

MIT/Apache

160KB
3K SLoC

buru

docs.rs

This project provides a comprehensive system for managing and archiving images, offering a robust CLI and a web interface to efficiently store images, extract metadata, and handle database interactions. The application is built in Rust and utilizes asynchronous processing to ensure high performance and scalability.

Overview

The system consists of two main components:

  • CLI Application: Enables users to archive images via command line, adding metadata and tags.
  • Web Interface: Provides a RESTful API for interacting with the archival system programmatically.

Features

  • Image Storage: Efficiently handles image storage with metadata extraction and tagging capabilities.
  • Database Integration: Uses SQLite for storing image metadata, tags, and source information.
  • Tagging System: Supports tagging images to facilitate easy searching and categorization.
  • Asynchronous Execution: Leverages async features of Rust for non-blocking operations.
  • Docker Support: Containerization of the application with Docker for easy deployment.

Setup

Prerequisites

  • Rust for building the project.
  • Docker for running the application in containers.
  • SQLite database for metadata storage.

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd image-archival-system
    
  2. Build the project:

    cargo build --release
    
  3. Run the CLI or Web Server:

    • CLI: Execute image archival commands.

      cargo run --bin cli
      
    • Web Server: Start the RESTful API.

      cargo run --bin web
      
  4. Docker: Optionally, build and run using Docker.

    • Build Docker Image:

      docker-compose build
      
    • Run with Docker Compose:

      docker-compose up
      

Usage

CLI Application

To archive an image using the CLI:

cargo run --bin cli -- archive --path /path/to/image.jpg --tags "nature sunset" --source "http://example.com/source"

Web Interface

The web interface provides endpoints to archive images, retrieve metadata, and manage tags. Start the server and access the API documentation at [localhost:3000].

Example

  • GET /images: Fetch all archived images.
  • POST /images: Upload and archive a new image.

Docker Deployment

The application can be easily deployed using Docker. Use the provided docker-compose.yml to manage services. This setup includes both the application server and a reverse proxy using Nginx.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Dependencies

~24–42MB
~767K SLoC