MCPSERV.CLUB
This Week in Past

This Week in Past

Self-Hosted

Show your yearly photo memories on a weekly slideshow

Active(93)
95stars
0views
Updated 11 hours ago

Overview

Discover what makes This Week in Past powerful

`This week in past` is a lightweight, self‑hosted photo gallery that aggregates images taken on the current calendar week across all previous years. It serves a single, high‑performance web page that displays those images in an automated slideshow. The application is written entirely in Rust, compiled statically for maximum portability, and can be run natively or as a Docker container on any modern architecture (amd64, arm64/v8, arm/v7, arm/v6). From a developer’s perspective it offers a clean API surface for image ingestion, configuration via environment variables, and a highly cache‑friendly memory model that reads all metadata at startup.

Calendar‑based aggregation

In‑memory caching

Fallback logic

Static binary

Overview

This week in past is a lightweight, self‑hosted photo gallery that aggregates images taken on the current calendar week across all previous years. It serves a single, high‑performance web page that displays those images in an automated slideshow. The application is written entirely in Rust, compiled statically for maximum portability, and can be run natively or as a Docker container on any modern architecture (amd64, arm64/v8, arm/v7, arm/v6). From a developer’s perspective it offers a clean API surface for image ingestion, configuration via environment variables, and a highly cache‑friendly memory model that reads all metadata at startup.

Key Features

  • Calendar‑based aggregation – Automatically selects photos whose capture date falls within the current week of the year, spanning multiple years.
  • In‑memory caching – All image metadata (EXIF, file paths) are loaded into a hash map on startup, eliminating disk I/O during slideshow rendering.
  • Fallback logic – If no images exist for the current week, the app selects a random set of photos to keep the gallery populated.
  • Static binary – Built with musl so it runs on any Linux distribution without external dependencies.
  • Docker‑ready – Official image supports multi‑arch builds and exposes a single port (default 8080) for easy deployment.

Technical Stack

LayerTechnology
RuntimeRust 1.75+ (compiled with rust-musl-cross for static binaries)
Web frameworkActix‑web (or similar minimal HTTP server, inferred from Rust ecosystem)
Image metadataexif crate for reading EXIF tags; custom caching logic
ConfigurationEnvironment variables (RESOURCE_PATHS, DATA_FOLDER, SLIDESHOW_INTERVAL)
DeploymentDocker (multi‑arch), optional native binary execution

The core engine parses file paths, extracts EXIF timestamps, and stores them in a HashMap<WeekKey, Vec<ImageMeta>>. A simple scheduler (timer) triggers the slideshow logic at SLIDESHOW_INTERVAL seconds, sending the selected image URLs to the front‑end via HTTP/HTML templates.

Core Capabilities & APIs

  • RESTful endpoint/ serves the slideshow page; optional query parameters can filter by year or month for advanced use.
  • WebSocket/Server‑Sent Events (optional) – Potential extension to push new images without page reload.
  • Environment‑driven configuration – No hardcoded paths; developers can mount any directory structure as the image source.
  • Extensibility hooks – The metadata cache can be replaced with a database (e.g., SQLite) if persistence is required for larger collections.

Deployment & Infrastructure

  • Self‑hosting – Requires only a recent Linux kernel and Docker (or no dependencies for the static binary).
  • Scalability – The application is single‑process and stateless; horizontal scaling can be achieved via a reverse proxy or load balancer if the image set grows beyond memory capacity.
  • Resource footprint – Typical RAM usage is proportional to the number of images (metadata only), usually a few megabytes even for tens of thousands of photos.
  • Containerization – Official Docker image (rouhim/this-week-in-past) supports amd64, arm64/v8, arm/v7, and arm/v6. Users can override environment variables to point to remote storage mounts (e.g., NFS, SMB).

Integration & Extensibility

  • Plugin architecture – While not present out of the box, the codebase exposes a clear boundary for adding new image sources or filters via Rust traits.
  • Webhooks – Developers can wrap the binary in a CI/CD pipeline to trigger a rebuild when new images are added, ensuring the cache stays fresh.
  • Custom front‑end – The HTML/CSS is minimal; teams can replace it with React/Vue if they need richer UI interactions.

Developer Experience

  • Zero‑config – Apart from environment variables, no additional setup is required.
  • Documentation – The README provides clear usage examples and CI status badges; the source code is well‑commented.
  • Community – Listed on Awesome Self‑Hosted under photo galleries, indicating community recognition; active GitHub actions for CI and security audits.
  • Licensing – Open source under a permissive license (not explicitly stated but implied by the repository), enabling commercial use without royalties.

Use Cases

  1. Personal Photo Archive – Hobbyists who moved from cloud services to a local NAS can enjoy the nostalgic slideshow without re‑uploading.
  2. Digital Signage – Small businesses can display seasonal memories on a kiosk or TV screen with minimal overhead.
  3. Event Recap – Organizers can mount a dedicated folder of event photos and let the app automatically cycle through them week‑by‑week.
  4. Developer Demo – Showcasing Rust’s performance and static binary capabilities in a simple web app.

Advantages Over Alternatives

  • Performance – In‑memory metadata caching and a static binary yield low latency and zero external dependencies.
  • Simplicity – No database or ORM required; the entire application fits in a single executable.
  • Portability – Multi‑arch Docker images and mus

Open SourceReady to get started?

Join the community and start self-hosting This Week in Past today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
other
License
MIT
Stars
95
Technical Specs
Pricing
Open Source
Database
None
Docker
Official
Supported OS
LinuxDocker
Author
RouHim
RouHim
Last Updated
11 hours ago