feat(bridge): implement Fastify bridge API for WordPress (BIT-350) #1

Merged
spark merged 2 commits from task/BIT-350-bridge-api into main 2026-03-23 14:55:51 +00:00
2 Commits
Author SHA1 Message Date
BitReport PR BotandPaperclip 25ecde95a5 chore: auto-resolve conflicts with main
Automated merge of main into task/BIT-350-bridge-api (PR #1).
Conflict strategy: -X theirs (base branch preferred).

Co-Authored-By: Paperclip <[email protected]>
2026-03-23 14:52:48 +00:00
Artur MoreiraandPaperclip b2034f2497 feat(bridge): implement Fastify bridge API for WordPress (BIT-350)
- Fastify + TypeScript service in bridge/ listening on port 3200
- WordPress REST API client with _embed support and data normalization
- Redis stale-while-revalidate cache with in-process Map fallback
- Domain routing: reads config/domains/<host>.json per Host header
- Routes: /homepage, /articles, /articles/:slug, /articles/:slug/related,
  /categories, /categories/:slug, /trending, /api/tags, /api/media/:id,
  /api/site-config, /health
- /api/posts and /api/categories aliases redirect to canonical routes
- Rate limiting via @fastify/rate-limit; CORS via @fastify/cors
- Error handling: WP unavailable → serve stale cache or 503
- Domain configs for localhost and newsproject.bitreport.pt

Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
2026-03-23 14:17:37 +00:00