An AI-powered customer feedback intelligence tool that turns raw user feedback into structured product insight.
Sentiment Analyzer helps product managers, founders, and support teams move faster from "we have a pile of comments" to "we know what users feel, what hurts, and what to protect." The app uses Google Gemini to classify sentiment, summarize the strongest pain point, and extract the most useful positive quote from customer feedback.
- Product Snapshot
- Why This Exists
- Core Features
- Demo Flow
- Tech Stack
- Project Layout
- Auth and Login Flow
- Roles and RBAC
- Application State - AppContext
- Pages
- Components
- Canvas System
- NLP and AI Routing
- Hooks and Utilities
- Known Limitations
- Getting Started
- Roadmap
- Collaboration
- Author
| Area | Details |
|---|---|
| Product type | AI customer feedback analyzer |
| Primary user | Product managers, founders, CX teams, research teams |
| Core job | Convert unstructured feedback into actionable product signals |
| Input | Free-form customer feedback text |
| Output | Sentiment, key pain point, top positive quote |
| AI model | Gemini 2.5 Flash through @google/genai |
| Frontend | React, TypeScript, Vite, Tailwind CSS CDN |
Product teams often collect feedback faster than they can synthesize it. Reviews, support notes, call transcripts, user interviews, and survey responses can become a backlog of unstructured opinions.
This project compresses the first pass of qualitative analysis into a simple workflow:
- Paste feedback.
- Analyze the text with Gemini.
- Review a structured summary.
- Use the output to inform product decisions, roadmap conversations, or stakeholder updates.
For product manager and builder interviews, this project demonstrates the ability to identify a real workflow bottleneck, design a narrow AI-assisted solution, ship a working interface, and communicate product value clearly.
- Classifies sentiment as Positive, Neutral, or Negative so teams can quickly understand emotional tone.
- Extracts the key pain point in one concise sentence to surface friction without reading every line manually.
- Identifies a positive quote that can inform positioning, feature confidence, or customer proof points.
- Returns structured JSON from Gemini using a response schema, reducing parsing ambiguity.
- Handles loading, empty input, errors, and reset states so the prototype behaves like a usable product surface.
- Presents report-ready output through a clean result card that can be used in research notes or product reviews.
- A user pastes customer feedback into the text area.
- The app validates that the input is not empty.
analyzeFeedback()sends the text to Gemini 2.5 Flash.- Gemini returns a structured object with
sentiment,painPoint, andpositiveQuote. - The UI renders the result in a visual card with sentiment-specific styling.
| Layer | Technology | Purpose |
|---|---|---|
| UI | React 19 | Builds the single-page product interface |
| Language | TypeScript | Adds type safety for app state and AI response shape |
| Build tool | Vite 6 | Runs the local dev server and production build |
| Styling | Tailwind CSS CDN | Provides fast utility-first styling |
| AI SDK | @google/genai |
Calls Gemini from the frontend service layer |
| Model | Gemini 2.5 Flash | Performs sentiment and insight extraction |
Sentiment-Analyzer/
|-- App.tsx # Main app shell, input workflow, loading/error/result state
|-- components/
| `-- ResultCard.tsx # Result presentation component
|-- services/
| `-- geminiService.ts # Gemini request, response schema, JSON parsing
|-- types.ts # Shared TypeScript enums and interfaces
|-- index.tsx # React app entry point
|-- index.html # HTML shell and Tailwind CDN setup
|-- vite.config.ts # Vite config and Gemini env variable mapping
|-- package.json # Scripts and dependencies
|-- metadata.json # App metadata
`-- README.md # Product and technical documentation
Authentication is not currently implemented.
The current product is designed as a lightweight single-user analysis tool. A future production version could add:
- Google or email login for saved analysis history.
- Workspace-based access for product, support, and leadership teams.
- Secure server-side API routing so Gemini keys are never exposed to the browser.
Role-based access control is not currently implemented.
Potential future roles:
| Role | Possible permissions |
|---|---|
| Admin | Manage workspace, billing, API settings, and team members |
| Product Manager | Run analyses, save insights, tag themes, export reports |
| Viewer | Read shared reports and summaries |
AppContext is not currently used.
State is intentionally local and simple inside App.tsx:
inputTextstores the feedback entered by the user.resultstores the structured Gemini analysis.isLoadingcontrols the analyze button and loading UI.errorstores validation or API errors.
This is appropriate for the current single-page scope. If the app expands into saved projects, team workspaces, history, or multi-page flows, an AppContext or state library would become useful.
The application currently has one page:
- Main Analyzer Page: Provides the full workflow for entering feedback, triggering analysis, clearing input, handling errors, and viewing results.
The app can grow into additional pages such as:
- Analysis history
- Saved customer themes
- Workspace settings
- Exportable insight reports
- Batch upload review dashboard
| Component | Responsibility |
|---|---|
App.tsx |
Owns the product workflow, input state, API call, loading state, error state, and page layout |
ResultCard.tsx |
Displays sentiment, key pain point, and top positive quote with visual styling |
A canvas system is not currently implemented.
This project does not include drawing, diagramming, whiteboarding, or visual canvas interactions. If the product evolves toward research synthesis, a future canvas could map feedback into themes, opportunity areas, user segments, or roadmap bets.
The AI flow is centralized in services/geminiService.ts.
Current behavior:
- Uses
GoogleGenAIfrom@google/genai. - Reads the Gemini API key from
GEMINI_API_KEYthrough Vite's env mapping. - Sends the user feedback to
gemini-2.5-flash. - Requests a JSON response with a strict schema:
sentimentpainPointpositiveQuote
- Parses the model response into the shared
AnalysisResulttype.
This route is simple and effective for a prototype. For production, the AI call should move behind a backend API to protect secrets, enforce rate limits, log failures, and support model fallback.
No custom hooks are currently implemented.
Current utility-style logic lives in:
handleAnalyze()inApp.tsxfor validation, async execution, result updates, and error handling.handleClear()inApp.tsxfor resetting input and output state.getSentimentColor()inResultCard.tsxfor sentiment-specific styling.getSentimentIcon()inResultCard.tsxfor sentiment-specific visual cues.
- Frontend API key exposure: The Gemini key is mapped into the client bundle. A production version should route model calls through a backend.
- Single feedback input: The UI currently analyzes one pasted text block rather than a CSV or multi-review batch.
- No persistence: Results are not saved after refresh.
- No confidence score: The current schema does not request or display confidence.
- No theme clustering yet: The README roadmap includes this as a natural next step, but the current implementation focuses on sentiment, pain point, and positive quote extraction.
- No auth or RBAC: The app is currently a single-user prototype.
- Limited evaluation harness: There are no automated tests or benchmark datasets for validating model output quality.
git clone https://github.com/yatinbhalla/Sentiment-Analyzer.git
cd Sentiment-Analyzer
npm installCreate a .env.local file:
GEMINI_API_KEY=your_gemini_api_key_hereRun the app:
npm run devBuild for production:
npm run build- Add batch upload for CSV review analysis.
- Add confidence scores and model reasoning summaries.
- Add theme clustering across multiple feedback entries.
- Add export to Markdown, CSV, or stakeholder-ready PDF.
- Add saved projects and analysis history.
- Add backend API routing for safer model calls.
- Add evaluation examples to compare output quality across prompt iterations.
This project is intentionally small, focused, and easy to extend. I welcome collaboration from builders, product thinkers, designers, and AI engineers who want to improve how teams convert customer language into product decisions.
Useful contribution areas:
- Improve prompt quality and evaluation examples.
- Add batch analysis and export workflows.
- Design a stronger insight dashboard.
- Add auth, history, and team workspaces.
- Harden the app for production deployment.
Open an issue, suggest a product direction, or fork the repo and build on it. Good product tools get better when the people using them help shape them.
Yatin Bhalla · Product Manager & AI Builder