samsonjeff/fb-scrapper-nlp-pipeline ? reverse-engineered prompt

Reverse engineered prompt

Build me a Node.js Express backend for a community incident monitoring system in Talisay, Batangas.

It should handle two things. First, receive Facebook Messenger webhooks, reply in Tagalog with AI, use Gemini as the main model and Groq as a fallback, and save each conversation to Supabase. Second, regularly scrape public Facebook page posts and comments, look for incident related words like flood, fire, or landslide, and match any location it finds to the official barangays in Talisay, with unknown locations marked as Unknown.

I also want simple control endpoints to run the scraper manually and check its status, plus basic security like rate limiting, helmet headers, and an API key for internal routes. Use environment variables for all secrets, connect everything to Supabase tables, and make it ready to run locally or deploy on Render. If you need to check current docs for Meta, Gemini, Groq, or Supabase, look them up online.