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
10- - Contributor Guide: [ docs/README.md] ( docs/README.md )
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
16+ - Docker Hub image: https://hub.docker.com/r/html2rss/web
17+ - OpenAPI file in this repo: [ public/openapi.yaml] ( public/openapi.yaml )
18+ - Contributor guide: [ docs/README.md] ( docs/README.md )
1119- Discussions: https://github.com/orgs/html2rss/discussions
1220- Sponsor: https://github.com/sponsors/gildesmarais
1321
14- ## Highlights
15-
16- - Responsive Preact interface for demo, sign-in, conversion, and result flows.
17- - Automatic source discovery with token-scoped permissions.
18- - Signed public feed URLs that work in standard RSS readers.
19- - Built-in URL validation, scoped feed access controls, and HMAC-protected tokens.
22+ ## Architecture Snapshot
2023
21- ## 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 `
2228
23- - ** Backend:** Ruby + Roda, backed by the ` html2rss ` gem for extraction.
24- - ** Frontend:** Preact app built with Vite into ` frontend/dist ` and served at ` / ` .
25- - ** Distribution:** Docker Compose by default.
29+ For detailed architecture and contributor rules, see [ docs/README.md] ( docs/README.md ) .
2630
27- For detailed architecture and internal rules, see [ docs/README.md ] ( docs/README.md ) .
31+ ## Trial Run (Docker Compose)
2832
29- ## Trial Run ( Docker Pull And Run)
33+ Prerequisite: Docker Engine + Docker Compose.
3034
31- The published image already includes a sample ` config/feeds.yml ` , so you can try the app without creating or mounting one first.
35+ Run from the repository root:
3236
3337``` bash
34- docker run --rm \
35- -p 4000:4000 \
36- -e RACK_ENV=production \
37- -e HTML2RSS_SECRET_KEY=$( openssl rand -hex 32) \
38- 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
4146Then open:
4247
43- - ` http://localhost:4000/ ` for the web UI
44- - ` http://localhost:4000/microsoft.com/azure-products.rss ` for a built-in Azure updates feed
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+
54+ ``` bash
55+ docker compose down
56+ ```
57+
58+ ## Deploy With Docker Compose
59+
60+ The checked-in [ ` docker-compose.yml ` ] ( docker-compose.yml ) requires these environment variables for ` html2rss-web ` :
61+
62+ - ` BUILD_TAG `
63+ - ` GIT_SHA `
64+ - ` HTML2RSS_SECRET_KEY `
65+ - ` HEALTH_CHECK_TOKEN `
66+ - ` BROWSERLESS_IO_API_TOKEN `
4567
46- This trial run is intentionally minimal. Use Docker Compose for Browserless, auto-updates, or local feed overrides.
68+ Optional runtime variables:
4769
48- ## Deploy (Docker Compose)
70+ - ` SENTRY_DSN `
71+ - ` SENTRY_ENABLE_LOGS ` (defaults to ` false ` )
4972
50- Quick start :
73+ Example :
5174
5275``` bash
5376export HTML2RSS_SECRET_KEY=" $( openssl rand -hex 32) "
@@ -56,25 +79,43 @@ export BROWSERLESS_IO_API_TOKEN="replace-with-your-browserless-token"
5679export BUILD_TAG=" local"
5780export GIT_SHA=" $( git rev-parse --short HEAD 2> /dev/null || echo dev) "
5881export AUTO_SOURCE_ENABLED=true
59- docker-compose up
82+
83+ docker compose up -d
6084```
6185
62- Optional:
86+ ## Runtime Behavior That Affects Operations
6387
64- ``` bash
65- export SENTRY_DSN=" https://examplePublicKey@o0.ingest.sentry.io/0"
66- export SENTRY_ENABLE_LOGS=true
67- ```
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).
93+
94+ ## Stable Integration Entry Points
95+
96+ - OpenAPI: ` /openapi.yaml ` (or [ ` public/openapi.yaml ` ] ( public/openapi.yaml ) in-repo)
97+ - API metadata: ` /api/v1 `
98+ - Feed creation endpoint: ` POST /api/v1/feeds `
99+ - Health endpoints: ` /api/v1/health ` , ` /api/v1/health/ready ` , ` /api/v1/health/live `
68100
69- UI + API run on ` http://localhost:4000 ` . The app exits if the secret key is missing.
101+ For feed config authoring/validation, use the ` html2rss ` schema:
70102
71- ## Development
103+ - https://github.com/html2rss/html2rss/blob/master/schema/html2rss-config.schema.json
104+ - ` html2rss schema `
72105
73- Use the repository's [ Dev Container] ( .devcontainer/README.md ) for all local development and tests.
74- Running the app directly on the host is not supported.
106+ ## Development (Dev Container Only)
107+
108+ All local development and test execution should run inside the repository Dev Container.
109+
110+ ``` bash
111+ make setup
112+ make dev
113+ make ready
114+ ```
75115
76- 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 .
77117
78118## Contributing
79119
80- 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