An RSS reader webapp
Go to file
2025-02-17 05:43:09 -08:00
.sqlx Pull in feeds on demo startup 2025-02-05 22:39:37 -08:00
migrations Fix feed entry id issues 2025-02-05 02:33:11 -08:00
src Job status work 2025-02-16 01:35:49 -08:00
static Initial vite boilerplate 2025-02-17 05:42:19 -08:00
templates clear content button 2025-02-16 14:34:06 -08:00
.gitignore Initial vite boilerplate 2025-02-17 05:42:19 -08:00
Cargo.lock opml import 2025-02-15 18:27:05 -08:00
Cargo.toml opml import 2025-02-15 18:27:05 -08:00
flake.lock nix build 2025-02-03 01:15:58 -08:00
flake.nix Fix flake 2025-02-03 18:00:32 -08:00
justfile Add nix to justfile 2025-02-17 05:43:09 -08:00
README.md Run on any port 2025-02-04 01:29:25 -08:00
TODO.md TODO 2025-02-16 01:49:42 -08:00

RSS Reader

A modern web-based RSS feed reader built with Rust and Rocket. Features a clean, dark-themed interface that allows you to:

  • Add and manage RSS/Atom feeds
  • View feed entries with titles, summaries, and timestamps
  • Poll feeds for updates
  • Organize feeds with categories
  • Multi-user support with admin capabilities

Installation

Using Nix

This project is packaged with Nix flakes. To install and run it:

  1. Make sure you have Nix installed with flakes enabled. Add this to your /etc/nix/nix.conf if you haven't already:

    experimental-features = nix-command flakes
    
  2. Install the package:

    nix profile install git+https://code.everydayimshuflin.com/greg/rss-reader
    

    Or run it directly:

    # Run with a persistent database
    nix run git+https://code.everydayimshuflin.com/greg/rss-reader -- -d /path/to/database.sqlite
    
    # Or try it out in demo mode (uses in-memory database)
    nix run git+https://code.everydayimshuflin.com/greg/rss-reader -- --demo
    

The application requires a SECRET_KEY environment variable to be set in order to run. This key is used for encrypting cookies and other security-related functionality. This is the same secret key described in Rocket's documentation.

You can generate a suitable secret key using OpenSSL:

export SECRET_KEY=$(openssl rand -base64 32)

Development

To set up a development environment:

  1. Clone the repository:

    git clone https://code.everydayimshuflin.com/greg/rss-reader.git
    cd rss-reader
    
  2. Generate a secret key and set it in your environment:

    export SECRET_KEY=$(openssl rand -base64 32)
    
  3. Enter the development shell:

    nix develop
    
  4. Build and run the application from source:

    # Run with a persistent database on default port (8000)
    cargo run -- -d rss-reader.db
    
    # Run on a specific port
    cargo run -- -d rss-reader.db -p 3000
    
    # Run in demo mode with custom port
    cargo run -- --demo -p 8080
    

The application will be available at http://localhost:<port> (default port is 8000).

Command Line Options

  • -d, --database <PATH> - Path to the SQLite database file (required unless in demo mode)
  • --demo - Run in demo mode with an in-memory database
  • -p, --port <PORT> - Port to listen on (default: 8000)

Running in Production

For production deployments, make sure to:

  1. Generate a strong secret key:
    openssl rand -base64 32
    
  2. Set it permanently in your environment or service configuration:
    export SECRET_KEY="your-generated-key"
    
  3. Keep this key consistent across application restarts to maintain user sessions
  4. Never share or commit this key to version control

Demo Mode

When running in demo mode (using the --demo flag), the application will:

  • Use an in-memory SQLite database that is cleared when the application stops
  • Create two pre-configured users:
    • Admin user: username admin, password admin
    • Regular user: username demo, password demo