AI-powered account research and analysis platform for Salesforce Strategic SEs. Uses Agentforce + Node.js middleware + Google Apps Script to deliver comprehensive account intelligence via natural language in Slack.
- Salesforce: Agentforce Agent, 6 Custom Objects, Apex Invocable Actions
- Middleware: Express/TypeScript on GCP Cloud Run, 7 data connectors, 5-layer LLM pipeline
- Apps Script: Google Workspace doc generation (briefings, POV decks)
- Data: AlloyDB + pgvector (RAG), Redis (cache + job queue)
├── salesforce/ # SFDX project (custom objects, Apex, metadata)
├── middleware/ # Node.js/TypeScript API server
│ └── src/
│ ├── connectors/ # Data source connectors (MCP-ready)
│ ├── llm/ # LLM router, clients, prompt cache
│ ├── orchestration/ # BullMQ job queue, pipeline
│ ├── rag/ # Vector store, embedding pipeline
│ ├── security/ # Prompt sanitizer, output validator
│ ├── routes/ # API routes (v1)
│ ├── middleware/ # Express middleware (auth, logging)
│ └── utils/ # Logger, Redis, errors
├── apps-script/ # Google Apps Script (doc generation)
├── config/ # Seed data (customer stories, product catalog)
└── docker-compose.yml # Local dev (Node.js + Redis + PostgreSQL/pgvector)
# Start local infrastructure
docker compose up -d redis postgres
# Set up middleware
cd middleware
cp .env.example .env # Edit with your keys
npm install
npm run dev # Runs on http://localhost:3000
# Health check
curl http://localhost:3000/api/healthAll endpoints (except health) require X-API-Key header.
GET /api/health— Health checkPOST /api/v1/intelligence/analyze— Start account analysisGET /api/v1/intelligence/status/:jobId— Check job statusGET /api/v1/connectors— List available connectors
cd middleware
npm test # Run all tests
npm run lint # Type check- Phase 1A: Repo & scaffold (complete)
- Phase 1B: Salesforce object model
- Phase 1C-D: Apex actions
- Phase 1E: Middleware connectors
- Phase 1F: LLM layer
- Phase 1G: Job queue & RAG
- Phase 1H: Integration testing