{"id":16369702,"url":"https://github.com/dcsunset/lfreader","last_synced_at":"2025-07-01T22:06:55.049Z","repository":{"id":226992249,"uuid":"487572000","full_name":"DCsunset/LFReader","owner":"DCsunset","description":"A self-hosted Local-first Feed (RSS/Atom/JSON Feeds) Reader written in Python and Preact/React.","archived":false,"fork":false,"pushed_at":"2025-05-10T15:36:09.000Z","size":3072,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-10T16:33:48.276Z","etag":null,"topics":["atom","atom-feed","feed","local-first","preact","python","react","rss","rss-feed","self-hosted"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DCsunset.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-01T15:26:00.000Z","updated_at":"2025-04-26T14:17:50.000Z","dependencies_parsed_at":"2024-03-15T03:12:33.773Z","dependency_job_id":"81dad58a-15f4-4235-9ad4-2112b72a2bb4","html_url":"https://github.com/DCsunset/LFReader","commit_stats":null,"previous_names":["dcsunset/lfreader"],"tags_count":62,"template":false,"template_full_name":null,"purl":"pkg:github/DCsunset/LFReader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCsunset%2FLFReader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCsunset%2FLFReader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCsunset%2FLFReader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCsunset%2FLFReader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DCsunset","download_url":"https://codeload.github.com/DCsunset/LFReader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCsunset%2FLFReader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263042357,"owners_count":23404459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atom","atom-feed","feed","local-first","preact","python","react","rss","rss-feed","self-hosted"],"created_at":"2024-10-11T02:56:04.977Z","updated_at":"2025-07-01T22:06:55.022Z","avatar_url":"https://github.com/DCsunset.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LFReader\n\n[![Docker Image Version](https://img.shields.io/docker/v/dcsunset/lfreader?label=docker)](https://hub.docker.com/r/dcsunset/lfreader)\n[![GitHub License](https://img.shields.io/github/license/DCsunset/LFReader)](https://github.com/DCsunset/LFReader)\n\nLFReader is a self-hosted **L**ocal-first **F**eed **Reader** written in Python and Preact/React.\n\n\u003e [!NOTE]\n\u003e This app is still in its early stage. Breaking changes may occur from time to time.\n\u003e Check migration notes before updating.\n\n## Features\n\n- PWA (Progressive Web App) support: provide better loading experience and can be installed to a device\n- Support for various feed formats: RSS, Atom, CDF, and JSON feeds\n- Local-first: Feeds and entries are stored in a sqlite3 database so that you can read local feeds even without Internet access. Futhermore, it supports archiving resources like images in the entries.\n- Dark mode support: Users can choose between light and dark modes\n- Flexible archiving options: User can use regex to filter the html tags and values when archiving\n- Responsive UI: it supports both large-screen and small-screen devices\n\n## Screenshots\n\nLight mode:\n\n![light](docs/screenshots/light.png)\n\nDark mode:\n\n![dark](docs/screenshots/dark.png)\n\nConfig options:\n\n![config](docs/screenshots/config.png)\n\n\n## Usage\n\n### Using docker/podman\n\n```sh\n# create data dir\nmkdir -p data\ndocker run -d -p 8080:80 --name lfreader -v $PWD/data:/app/data dcsunset/lfreader\n```\n\nThen access `http://localhost:8080` in browser.\n\nThe database and archived files will be stored in the volume `/app/data` in container (or where you mount it in the host).\nThe log of backend server is stored at `/app/logs/backend.log` inside the container.\nYou can quickly check the log by `docker exec lfreader tail /app/logs/backend.log`.\n\nThe default config file can be found in `docker/config.json` in this repo.\nYou can use your own config simply by mounting it to `/app/config.json`:\n```sh\n# suppose your config is at ./config.json\ndocker run -d -p 8080:80 --name lfreader -v $PWD/config.json:/app/config.json -v $PWD/data:/app/data dcsunset/lfreader\n```\n\n\n### Using pip\n\nTo install backend server only, you can use pip to install the backend dir in this repo:\n\n```sh\npip install -e \"git+https://github.com/DCsunset/LFReader.git#egg=lfreader_server\u0026subdirectory=backend\"\n```\n\n### Using Nix\n\nThis package is available in [NUR](https://nur.nix-community.org/repos/dcsunset/).\nThe output of the derivation includes both backend executable (`bin/lfreader-server`)\nand frontend static files (in `share/lfreader`).\n\nBesides, a NixOS module for backend server is provided in the [Nix flake](https://github.com/DCsunset/nur-packages) output.\nSimply import the flake and import the module `modules.lfreader` and add the following NixOS configuration:\n```nix\n{\n  imports = [ nur-dcsunset.modules.lfreader ];\n  services.lfreader = {\n    enable = true;\n    host = \"::\";\n    port = 3000;\n    openFirewall = true;\n    settings = {\n      db_file = \"/data/db.sqlite\";\n      archiver = {\n        base_dir = \"/data/archives\";\n      };\n      log_level = \"info\";\n    };\n  };\n}\n```\n\n\n### From source code\n\nFirst, clone this repo.\n\nThen, build the frontend (bundled files are in directory `frontend/dist`):\n\n```sh\ncd frontend\nnpm i\nnpm run build\ncd ..\n```\n\nNext, install dependencies and run backend:\n\n```sh\n# use Nix\nnix run .#backend-prod\n\n# or manually\ncd backend\npip install -r requirements.txt\nuvicorn lfreader_server.app:app --host 0.0.0.0 --port 3000\n```\n\nFinally, use your favorite web server to serve the frontend files (`frontend/dist`)\nand set up the reverse proxy to pass routes prefixed by `/api` to backend.\nIf archiving is enabled (default), make sure the archives directory is served at `/archives`.\n\n\n### Others\n\nThis repo also provide a backend CLI tool `lfreader_lookup` to look up an archived resource file in a database.\n\n\n\n## Configuration\n\n### Frontend\n\nAvailable config options can be found in the sidebar UI.\n\nOne important option is to enable/disable archiving.\nFor feeds that contain many images or videos, it might be slow and expensive to archive them.\nYou can disable archiving globally in such case.\n\n### Backend\n\nThe following environment variables are supported when running the backend:\n\n| Variable        | Description      |\n|-----------------|------------------|\n| LFREADER_CONFIG | Config file path |\n\n\nThe config file is in JSON format.\nPlease see refer to `Config` class in file `backend/config.py` for available options and default values.\n\n\n## Development\n\n### Frontend\n\nChange directory to `frontend`.\nCreate a symlink `public/archives`to the backend archive directory to serve resources.\nFinally, run `npm run dev`.\n\n### Backend\n\nWith Nix, run dev server directly: `nix run .#backend-dev`\n\nOr install all the dependencies (you could also use `venv` here):\n\n```sh\npip install -r fastapi uvicorn\nuvicorn lfreader_server.app:app --reload --port 3000\n```\n\nTo test if the backend pyproject can build successfully:\n\n```sh\ncd backend\n## optionally set up vevn\n# python -m venv venv\n# . ./venv/bin/activate\n\n## pip install\npip install .\n```\n\n\n## Migration\n\n### v3.0.0\n\nSteps to migrate database from v2.0.0+ to v3.0.0+:\n1. Make a backup of both the old database and archive directory\n2. Change `base_url`, `base_dir`, and `archive_options` to match your old settings and put the old archive directory at the specified location\n3. Run `python scripts/migrate_v3.0.0.py \u003cold_db\u003e \u003cnew_db\u003e` to create the new db and update the archive directory\n4. Remove unnecessary subdirectories n archive directory. The new archives directory should only contain files\n5. Test the migrated db and archive directory with v3.0.0+\n6. It's recommended to use the db with v3.1.0+ as it optimizes the storage\n\n\n### v2.0.0\n\nMove original environment variables to config file.\n\n### v1.2.0\n\nSteps to migrate database from below v1.2.0 to v1.2.0:\n1. Make a backup of the old db first.\n2. Create a new database by running LFReader server v1.2.0.\n3. Add all previous feeds through API or Web UI\n4. Run `python scripts/migrate_v1.2.0.py \u003cold_db\u003e \u003cnew_db\u003e` to migrate all previous entries\n\n## License\n\nAGPL-3.0\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcsunset%2Flfreader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcsunset%2Flfreader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcsunset%2Flfreader/lists"}