|
3 | 3 | ## Overview |
4 | 4 |
|
5 | 5 | - Ruby web app that converts websites into RSS 2.0 feeds. |
6 | | -- Built with **Roda**, using the **html2rss** gem (+ `html2rss-configs`). |
| 6 | +- Built with **Roda** backend + **Astro** frontend, using the **html2rss** gem (+ `html2rss-configs`). |
7 | 7 | - **Principle:** _All features must work without JavaScript._ JS is only progressive enhancement. |
| 8 | +- **Frontend:** Modern Astro-based UI with component architecture, served alongside Ruby backend. |
8 | 9 |
|
9 | 10 | ## Core Rules |
10 | 11 |
|
|
13 | 14 | - ✅ Validate all inputs. Pass outbound requests through **SSRF filter**. |
14 | 15 | - ✅ Add caching headers where appropriate (`Rack::Cache`). |
15 | 16 | - ✅ Errors: friendly messages for users, detailed logging internally. |
16 | | -- ✅ CSS: Water.css + small overrides in `public/styles.css`. |
17 | | -- ✅ Specs: RSpec, unit + integration, use VCR for external requests. |
| 17 | +- ✅ **Frontend**: Use Astro components in `frontend/src/`. Keep it simple. |
| 18 | +- ✅ **CSS**: Use frontend styles in `frontend/public/styles.css`. Water.css for fallback. |
| 19 | +- ✅ **Specs**: RSpec for Ruby, build tests for frontend. |
18 | 20 |
|
19 | | -## Don’t |
| 21 | +## Don't |
20 | 22 |
|
21 | | -- ❌ Don’t depend on JS for core flows. |
22 | | -- ❌ Don’t bypass SSRF filter or weaken CSP. |
23 | | -- ❌ Don’t add databases, ORMs, or background jobs. |
24 | | -- ❌ Don’t leak stack traces or secrets in responses. |
| 23 | +- ❌ Don't depend on JS for core flows. |
| 24 | +- ❌ Don't bypass SSRF filter or weaken CSP. |
| 25 | +- ❌ Don't add databases, ORMs, or background jobs. |
| 26 | +- ❌ Don't leak stack traces or secrets in responses. |
| 27 | +- ❌ Don't add complex frontend frameworks (React, Vue, etc.). Keep Astro simple. |
| 28 | +- ❌ Don't modify `frontend/dist/` - it's generated by build process. |
25 | 29 |
|
26 | 30 | ## Project Structure |
27 | 31 |
|
28 | 32 | - `app.rb` – main Roda app |
29 | 33 | - `app/` – core modules (config, cache, ssrf, health) |
30 | 34 | - `routes/` – route handlers (`hash_branch`) |
31 | 35 | - `helpers/` – pure helper modules (`module_function`) |
32 | | -- `views/` – ERB templates |
| 36 | +- `views/` – ERB templates (fallback) |
33 | 37 | - `public/` – static assets (CSS/JS, minimal) |
| 38 | +- `frontend/` – Astro frontend application |
| 39 | + - `src/pages/` – Astro pages (index.astro, gallery.astro) |
| 40 | + - `src/layouts/` – Astro layouts (Layout.astro) |
| 41 | + - `public/` – frontend static assets |
| 42 | + - `package.json` – Node.js dependencies |
| 43 | + - `astro.config.mjs` – Astro configuration |
34 | 44 | - `config/feeds.yml` – feed definitions |
35 | 45 | - `spec/` – RSpec tests + VCR cassettes |
36 | 46 |
|
|
0 commit comments