TypeScript backend for a Meta WhatsApp AI agent that recommends personalized Buenos Aires events from Postgres.
- Express webhook server
- Meta WhatsApp Cloud API transport
- Gemini 2.5 Pro via Google's OpenAI-compatible endpoint
- Drizzle ORM + PostgreSQL
pg-bossjob queue- Vitest + Supertest
- Copy
.env.exampleto.envand fill the required values. - Run
npm install. - Run
npm run db:migrate. - Import data:
npm run db:import:spacetimedbnpm run db:import:gcp-exportnpm run db:import:events
- Start the server with
npm run dev.
GET /healthGET /webhooks/meta/whatsappPOST /webhooks/meta/whatsapp
npm run checknpm testnpm run build
- Integration tests use
testcontainersand are gated behindRUN_CONTAINER_TESTS=1. - The default parser model is
gemini-2.5-pro. - Paywall enforcement is disabled by default with
PAYWALL_ENABLED=falseso testing stays focused on language consistency, recommendations, and the user journey. - Soft matches are returned by default with
ALLOW_SOFT_RECOMMENDATIONS=trueso the bot prefers showing the best events over asking extra reframe questions. npm run db:import:gcp-exportreads the latest Cloud SQL export from GCS and syncs user/profile signal from the GCP-backed SpacetimeDB export.- Voice transcription, curated plans, and group matching are intentionally deferred, but the service boundaries are ready for those additions.