22
33# html2rss-web
44
5- html2rss-web converts arbitrary websites into RSS 2.0 feeds with a slim Ruby backend and a Preact frontend.
5+ ` html2rss-web ` serves RSS/JSON feeds from website sources using a Ruby (Roda) backend and a Preact frontend.
66
7- ## Links
7+ ## Use This Repo For
88
9- - Docs & feed directory: https://html2rss.github.io
9+ - Running a self-hosted ` html2rss-web ` instance with Docker Compose.
10+ - Creating signed, per-account feed URLs through ` POST /api/v1/feeds ` .
11+ - Local development inside the repository Dev Container.
12+
13+ ## Quick Links
14+
15+ - Public docs + feed directory: https://html2rss.github.io
1016- Docker Hub image: https://hub.docker.com/r/html2rss/web
11- - OpenAPI spec in this repo: [ public/openapi.yaml] ( public/openapi.yaml )
12- - Contributor Guide : [ docs/README.md] ( docs/README.md )
17+ - OpenAPI file in this repo: [ public/openapi.yaml] ( public/openapi.yaml )
18+ - Contributor guide : [ docs/README.md] ( docs/README.md )
1319- Discussions: https://github.com/orgs/html2rss/discussions
1420- Sponsor: https://github.com/sponsors/gildesmarais
1521
16- ## Highlights
17-
18- - Responsive Preact interface for demo, sign-in, conversion, and result flows.
19- - Automatic source discovery with token-scoped permissions.
20- - Signed public feed URLs that work in standard RSS readers.
21- - Built-in URL validation, scoped feed access controls, and HMAC-protected tokens.
22+ ## Architecture Snapshot
2223
23- ## Architecture Overview
24+ - Backend: Ruby + Roda (` app.rb ` , ` app/web/** ` )
25+ - Frontend: Preact + Vite (built assets served from ` frontend/dist ` )
26+ - Feed extraction: ` html2rss ` gem
27+ - Distribution baseline: ` docker-compose.yml `
2428
25- - ** Backend:** Ruby + Roda, backed by the ` html2rss ` gem for extraction.
26- - ** Frontend:** Preact app built with Vite into ` frontend/dist ` and served at ` / ` .
27- - ** Distribution:** Docker Compose by default.
28-
29- For detailed architecture and internal rules, see [ docs/README.md] ( docs/README.md ) .
29+ For detailed architecture and contributor rules, see [ docs/README.md] ( docs/README.md ) .
3030
3131## Trial Run (Docker Compose)
3232
33- The published image already includes a sample ` config/feeds.yml ` , so you can try the app without creating or mounting one first. Use Docker Compose for the trial run because the current production boot path requires build metadata and the bundled Browserless wiring from the checked-in compose file .
33+ Prerequisite: Docker Engine + Docker Compose.
3434
35- Pull the image explicitly if you want to confirm the published Docker Hub tag first :
35+ Run from the repository root :
3636
3737``` bash
38- docker pull html2rss/web
38+ BUILD_TAG=" $( date +%F) " \
39+ GIT_SHA=" trial" \
40+ HTML2RSS_SECRET_KEY=" $( openssl rand -hex 32) " \
41+ HEALTH_CHECK_TOKEN=" $( openssl rand -hex 24) " \
42+ BROWSERLESS_IO_API_TOKEN=" trial-browserless-token" \
43+ docker compose up -d
3944```
4045
46+ Then open:
47+
48+ - ` http://localhost:4000/ ` (UI)
49+ - ` http://localhost:4000/api/v1 ` (API metadata)
50+ - ` http://localhost:4000/openapi.yaml ` (OpenAPI document)
51+
52+ Stop with:
53+
4154``` bash
42- BUILD_TAG=$( date +%F) \
43- GIT_SHA=trial \
44- HTML2RSS_SECRET_KEY=$( openssl rand -hex 32) \
45- HEALTH_CHECK_TOKEN=$( openssl rand -hex 24) \
46- BROWSERLESS_IO_API_TOKEN=trial-browserless-token \
47- docker compose up -d
55+ docker compose down
4856```
4957
50- Then open:
58+ ## Deploy With Docker Compose
5159
52- - ` http://localhost:4000/ ` for the web UI
53- - ` http://localhost:4000/microsoft.com/azure-products.rss ` for a built-in Azure updates feed
54- - ` http://localhost:4000/openapi.yaml ` for the generated OpenAPI document
60+ The checked-in [ ` docker-compose.yml ` ] ( docker-compose.yml ) requires these environment variables for ` html2rss-web ` :
5561
56- This trial run is intentionally minimal. Stop it with ` docker compose down ` . Keep the checked-in ` docker-compose.yml ` as the baseline for real deployments, especially if you want Browserless, auto-updates, or local feed overrides.
62+ - ` BUILD_TAG `
63+ - ` GIT_SHA `
64+ - ` HTML2RSS_SECRET_KEY `
65+ - ` HEALTH_CHECK_TOKEN `
66+ - ` BROWSERLESS_IO_API_TOKEN `
5767
58- ## Deploy (Docker Compose)
68+ Optional runtime variables:
5969
60- Quick start:
70+ - ` SENTRY_DSN `
71+ - ` SENTRY_ENABLE_LOGS ` (defaults to ` false ` )
72+
73+ Example:
6174
6275``` bash
6376export HTML2RSS_SECRET_KEY=" $( openssl rand -hex 32) "
@@ -66,46 +79,43 @@ export BROWSERLESS_IO_API_TOKEN="replace-with-your-browserless-token"
6679export BUILD_TAG=" local"
6780export GIT_SHA=" $( git rev-parse --short HEAD 2> /dev/null || echo dev) "
6881export AUTO_SOURCE_ENABLED=true
69- docker-compose up
70- ```
71-
72- Optional:
7382
74- ``` bash
75- export SENTRY_DSN=" https://examplePublicKey@o0.ingest.sentry.io/0"
76- export SENTRY_ENABLE_LOGS=true
83+ docker compose up -d
7784```
7885
79- UI + API run on ` http://localhost:4000 ` . The app exits if the secret key is missing.
80-
81- Production defaults matter:
86+ ## Runtime Behavior That Affects Operations
8287
83- - ` AUTO_SOURCE_ENABLED ` is ` false ` in production unless you set it to ` true ` .
84- - The create-feed API at ` /api/v1/feeds ` requires a bearer token.
85- - ` faraday ` is the default strategy; the UI retries once with ` browserless ` when ` faraday ` cannot finish the page.
88+ - In production, missing ` HTML2RSS_SECRET_KEY ` stops startup.
89+ - ` BUILD_TAG ` and ` GIT_SHA ` are expected in production; missing values produce a startup warning.
90+ - ` POST /api/v1/feeds ` requires a bearer token and only works when ` AUTO_SOURCE_ENABLED=true ` .
91+ - ` AUTO_SOURCE_ENABLED ` defaults to ` true ` in development/test and ` false ` otherwise.
92+ - Strategy support comes from ` Html2rss::RequestService ` (` faraday ` and ` browserless ` availability is runtime-dependent).
8693
87- If you enable automatic feed generation, make sure you also configure token distribution and Browserless for JavaScript-heavy pages.
94+ ## Stable Integration Entry Points
8895
89- ## Integration Discovery
90-
91- These are the stable entry points for tooling and agents:
92-
93- - OpenAPI: [ ` public/openapi.yaml ` ] ( public/openapi.yaml ) in the repo, or ` /openapi.yaml ` from a running instance
96+ - OpenAPI: ` /openapi.yaml ` (or [ ` public/openapi.yaml ` ] ( public/openapi.yaml ) in-repo)
9497- API metadata: ` /api/v1 `
95- - Generated feed creation endpoint: ` POST /api/v1/feeds `
98+ - Feed creation endpoint: ` POST /api/v1/feeds `
99+ - Health endpoints: ` /api/v1/health ` , ` /api/v1/health/ready ` , ` /api/v1/health/live `
100+
101+ For feed config authoring/validation, use the ` html2rss ` schema:
96102
97- For config authoring and validation, use the ` html2rss ` JSON Schema from the core repo:
103+ - https://github.com/html2rss/html2rss/blob/master/schema/html2rss-config.schema.json
104+ - ` html2rss schema `
98105
99- - Core repo file: ` https://github.com/html2rss/html2rss/blob/master/schema/html2rss-config.schema.json `
100- - CLI export: ` html2rss schema `
106+ ## Development (Dev Container Only)
101107
102- ## Development
108+ All local development and test execution should run inside the repository Dev Container.
103109
104- Use the repository's [ Dev Container] ( .devcontainer/README.md ) for all local development and tests.
105- Running the app directly on the host is not supported.
110+ ``` bash
111+ make setup
112+ make dev
113+ make ready
114+ ```
106115
107- See the [ Contributor Guide ] ( docs/README.md ) for setup commands, testing strategy , and backend structure rules .
116+ See [ docs/README.md ] ( docs/README.md ) for contributor workflows, verification gates , and architectural constraints .
108117
109118## Contributing
110119
111- See the [ html2rss project guidelines] ( https://html2rss.github.io/get-involved/contributing ) .
120+ - Project guidelines: https://html2rss.github.io/get-involved/contributing
121+ - Repo contributor guide: [ docs/README.md] ( docs/README.md )
0 commit comments