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
muslso 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
| Layer | Technology |
|---|---|
| Runtime | Rust 1.75+ (compiled with rust-musl-cross for static binaries) |
| Web framework | Actix‑web (or similar minimal HTTP server, inferred from Rust ecosystem) |
| Image metadata | exif crate for reading EXIF tags; custom caching logic |
| Configuration | Environment variables (RESOURCE_PATHS, DATA_FOLDER, SLIDESHOW_INTERVAL) |
| Deployment | Docker (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) supportsamd64,arm64/v8,arm/v7, andarm/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
- Personal Photo Archive – Hobbyists who moved from cloud services to a local NAS can enjoy the nostalgic slideshow without re‑uploading.
- Digital Signage – Small businesses can display seasonal memories on a kiosk or TV screen with minimal overhead.
- Event Recap – Organizers can mount a dedicated folder of event photos and let the app automatically cycle through them week‑by‑week.
- 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
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
AzuraCast
Self‑hosted web radio station in minutes
Pangolin
Secure tunneled reverse proxy for any network
Open Source Event Manager
Manage FOSS conferences from call‑for‑papers to tickets
Tracks
Web-based GTD™ task manager built with Ruby on Rails
musikcube
Terminal music player and streaming server for all platforms
URL to PNG
Generate web page screenshots via HTTP API