![]() Major improvements leveraging the shared church-core library: - **Replace custom Event struct**: Now using church-core::Event directly with built-in helper methods (formatted_date, clean_description, etc.) - **Remove duplicate HTML cleaning**: Using church-core's clean_description() - **Simplify API integration**: Replace custom ApiClient with church-core's ChurchApiClient and standardized endpoints - **Remove redundant dependencies**: html2text, chrono no longer needed - **Clean up configuration**: Remove unused cache settings, church-core handles caching - **Streamline image loading**: Remove redundant HEAD requests, keep essential validation Result: 37+ lines of duplicate code removed, 2 dependencies eliminated, zero functionality lost. Project now maximizes church-core capabilities while maintaining all original features. Fixes: Eliminates code duplication and maintenance overhead |
||
---|---|---|
.github | ||
icons | ||
src | ||
.env.example | ||
.gitignore | ||
beacon-source.tar.gz | ||
beacon.desktop | ||
Cargo.lock | ||
Cargo.toml | ||
digital-sign.desktop | ||
IMPROVEMENT_PLAN.md | ||
install.sh | ||
LICENSE | ||
QUICK_WINS_SUMMARY.md | ||
README.md |
Beacon
A modern digital signage application for displaying church events, built with Rust and Iced.
Features
- Real-time event display with automatic updates
- Smooth image loading and transitions
- Modern, clean interface design
- Automatic event filtering based on date/time
- Support for high-resolution displays
- Efficient memory management for images
Requirements
- Rust 1.70 or higher
- A running church API instance with events endpoint
Configuration
You can configure Beacon in three ways (in order of precedence):
1. Environment Variables
Configure Beacon using environment variables:
export BEACON_API_URL="https://your-api-url.com"
export BEACON_WINDOW_WIDTH="1920"
export BEACON_WINDOW_HEIGHT="1080"
./beacon
2. .env File
Create a .env
file in the application directory:
# Copy the example file
cp .env.example .env
# Edit with your settings
nano .env
Example .env
file:
BEACON_API_URL=https://your-api-endpoint.com
BEACON_WINDOW_WIDTH=1920
BEACON_WINDOW_HEIGHT=1080
RUST_LOG=beacon=info
Available environment variables:
BEACON_API_URL
- API endpoint URLBEACON_WINDOW_WIDTH
- Window width in pixelsBEACON_WINDOW_HEIGHT
- Window height in pixels
3. Config File
Create a config.toml
file in the application directory:
api_url = "https://your-api-url.com"
window_width = 1920
window_height = 1080
slide_interval_seconds = 10
refresh_interval_minutes = 5
Configuration Precedence:
- Environment variables (highest priority)
- .env file
- config.toml file (lowest priority)
Building
cargo build --release
Running
./target/release/beacon
Development
The application is built using:
- Iced for the UI framework
- Tokio for async runtime
- Reqwest for HTTP requests
- Chrono for date/time handling
License
MIT License