fix/BIT-28145-article-tbt
Tests / bridge tests (push) Successful in 40s
Tests / writer-pipeline tests (push) Successful in 50s
Tests / frontend lib tests (push) Successful in 1m42s
Tests / writer-pipeline tests (pull_request) Successful in 1m21s
Tests / bridge tests (pull_request) Successful in 1m23s
Tests / frontend lib tests (pull_request) Successful in 48s
BIT-28145: newsproject.bitreport.pt article template Total Blocking Time was 7416ms (Lighthouse Performance 60) vs home 73ms (Performance 97). Root cause: WordPress oEmbed HTML injected via set:html rendered <script>, <style>, <link> tags, inline event handlers, and heavy <iframe> embeds (Twitter, Instagram, YouTube) that blocked the main thread during HTML parsing. The prior sanitizer only stripped <script> tags and added loading=lazy to iframes — insufficient for the oEmbed payload. Changes: - Enhance bridge and frontend sanitizers to strip <style>, <link>, and inline event handlers (on* attributes) in addition to <script> - Replace <iframe> elements with click-to-load placeholders (eliminates iframe document parsing cost from main thread) - Add loading=lazy + decoding=async to <img> tags in article body - Add content-visibility:auto to .article-body CSS (skip off-screen render) - Add embed-placeholder styles in global.css + click handler in [slug].astro - Parallelize article/related/trending bridge fetches - Add preconnect hints for gravatar and featured images - Document root cause in PERFORMANCE_BASELINE.md Paperclip-Agent: Miguel Teixeira (urlKey miguel-teixeira; id 0f722e1a-bc3e-4381-8d98-76fa3c7aea10) Paperclip-Issue: BIT-28145
news-platform
Scalable multi-domain sports news platform — Astro 5 SSR frontend, Fastify bridge, headless WordPress.
Structure
news-platform/
frontend/ # Astro 5 SSR frontend application
bridge/ # Fastify bridge (WordPress REST API cache + normalizer)
writer-pipeline/ # RSS aggregator store, metrics, optional WP drafts (andebol.net)
wordpress/ # WordPress config, themes, plugins
config/domains/ # Per-domain configuration files
docs/ # Architecture and runbooks
deploy/ # LXC provisioning and deploy scripts
Quick Start
# 1. Start WordPress + MySQL
cd wordpress && docker compose up -d
# 2. Start bridge
cd bridge && npm install && npm run dev
# 3. Start frontend
cd frontend && npm install && npm run dev
Open: http://localhost:4321
Documentation
Core
- Architecture + Stack Justification
- Frontend (Astro 5)
- Bridge (Fastify)
- Multi-Domain Config
- SEO Strategy
- Deployment (LXC)
- Service Monitoring
- Runbooks (index)
Aggregator & Writer Pipeline
- Aggregator Architecture & Data Contract
- Aggregator Operations & Costs
- Writer Pipeline — andebol.net
- Writer Tools — Content Aggregation & Ranking
- Editorial Brief — andebol.net
Internationalisation
Related
- Paperclip project: News Platform
- Parent issue: BIT-345
- Gitea remote:
https://git.bitreport.pt/BitReport.pt/news-platform.git
Description
Scalable multi-domain sports news platform (frontend + WP bridge + SEO + LXC deploy)
4.6 MiB
0 Stars
32 Watchers
0 Forks
Languages
TypeScript
51.2%
Astro
38.9%
Shell
6.4%
CSS
2.2%
JavaScript
1.3%