Daily AI-enriched trades industry intelligence hub at https://tradieintel.com.au.
Astro 5 (SSR) · Vercel · Supabase · Anthropic Claude · Firecrawl · Tailwind 4 · Vitest
cp .env.example .envand fill in values.npm install- Supabase: link the project once with
supabase link --project-ref <ref>, thensupabase db pushto apply migrations. npm run dev- serves at http://localhost:4321npm test- run test suite.
Vercel Cron hits /api/cron/refresh-feeds. The handler iterates enabled sources in src/config/feeds.ts, dispatches each by type:
type: 'rss'→src/lib/rss.tsparses the feed withrss-parser.type: 'scrape'→src/lib/scrape.tsfetches the page via Firecrawl, then Claude extracts article items from the returned markdown.
Both adapters normalise to a common shape. New items are deduped against existing original_urls in Supabase, filtered by age (≤14 days), capped at 30 per run, enriched via src/lib/claude.ts (summary + why-it-matters + relevance score + controlled tags), and upserted to the feed_items table.
Astro SSR. Pages read from Supabase on each request. All content is in HTML for SEO and GEO indexability.
/- hero + 15 latest items + inline email capture/news- paginated archive (20/page)/news/[slug]- individual item with JSON-LD Article schema + related items/about,/privacy,/terms- static pages/sitemap.xml,/feed.xml- SEO endpoints/api/subscribe- email capture POST endpoint (honeypot + consent + UTM capture)/api/cron/refresh-feeds- cron entry point (Bearer-token auth)
POST /api/subscribe routes through src/lib/email.ts provider abstraction. Configure via EMAIL_PROVIDER env var (memory for dev; kit / loops / mailchimp for prod).
Subscriber metadata (consent flag, timestamp, source, referrer, UTMs) is passed as custom fields to the chosen provider so consent records live in the email tool, not Supabase.
curl -H "Authorization: Bearer $CRON_SECRET" http://localhost:4321/api/cron/refresh-feeds
# Dry run (skips inserts but still calls Claude - watch the spend):
curl -H "Authorization: Bearer $CRON_SECRET" "http://localhost:4321/api/cron/refresh-feeds?dryRun=1"Push to the connected GitHub repo. Vercel auto-builds. Configure all env vars from .env.example in the Vercel dashboard before first deploy.
Edit src/config/feeds.ts. Set enabled: true and provide a valid URL. For RSS, set type: 'rss'. For a page that doesn't have RSS, set type: 'scrape' (requires FIRECRAWL_API_KEY).
Verify before enabling:
node scripts/verify-feeds.mjs # checks RSS sources onlyNot yet built. The site captures emails for the "early list" - the daily email digest is a future v2 task. CTA copy across the site reflects this honestly; do not promise daily emails until the sender ships.
- Design spec:
docs/superpowers/specs/2026-05-22-tradie-intel-hub-design.md - Implementation plan:
docs/superpowers/plans/2026-05-22-tradie-intel-implementation.md