Skip to content

Feedback Intelligence System

Multi-tenant feedback management with AI-powered conversations and enterprise-grade security.

Overview

The Feedback Intelligence System is a production-ready TypeScript microservice that collects and analyzes customer feedback through AI-powered conversations using behavioral research methodology. Built on PostgreSQL and Redis, it provides real-time feedback management with comprehensive admin dashboards.

Try Live Demo → - See AI-powered feedback collection in action

What Makes It Different

Traditional feedback tools accept whatever customers write. This system uses Customer Interview Methodology (Teresa Torres) to dig deeper:

  • Grounds users in specific past behavior: "Tell me about the LAST TIME..."
  • Excavates stories with concrete follow-ups
  • Synthesizes understanding after 2-3 exchanges
  • Identifies opportunities when user confirms
  • Avoids hypotheticals and feature suggestions

Example: Customer says "service was slow" → System asks "Tell me about the last time you experienced slow service. What were you trying to do?"

Key Features

AI Conversation Engine

  • Behavioral Research Methodology: Concrete story excavation using Customer Interview techniques
  • Dynamic Context Injection: Adapts questions based on conversation state
  • Smart Efficiency: Skips unnecessary questions when sufficient context available
  • Semantic Search: Find similar feedback using PostgreSQL pgvector

Multi-Tenant Architecture

  • Organization & Project Isolation: Complete data segregation
  • Flexible API Keys: Org-wide or project-specific authentication
  • Magic Links: Passwordless feedback viewing (24hr expiry)
  • Cross-Origin Widgets: Embed anywhere with CORS support

Admin Dashboards

  • Project Admin: Manage feedback for single project with filtering, export, bulk operations
  • Super Admin: Cross-organization analytics and management (rate-limited)
  • Real-Time Metrics: Widget loads, AI conversations, feedback submissions
  • Export Options: CSV and JSON with CSV injection protection

Analytics Integration

  • Statsig Integration: Cross-product user journey tracking
  • Unified Identity: Shares identity with OrderDay and other Zeron products
  • Environment Tiers: Separate dev/staging/production tracking
  • Event Tracking: Widget lifecycle, conversations, feedback submissions

Security & Reliability

  • Rate Limiting: Protects super admin endpoints (100 req/15min)
  • Timing Attack Protection: Constant-time authentication
  • CSV Injection Prevention: Sanitizes exports against formula injection
  • Graceful Degradation: Works without Redis or PostgreSQL

Repository Structure

feedback-service/
├── packages/
│   ├── api/              # Backend API
│   └── feedback-client/  # Frontend client
├── prisma/               # Database schema
├── public/               # Public assets
└── scripts/              # Automation scripts

Quick Start

bash
cd feedback-service

# Development
npm run dev                  # Start local server (port 3000)
npm run dev:client           # Start client dev server

# Database Setup
npm run db:migrate           # Run Prisma migrations
npm run db:generate          # Generate Prisma client
npm run db:seed              # Seed with test data

# Admin Tools
npm run create-org           # Create organization
npm run create-project       # Create project
npm run generate-key         # Generate API key
npm run magic-link           # Generate magic link for user

# Testing
npm test                     # Run tests
npm run eval                 # Run PromptFoo AI evaluations
npm run lint                 # Lint code

# Deployment
npm run deploy               # Deploy to Vercel (feedback.zeron.ventures)

Architecture

Data Flow

Feedback Collection:

  1. Widget embedded in website → User opens feedback dialog
  2. AI conversation (Claude Haiku) → Behavioral interview questions
  3. Similar feedback search → Show related issues (pgvector)
  4. Opportunity extraction → Structured data from interview
  5. Feedback submitted → Stored in PostgreSQL with metadata
  6. Knowledge graph → Neo4j nodes/relationships created
  7. Magic link generated → User can view their feedback later

Task Queue (Optional):

  • Feedback can trigger Redis task creation
  • External orchestrator processes tasks
  • Enables async agent work on feedback

Admin Dashboards

Project Admin (/admin-dashboard.html):

  • Scoped to single project via API key
  • Filter by status, priority, sentiment, category
  • Export to CSV/JSON with sanitization
  • Bulk operations (status, priority changes)
  • Real-time statistics and charts

Super Admin (/superadmin.html):

  • Cross-organization visibility (requires ADMIN_SECRET_KEY)
  • Platform-wide analytics and metrics
  • Rate limited (100 requests per 15 minutes)
  • Organization management
  • Secure export across all data

Security Features

Authentication:

  • X-API-Key header for project/org access
  • ADMIN_SECRET_KEY for super admin (constant-time comparison)
  • Magic links for passwordless user feedback viewing

Protection:

  • Rate limiting on super admin endpoints
  • CSV formula injection prevention in exports
  • CORS configuration for cross-origin embedding
  • Multi-tenant data isolation

Compliance:

  • FS-6: Timing attack vulnerability fixed
  • FS-7: Rate limiting implemented
  • FS-8: CSV injection prevention added

Knowledge Graph Intelligence

Neo4j Integration

Transform product feedback into actionable roadmap insights using a knowledge graph that maps relationships between opportunities, components, workflows, and user segments.

Graph Schema:

  • Nodes: Opportunity, Component, Workflow, UserSegment, Entity, Project
  • Relationships: DESCRIBES, INVOLVES, MENTIONS, AFFECTS, PART_OF

Integration Flow:

  1. AI customer interview extracts structured opportunity data
  2. Feedback saved to PostgreSQL with rich metadata
  3. Neo4j graph nodes automatically created
  4. Relationships mapped between opportunities, components, workflows
  5. Neo4j ID stored back to PostgreSQL for cross-referencing

Use Cases:

Pattern Detection:

  • "Show all opportunities mentioning the 'product table' component"
  • "Which workflows have >3 pain points and high severity?"
  • "Cluster similar opportunities by component overlap"

Impact Analysis:

  • "Which opportunities affect the most user segments?"
  • "What's the relationship between this opportunity and others?"
  • "If we fix this workflow, which other opportunities does it address?"

Roadmap Prioritization:

  • "Surface opportunities with high severity + multiple mentions + wide user segment impact"
  • "Which components are mentioned in the most critical opportunities?"
  • "Show dependency chains: fixing X unlocks Y and Z"

Opportunity Data Model:

javascript
{
  statement: "The opportunity statement",
  severity: "high",
  priority: "critical",
  storyNarrative: "User's specific behavioral instance",
  workflowDescription: "Current process with pain points",
  goalDescription: "What user wants to achieve",
  components: ["product table", "inventory view"],
  userSegments: ["inventory managers"],
  entities: ["QuickBooks", "Shopify"]
}

Key Features:

  • ✅ Graceful degradation (works without Neo4j)
  • ✅ Multi-tenant isolation by projectId
  • ✅ Auto-tracking of mention counts and opportunity relationships
  • ✅ Rich metadata from behavioral interviews
  • ✅ Future-ready for vector embeddings & semantic similarity

Future Enhancements:

  • Semantic similarity via embeddings (Phase 2)
  • Pattern detection algorithms (Phase 3)
  • Graph visualization dashboard (Phase 4)
  • Sales pipeline integration (Phase 5)

Analytics & Insights

Statsig Integration

Track user journeys across Zeron products with unified identity:

Events Tracked:

  • Widget lifecycle (loaded, opened, closed)
  • AI conversation flow (started, messages sent, searches)
  • Feedback submission and magic link generation

Custom Properties:

  • Project/Organization context
  • Product source (OrderDay, feedback widget)
  • Environment tier (dev/staging/production)
  • Widget version for A/B testing

Identity System:

  • Anonymous users: Stable localStorage ID
  • Authenticated users: Email-based ID from OAuth
  • Cross-domain cookies sync identity
  • Statsig stitches anonymous → authenticated journeys

Real-Time Metrics

Widget Performance:

  • Load times and success rates
  • Conversation engagement metrics
  • Feedback submission rates
  • Magic link usage

Admin Insights:

  • Feedback volume by project/org
  • Status distribution and resolution times
  • Priority and sentiment analysis
  • User engagement patterns

Production Deployment

Live Demo: preview.orderday.coProduction: feedback.zeron.ventures

Capabilities:

  • Cross-origin widget embedding
  • Real-time AI conversations without page refresh
  • Behavioral research methodology
  • Centralized feedback management

Technology Stack:

  • TypeScript monorepo (API + Client packages)
  • PostgreSQL with Prisma ORM and pgvector
  • Neo4j knowledge graph for roadmap intelligence
  • Redis for task queues and magic links
  • Anthropic Claude Haiku for AI conversations
  • PromptFoo for conversation quality validation
  • Statsig for cross-product analytics
  • Vercel serverless deployment

Get Started

Interested in using the Feedback Intelligence System?

Contact us to discuss implementation.


Recent Updates:

  • ✅ Neo4j knowledge graph for roadmap intelligence
  • ✅ Super admin dashboard with cross-org analytics
  • ✅ Statsig integration for user journey tracking
  • ✅ Magic link passwordless authentication
  • ✅ CSV injection protection in exports
  • ✅ Rate limiting and timing attack fixes
  • ✅ Environment tier separation for analytics

Part of the Zeron Platform | Built with VitePress