Skip to content

prayush21/product-feedback-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Feedback Pulse πŸ“Š

AI-powered product feedback aggregation and analysis tool for Product Managers

Feedback Pulse helps Product Managers consolidate scattered feedback from multiple sources, analyze sentiment and themes using AI, and make data-driven product decisions.

🎯 Overview

Product Managers receive feedback from various sources daily - customer support tickets, Discord/Slack channels, GitHub issues, social media, and app stores. Feedback Pulse solves the challenge of fragmented feedback by:

  • Aggregating feedback from multiple sources into a unified view
  • Analyzing each piece of feedback for sentiment, urgency, and themes using AI
  • Summarizing feedback into actionable insights
  • Prioritizing feature requests based on severity, quantity, and recency
  • Enabling semantic search to find related feedback across all sources

✨ Key Features

Core Capabilities

  • πŸ“₯ Feedback Ingestion: Unified interface for collecting feedback from multiple sources
  • πŸ€– AI-Powered Analysis: Automatic sentiment detection, urgency scoring, and theme extraction
  • πŸ” Semantic Search: Natural language search across all feedback using vector embeddings
  • πŸ“Š Insights Dashboard: AI-generated summaries, theme distribution, and sentiment trends
  • 🎯 Feature Prioritization: Smart ranking of feature requests based on multiple factors
  • πŸ’‘ Idea Playground: Interactive workspace for PMs to validate feature ideas against feedback

AI-Assisted Feature Building

  • Validator Mode: Validate requirements against feedback to ensure comprehensive coverage
  • Sounding Board Mode: Explore creative alternatives and edge cases with AI assistance
  • Conversational Refinement: Iterative chat interface for refining feature specifications
  • My Features: Save and manage feature specs with linked feedback context

πŸ—οΈ Architecture

Tech Stack

Backend:

  • Cloudflare Workers: Serverless API hosting and orchestration
  • Hono: Lightweight, fast web framework for routing
  • D1 Database: SQLite-based serverless database
  • Workers AI: Built-in AI models for sentiment, summarization, and theme extraction
  • Vectorize: Vector database for semantic search
  • Workers KV: Key-value store for caching summaries

Frontend:

System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      CLOUDFLARE WORKERS                         β”‚
β”‚                  (Hono Router + API Endpoints)                  β”‚
β”‚                                                                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚
β”‚  β”‚/feedback β”‚  β”‚/insights β”‚  β”‚ /search  β”‚  β”‚ /analyze β”‚        β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚             β”‚             β”‚             β”‚
        β–Ό             β–Ό             β–Ό             β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚      D1       β”‚ β”‚    KV     β”‚ β”‚ Vectorize β”‚ β”‚  Workers AI   β”‚
β”‚  (Feedback    β”‚ β”‚ (Cached   β”‚ β”‚ (Semantic β”‚ β”‚ (Llama 3.1,   β”‚
β”‚   Storage)    β”‚ β”‚ Summaries)β”‚ β”‚  Search)  β”‚ β”‚  BGE Embed)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Getting Started

Prerequisites

Installation

  1. Clone the repository

    git clone https://github.com/prayush21/product-feedback-agent.git
    cd product-feedback-agent
  2. Install dependencies

    # Install backend dependencies
    pnpm install
    
    # Install frontend dependencies
    cd frontend
    pnpm install
    cd ..
  3. Initialize the database

    # Create local D1 database and run schema
    pnpm run db:init
  4. Configure Cloudflare resources

    Update wrangler.toml with your Cloudflare account details:

    [[d1_databases]]
    binding = "DB"
    database_name = "feedback-db"
    database_id = "your-database-id"
    
    [[kv_namespaces]]
    binding = "CACHE"
    id = "your-kv-namespace-id"
    
    [[vectorize]]
    binding = "VECTORIZE"
    index_name = "feedback-embeddings"

Development

  1. Start the backend development server

    pnpm run dev

    This starts the Cloudflare Workers dev server at http://localhost:8787

  2. Start the frontend development server (in a separate terminal)

    cd frontend
    pnpm run dev

    This starts the Vite dev server at http://localhost:5173

  3. Load mock data (optional)

    curl -X POST http://localhost:8787/api/feedback/bulk \
      -H "Content-Type: application/json" \
      -d @data/mock-feedback.json

πŸ“ Project Structure

product-feedback-agent/
β”œβ”€β”€ src/                      # Backend source code
β”‚   β”œβ”€β”€ index.ts              # Main Worker entry point
β”‚   β”œβ”€β”€ types.ts              # TypeScript type definitions
β”‚   β”œβ”€β”€ db/
β”‚   β”‚   └── schema.sql        # Database schema
β”‚   └── routes/
β”‚       β”œβ”€β”€ feedback.ts       # Feedback CRUD endpoints
β”‚       β”œβ”€β”€ insights.ts       # Analytics & summaries
β”‚       β”œβ”€β”€ search.ts         # Semantic search
β”‚       β”œβ”€β”€ analysis.ts       # AI analysis triggers
β”‚       β”œβ”€β”€ feature-specs.ts  # Feature specifications
β”‚       └── ai-validator.ts   # AI validation system
β”‚
β”œβ”€β”€ frontend/                 # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ App.tsx           # Main app component
β”‚   β”‚   β”œβ”€β”€ main.tsx          # Entry point
β”‚   β”‚   β”œβ”€β”€ api/              # API client functions
β”‚   β”‚   β”œβ”€β”€ components/       # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ pages/            # Page components
β”‚   β”‚   β”œβ”€β”€ context/          # React context providers
β”‚   β”‚   β”œβ”€β”€ styles/           # Global styles
β”‚   β”‚   └── types/            # TypeScript types
β”‚   └── public/               # Static assets
β”‚
β”œβ”€β”€ docs/                     # Documentation
β”‚   β”œβ”€β”€ PRD.md                # Product Requirements Document
β”‚   └── FEATURE_BUILDER_PRD.md # Feature Builder PRD
β”‚
β”œβ”€β”€ data/                     # Mock data for testing
β”‚   └── mock-feedback.json
β”‚
β”œβ”€β”€ public/                   # Static assets served by Workers
β”‚   └── index.html
β”‚
β”œβ”€β”€ package.json              # Backend dependencies
β”œβ”€β”€ wrangler.toml             # Cloudflare Workers config
└── tsconfig.json             # TypeScript config

πŸ”Œ API Endpoints

Feedback Management

Method Endpoint Description
GET /api/feedback List feedback with filters (source, sentiment, date)
GET /api/feedback/:id Get single feedback item with analysis
POST /api/feedback Create new feedback item
POST /api/feedback/bulk Bulk import feedback
DELETE /api/feedback/:id Delete feedback item

Analysis

Method Endpoint Description
POST /api/analyze/:id Trigger AI analysis for specific feedback
POST /api/analyze/batch Analyze all unprocessed feedback

Insights & Summaries

Method Endpoint Description
GET /api/insights/summary AI-generated summary (daily/weekly/custom)
GET /api/insights/themes Top themes with counts and sentiment
GET /api/insights/priorities Prioritized feature requests
GET /api/insights/sentiment-trend Sentiment over time
GET /api/insights/sources Breakdown by feedback source

Semantic Search

Method Endpoint Description
GET /api/search?q=... Natural language search across feedback
POST /api/search/similar/:id Find similar feedback items

Feature Specifications

Method Endpoint Description
GET /api/feature-specs List all feature specifications
GET /api/feature-specs/:id Get single feature spec
POST /api/feature-specs Create new feature spec
PUT /api/feature-specs/:id Update feature spec
DELETE /api/feature-specs/:id Delete feature spec

AI Validation

Method Endpoint Description
POST /api/ai/validate-feature Validate requirements against feedback

πŸ—„οΈ Database Schema

The application uses a relational schema with the following tables:

  • sources: Feedback sources (Discord, GitHub, Twitter, etc.)
  • feedback: Main feedback items with AI analysis results
  • themes: Extracted themes/topics
  • feedback_themes: Many-to-many relationship between feedback and themes
  • feature_requests: Extracted feature requests with priority scores
  • feature_specs: PM-created feature specifications with conversation history

For the complete schema, see src/db/schema.sql.

πŸ€– AI Models

Task Model Purpose
Sentiment Analysis @cf/huggingface/distilbert-sst-2-int8 Classify sentiment as positive/negative/neutral
Summarization @cf/meta/llama-3.1-8b-instruct Generate one-line summaries
Theme Extraction @cf/meta/llama-3.1-8b-instruct Extract key themes from feedback
Urgency Detection @cf/meta/llama-3.1-8b-instruct Classify urgency (critical/high/medium/low)
Embeddings @cf/baai/bge-base-en-v1.5 Generate 768-dim vectors for semantic search
Feature Validation @cf/meta/llama-3.1-8b-instruct Validate requirements & provide suggestions

πŸ“Š Deliverables

1. Dashboard

  • Real-time metrics: total feedback, average sentiment, top themes
  • AI-generated daily/weekly summaries
  • Recent feedback with sentiment badges
  • Theme distribution visualization

2. Feedback List & Detail Views

  • Filterable feedback list (by source, sentiment, urgency, date, theme)
  • Detailed feedback analysis with AI insights
  • Similar feedback suggestions using semantic search

3. Insights & Analytics

  • AI-generated insights with key takeaways
  • Theme breakdown with drill-down capability
  • Feature request prioritization
  • Sentiment trends over time

4. Idea Playground (Feature Builder)

  • Interactive sidebar for exploring feedback
  • AI-assisted feature validation in two modes:
    • Validator: Ensure requirements comprehensively address feedback
    • Sounding Board: Explore creative alternatives and edge cases
  • Conversational refinement with chat interface
  • Save feature specs to "My Features" library

5. Semantic Search

  • Natural language query support
  • Vector-based similarity matching
  • Context-aware results

🚒 Deployment

Deploy to Cloudflare Workers

  1. Deploy the backend

    pnpm run deploy
  2. Initialize remote database

    pnpm run db:init:remote
  3. Build and deploy frontend

    cd frontend
    pnpm run build
    # Copy build output to ../public/
    cp -r dist/* ../public/
    cd ..
    pnpm run deploy

Environment Configuration

Set up the following in your Cloudflare dashboard:

  1. D1 Database: Create a D1 database and update database_id in wrangler.toml
  2. KV Namespace: Create a KV namespace for caching and update id in wrangler.toml
  3. Vectorize Index: Create a Vectorize index named feedback-embeddings
  4. Workers AI: Enabled automatically with Workers

πŸ§ͺ Testing

# Type checking
pnpm run typecheck

# Frontend tests
cd frontend
pnpm run build
pnpm run preview

πŸ“ Usage Examples

Load Mock Feedback

curl -X POST http://localhost:8787/api/feedback/bulk \
  -H "Content-Type: application/json" \
  -d @data/mock-feedback.json

Analyze All Feedback

curl -X POST http://localhost:8787/api/analyze/batch

Search Feedback

curl "http://localhost:8787/api/search?q=audio+quality+issues"

Get Daily Summary

curl "http://localhost:8787/api/insights/summary?period=daily"

πŸ› οΈ Development Workflow

  1. Make changes to backend code in src/ or frontend code in frontend/src/
  2. Hot reload is enabled in both dev servers
  3. Test locally using the development servers
  4. Type check with pnpm run typecheck
  5. Deploy when ready using pnpm run deploy

πŸ“š Documentation

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This project is part of a demonstration/educational repository.

πŸ‘₯ Authors

πŸ™ Acknowledgments

  • Built with Cloudflare's Developer Platform
  • Powered by Llama 3.1 and BGE embeddings
  • UI inspired by modern product management tools

Demo Context: This application demonstrates AI-powered feedback analysis for NotebookLM, an AI-powered notebook/research assistant. The principles apply to any SaaS product requiring centralized feedback management.

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •