No description
Find a file
Solace System Renovate Fox cfd682f803
All checks were successful
ci/woodpecker/push/validate Pipeline was successful
ci/woodpecker/push/release Pipeline was successful
chore(deps): update ghcr.io/cocogitto/cog:latest docker digest to 175ee39
2026-01-28 21:05:42 +00:00
.woodpecker chore(deps): update ghcr.io/cocogitto/cog:latest docker digest to 175ee39 2026-01-28 21:05:42 +00:00
src test: improve test naming and add mutation testing documentation 2026-01-22 00:52:20 +01:00
tasks ci: add registry authentication for container signing 2026-01-22 08:45:34 +01:00
tests style: enable clippy::all lint group in all Rust files 2026-01-19 22:47:08 +01:00
.dockerignore feat: add skeleton 2026-01-11 16:52:41 +01:00
.gitignore feat: add error handling, file listing, and graceful shutdown 2026-01-19 22:43:51 +01:00
AGENTS.md test: improve test naming and add mutation testing documentation 2026-01-22 00:52:20 +01:00
Cargo.lock chore(deps): update rust crate nix to v0.31.1 2026-01-28 21:05:32 +00:00
Cargo.toml fix(deps): update rust crate nix to 0.31.0 2026-01-23 13:05:22 +00:00
CHANGELOG.md chore(version): 0.4.1 [skip ci] 2026-01-23 13:18:45 +00:00
cog.toml chore: omit ci commits from changelog 2026-01-15 20:16:32 +01:00
Dockerfile fix: add library path to system 2026-01-19 20:54:37 +01:00
LICENSE.md feat: add skeleton 2026-01-11 16:52:41 +01:00
README.md docs: add mutation testing to CI/CD documentation 2026-01-21 22:27:43 +01:00
renovate.json ci: update versions in container signing 2026-01-14 23:39:49 +01:00

Media File Tracker

A media file tracker that watches directories for new files and keeps track of their metadata, exposing it via a web interface for viewing and performing operations on the media library.

Features

  • Directory Watching: Monitors specified directories for new media files
  • Metadata Tracking: Tracks file metadata changes over time with rollback capability
  • Content Hashing: Maintains hash of media content, preserving history when files are moved
  • Web Interface: RESTful API for viewing and managing the media library
  • Data Processing: Uses differential dataflow for efficient metadata processing

Quick Start

Prerequisites

  • Rust 1.70+ (stable)
  • OpenSSL development libraries

Installation

# Clone the repository
git clone https://code.billie.codes/PurpleBooth/media-file-tracker.git
cd media-file-tracker

# Build the project
cargo build --release

# Run tests
cargo test

# Start the server
cargo run

Development Workflow

This project uses a trunk-based development strategy:

  1. Main Branch: All changes are merged directly to main
  2. Feature Development:
    • Create feature branches from main
    • Push changes to trigger Woodpecker CI
    • Create pull requests to main
  3. Automated Updates:
    • Renovate handles dependency updates automatically
    • Creates PRs with conventional commit messages
    • Auto-merges non-breaking dependency updates
  4. Testing: All changes must pass CI before merging
  5. Releases: Automatic when conventional commits are detected

Local Development

# Install development dependencies
cargo install cargo-audit cargo-watch

# Run with automatic reloading
cargo watch -x run

# Run linting
cargo clippy

# Format code
cargo fmt

# Run security audit
cargo audit

API Endpoints

  • GET / - Root endpoint
  • GET /health - Health check
  • GET /api/files - List files (placeholder)

Architecture

The application is built with:

  • Axum: Web framework for HTTP server
  • Tokio: Async runtime
  • Differential Dataflow: For efficient metadata processing
  • Timely Dataflow: Stream processing framework
  • Tracing: Structured logging

Testing

# Run all tests
cargo test

# Run integration tests only
cargo test --test integration_tests

# Run with coverage
cargo tarpaulin --out Html

Configuration

The application uses environment variables for configuration. Set RUST_LOG to control logging verbosity:

RUST_LOG=debug cargo run

Contributing

This project follows conventional commits and uses Renovate for automated dependency management and cocogitto for version management.

Commit Format

  • feat: New features
  • fix: Bug fixes
  • docs: Documentation changes
  • style: Code style changes
  • refactor: Code refactoring
  • test: Test additions/changes
  • chore: Maintenance tasks

Code Quality

All code must:

  • Compile on stable Rust
  • Pass cargo clippy with pedantic lints
  • Include tests for public functions
  • Include documentation for public interfaces

License

This project is licensed under GPL-3.0-or-later. See LICENSE for details.

CI/CD Pipeline

This project uses Woodpecker CI for continuous integration and deployment. The pipeline includes:

Automated Testing

  • Build and test on every push and pull request
  • Linting with clippy (pedantic mode)
  • Mutation testing with cargo-mutants
  • Security audit with cargo-audit
  • Code formatting checks

Automatic Releases

  • Semantic versioning with Renovate
  • Automatic dependency updates
  • SSH-signed releases
  • Binary asset uploads

Container Publishing

  • Multi-stage Docker builds
  • Container registry publishing to code.billie.codes/purplebooth/media-file-tracker
  • Cosign-signed container images

Pipeline Triggers

  • Push to main: Runs full test suite
  • Pull request: Runs test suite
  • Auto-release: Creates new releases when conventional commits are detected
  • Dependency updates: Renovate creates PRs for dependency updates
  • Tag events: Builds and publishes binaries and containers

Required Secrets

Configure these secrets in your Woodpecker instance:

  • CBC_TOKEN: Forgejo API token for repository access
  • GIT_PRIVATE_KEY: SSH private key for signing releases and commits
  • COSIGN_PRIVATE_KEY: Cosign private key for container signing
  • COSIGN_PASSWORD: Password for Cosign private key

Development Workflow

  1. Fork and clone the repository
  2. Create feature branch for your changes
  3. Push changes to trigger CI
  4. Merge PR after successful tests
  5. Renovate automatically handles dependency updates

Roadmap

  • Directory watching implementation
  • Metadata extraction and storage
  • Content hashing system
  • Web UI for file management
  • Rollback functionality
  • Real-time updates