An AI-powered feedback collection, triaging, and reporting system built with Next.js, AI SDK, Workflow DevKit, and Slack integration – view the demo.
A reference architecture to be adapted to your organization's needs.
A full-stack template for collecting, triaging, and reporting product feedback from the field. The system uses AI agents to automatically match customer feedback to existing feature requests, create new requests when needed, and generate insights reports for product areas.
- Multiple Entry Points - Capture feedback via Slack reactions, form submissions, or web UI
- AI-Powered Matching - Uses semantic search with vector embeddings to match feedback to existing feature requests
- Intelligent Triaging - Three-tier confidence system: auto-add (≥0.9), human approval (0.8-0.9), or create new (<0.8)
- Human-in-the-Loop - Slack integration for approval workflows and notifications
- Area Insights - AI agent generates structured insights reports for product areas
- Framework: Next.js 16 with App Router
- Durable Execution: Workflow DevKit
- AI: Vercel AI SDK with AI Gateway
- Human-in-the-Loop: Slack Bolt + Vercel Slack Bolt adapter
- Vector Search: Upstash Vector with OpenAI embeddings
- Database: PostgreSQL with Drizzle ORM
- Caching: Redis/Upstash KV
- UI: shadcn/ui, Tailwind CSS v4, Radix UI
- Authentication: NextAuth v5 with Google OAuth
| App | Description | Docs |
|---|---|---|
| apps/www | Next.js web app for feedback collection and reporting | README |
| apps/slack-app | Slack app for capturing feedback via reactions and commands | README |
| Package | Description |
|---|---|
| packages/ai | Shared AI helpers (agents, tools, embeddings) |
| packages/database | Drizzle ORM schema and utilities |
| packages/redis | Redis/Upstash client helpers |
Each app can be deployed independently:
- Deploy Web App – the main feedback UI
- Deploy Slack App – optional Slack integration
For manual setup and local development, see each app's README.
Workflow Durable Execution with use workflow
This project uses Workflow DevKit to orchestrate background tasks for processing feedback, matching requests, and generating insights.
Feedback is automatically matched to existing feature requests using:
- Vector embeddings for fast similarity search (Upstash Vector)
- AI agent refinement for accurate matching with confidence scores
- Three-tier system: auto-add (≥0.9), approval (0.8-0.9), or create new (<0.8)
Multiple specialized agents handle different tasks:
- Semantic Search Agent - Matches feedback to feature requests
- Request Creator Agent - Generates titles, descriptions, and assigns product areas
- Thread Summarization Agent - Extracts pain points from Slack conversations
- Area Insights Agent - Analyzes product areas and generates structured reports
Generated feature request proposals and medium-confidence matches are sent to Slack with approve/reject buttons, ensuring human oversight before creating new requests or matching feedback.
Uses OpenAI embeddings stored in Upstash Vector for fast semantic search across thousands of feature requests, enabling accurate matching even with varied wording.
- Add new AI agents by creating new
ToolLoopAgentinstances inpackages/ai/src/agents/ - Adjust prompts and agent instructions in agent definitions
- Add new tools for agents in
packages/ai/src/tools/ - Create new workflows in
apps/www/src/workflows/ - Customize Slack message formatting in
apps/slack-app/server/lib/slack/
gtm-feedback/
├── apps/
│ ├── www/ # Next.js web application
│ │ ├── src/
│ │ │ ├── app/ # Next.js app router pages
│ │ │ ├── components/ # React components
│ │ │ ├── workflows/ # Workflow DevKit workflows
│ │ │ └── lib/ # Shared utilities, queries, actions
│ │ └── scripts/ # Seed scripts
│ └── slack-app/ # Slack Bolt application
│ └── server/
│ ├── api/ # API routes
│ ├── listeners/ # Slack event/action listeners
│ └── lib/ # Slack utilities, AI integration
├── packages/
│ ├── ai/ # Shared AI package
│ │ └── src/
│ │ ├── agents/ # AI SDK agents
│ │ ├── tools/ # Agent tools
│ │ └── embeddings/ # Vector embedding utilities
│ ├── database/ # Drizzle ORM schema
│ └── redis/ # Redis/Upstash helpers
└── README.md
See CONTRIBUTING.md for contribution guidelines and local development workflow.