AI-Powered Persona-Based Product Feedback Platform
Transform your product ideas into actionable insights through intelligent AI personas
- Overview
- Features
- Architecture
- Technology Stack
- Installation
- Configuration
- Usage
- API Endpoints
- Project Structure
- Contributing
NeuralFeedback is an intelligent web application that generates diverse, persona-based feedback for product ideas and concepts. By leveraging advanced AI models (Google Gemini, OpenAI) and text-to-speech technology (ElevenLabs), it creates realistic reviewer personas with unique characteristics, demographics, and perspectives to provide comprehensive product evaluation.
- Multi-Persona Generation: Create 1-20 unique AI personas with customizable traits
- Intelligent Feedback: Generate contextual reviews based on product descriptions
- Interactive Chat: Engage in real-time conversations with each persona
- Voice Calls: Experience natural voice interactions with AI personas
- Document Analysis: Upload PDF, DOC, or DOCX files for enhanced context
- Feedback Summarization: Automatic "Glows & Grows" analysis of all feedback
- 10 Personality Traits: Analytical, Creative, Practical, Emotional, Skeptical, Optimistic, Detail-oriented, Impulsive, Cautious, Adventurous
- Demographic Filters: Age range, gender, location selection
- Intensity Levels: Fine-tune trait intensity (somewhat, moderately, very)
- Dynamic Persona Generation: Each persona gets unique name, profession, tone, and characteristics
- Text Chat: Real-time conversational interface with each persona
- Voice Calls: Natural speech-to-speech interactions using ElevenLabs
- Context Preservation: Personas maintain consistency across conversations
- Session Management: Persistent persona data throughout user session
- Rating System: 1-10 sentiment ratings per persona
- Glows & Grows: Automated summary of strengths and improvement areas
- Concurrent Processing: Parallel generation of multiple reviews using ThreadPoolExecutor
- Fallback System: Graceful degradation when APIs are unavailable
- File Upload: PDF, DOC, DOCX document parsing
- Context Integration: Extracted text enhances persona understanding
- Secure Processing: File validation and safe handling
graph TB
subgraph "Client Layer"
A[Web Browser] --> B[HTML/CSS/JS]
B --> C[Flask Templates]
end
subgraph "Application Layer"
C --> D[Flask App]
D --> E[Route Handlers]
E --> F[Business Logic]
end
subgraph "AI Services"
F --> G[Google Gemini API]
F --> H[OpenAI API]
F --> I[ElevenLabs TTS]
end
subgraph "Processing"
F --> J[ThreadPoolExecutor]
J --> K[Concurrent Review Generation]
F --> L[Document Parser]
L --> M[PDF/DOCX Extractor]
end
subgraph "Session Management"
D --> N[Flask Sessions]
N --> O[Persona Storage]
N --> P[Chat History]
end
style A fill:#4a90e2
style D fill:#50c878
style G fill:#ff6b6b
style H fill:#4ecdc4
style I fill:#95e1d3
sequenceDiagram
participant U as User
participant F as Frontend
participant A as Flask App
participant G as Gemini API
participant E as ElevenLabs
participant S as Session Store
U->>F: Submit Product Idea + Persona Config
F->>A: POST /generate
A->>A: Parse Input & Validate
A->>A: Create Review Tasks (Parallel)
par Concurrent Generation
A->>G: Generate Persona 1 Review
G-->>A: Review + Metadata
and
A->>G: Generate Persona 2 Review
G-->>A: Review + Metadata
and
A->>G: Generate Persona N Review
G-->>A: Review + Metadata
end
A->>G: Generate Glows & Grows Summary
G-->>A: Summary Data
A->>S: Store Personas in Session
A-->>F: Return Reviews + Summary
F-->>U: Display Feedback Cards
U->>F: Click Persona Card
F->>A: GET /chat/<persona_id>
A->>S: Retrieve Persona Data
A-->>F: Render Chat Interface
U->>F: Send Chat Message
F->>A: POST /api/chat/<persona_id>
A->>G: Generate Persona Response
G-->>A: Reply Text
A-->>F: Return Reply
F-->>U: Display Message
U->>F: Start Voice Call
F->>A: POST /api/call/<persona_id>
A->>G: Generate Response
G-->>A: Reply Text
A->>E: Convert to Speech
E-->>A: Audio (base64)
A-->>F: Return Text + Audio
F-->>U: Play Audio Response
graph LR
subgraph "Core Components"
A[app.py<br/>Main Application]
B[neuralseek_client.py<br/>API Client]
end
subgraph "Templates"
C[index.html<br/>Main Interface]
D[chat.html<br/>Chat UI]
E[feedback.html<br/>Review Display]
end
subgraph "Static Assets"
F[scripts.js<br/>Frontend Logic]
G[style.css<br/>Styling]
H[callPopup.js<br/>Voice Call Handler]
end
A --> C
A --> D
A --> E
C --> F
C --> G
D --> F
D --> H
A --> B
style A fill:#50c878
style B fill:#4ecdc4
style C fill:#ffd93d
style D fill:#ffd93d
style E fill:#ffd93d
- Flask 3.0.0: Web framework and routing
- Python 3.8+: Core language
- python-dotenv: Environment variable management
- ThreadPoolExecutor: Concurrent review generation
- Google Gemini 2.0 Flash Lite: Primary LLM for persona generation and chat
- OpenAI GPT-4o-mini: Fallback LLM for chat responses
- ElevenLabs: Text-to-speech for voice calls
- pdfplumber: PDF text extraction
- python-docx: DOCX file parsing
- HTML5/CSS3: Modern responsive UI
- Vanilla JavaScript: Client-side interactivity
- Web Speech API: Browser-based speech recognition
- Glassmorphism Design: Modern UI aesthetic
- Flask Sessions: Server-side session management
- JSON: Data serialization
- Python 3.8 or higher
- pip (Python package manager)
- Git (for cloning the repository)
-
Clone the repository
git clone <repository-url> cd NeuralFeedback
-
Create a virtual environment (recommended)
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
Create a
.envfile in the project root:# Required FLASK_SECRET_KEY=your-secret-key-here GEMINI_API_KEY=your-gemini-api-key # Optional but recommended ELEVENLABS_API_KEY=your-elevenlabs-api-key ELEVENLABS_VOICE_ID_DEFAULT=your-voice-id ELEVENLABS_VOICE_ID_MALE=your-male-voice-id ELEVENLABS_VOICE_ID_FEMALE=your-female-voice-id ELEVENLABS_VOICE_ID_NONBINARY=your-nonbinary-voice-id # Optional fallback OPENAI_API_KEY=your-openai-api-key # Optional: NeuralSeek integration NEURALSEEK_API_KEY=your-neuralseek-api-key NEURALSEEK_API_URL=https://api.neuralseek.com/v1/seek NEURALSEEK_CHAT_URL=https://api.neuralseek.com/v1/chat
-
Run the application
python app.py
-
Access the application
Open your browser and navigate to:
http://localhost:5000
| Variable | Required | Description |
|---|---|---|
FLASK_SECRET_KEY |
β Yes | Secret key for Flask session encryption |
GEMINI_API_KEY |
β Yes | Google Gemini API key for persona generation |
ELEVENLABS_API_KEY |
ElevenLabs API key for voice calls | |
ELEVENLABS_VOICE_ID_* |
Voice IDs for different genders | |
OPENAI_API_KEY |
OpenAI API key as fallback for chat | |
NEURALSEEK_API_KEY |
NeuralSeek API key (legacy support) |
- Visit Google AI Studio
- Create a new API key
- Copy the key to
GEMINI_API_KEYin your.envfile
- Sign up at ElevenLabs
- Navigate to your profile β API Keys
- Create a new API key
- Copy the key to
ELEVENLABS_API_KEYin your.envfile - Optionally configure voice IDs for different personas
- Visit OpenAI Platform
- Create an API key
- Copy the key to
OPENAI_API_KEYin your.envfile
-
Describe Your Product
- Enter your product idea in the text area
- Optionally upload a PDF, DOC, or DOCX document for additional context
-
Configure Personas
- Select personality traits (e.g., Analytical, Creative, Skeptical)
- Choose number of reviewers (1-20)
- Set age range, gender, and location filters
-
Generate Feedback
- Click "Generate AI Client Responses"
- Wait for concurrent generation to complete
- Review the generated persona feedback cards
-
Interact with Personas
- Click on any persona card to open a chat interface
- Ask follow-up questions about their feedback
- Use voice call feature for natural conversations
-
Review Summary
- Check the "Glows & Grows" section for automated insights
- Identify common themes across all feedback
- Click the phone icon on a persona card
- Grant microphone permissions
- Speak naturally - the persona will respond with voice
- Conversation history is maintained throughout the call
- Supported formats: PDF, DOC, DOCX
- Maximum recommended size: 5MB
- Extracted text is used to enhance persona understanding
- First 3000 characters are included in the generation prompt
The application supports 10 predefined traits with three intensity levels:
- Somewhat (0.9x intensity)
- Moderately (1.0x intensity)
- Very (1.1x intensity)
Renders the main application interface.
Response: HTML page with product input form
Generates multiple persona-based reviews.
Request Body (multipart/form-data or JSON):
{
"text": "Product idea description",
"numReviews": 5,
"characteristics": ["analytical", "creative"],
"ageMin": 25,
"ageMax": 45,
"gender": "Female",
"location": "North America",
"ideaFile": "<file>"
}Response:
{
"inputText": "Product idea...",
"numReviews": 5,
"reviews": [
{
"id": 1,
"review": "Feedback text...",
"metadata": {
"persona_name": "Alex Johnson, 32",
"persona_descriptor": "Analytical product designer",
"sentiment_rating": 7,
"characteristics": ["analytical", "detail-oriented"],
"age": 32,
"gender": "Female",
"location": "North America",
"profession": "Product Designer",
"tone": "supportive"
}
}
],
"successCount": 5,
"errorCount": 0,
"glows": ["Positive aspect 1", "Positive aspect 2"],
"grows": ["Improvement area 1", "Improvement area 2"]
}Renders the chat interface for a specific persona.
Parameters:
persona_id(int): ID of the persona to chat with
Response: HTML page with chat interface
Sends a chat message to a persona and receives a response.
Request Body:
{
"message": "What do you think about the pricing strategy?"
}Response:
{
"reply": "Based on my analytical perspective, the pricing needs..."
}Initiates a voice call with a persona.
Request Body:
{
"message": "Hello, can you tell me more?",
"persona_name": "Alex Johnson",
"tone": "supportive",
"gender": "Female",
"initial": false,
"history": [
{"role": "user", "content": "Previous message"},
{"role": "assistant", "content": "Previous response"}
]
}Response:
{
"reply": "Text response from persona",
"audio": "base64-encoded-audio-data"
}NeuralFeedback/
β
βββ app.py # Main Flask application
βββ neuralseek_client.py # NeuralSeek API client (legacy)
βββ requirements.txt # Python dependencies
βββ .env # Environment variables (not in git)
βββ .gitignore # Git ignore rules
βββ env.example # Example environment file
β
βββ templates/ # Jinja2 HTML templates
β βββ index.html # Main landing page
β βββ chat.html # Chat interface
β βββ reviews.html # Review display page
β βββ feedback.html # Feedback card component
β
βββ static/ # Static assets
β βββ css/
β β βββ callPopup.css # Voice call popup styles
β βββ audio/
β β βββ ring.mp3 # Call ringtone
β βββ scripts.js # Main frontend JavaScript
β βββ callPopup.js # Voice call functionality
β βββ style.css # Main stylesheet
β
βββ README.md # This file
app.py: Core application logic, route handlers, AI integration, and session managementneuralseek_client.py: Legacy NeuralSeek API integration (optional)templates/index.html: Main user interface with product input and persona configurationtemplates/chat.html: Real-time chat interface for persona interactionsstatic/scripts.js: Frontend logic for form handling, API calls, and UI updatesstatic/callPopup.js: Voice call implementation with Web Speech API
flowchart TD
A[User Submits Form] --> B[Parse Input & Validate]
B --> C{File Upload?}
C -->|Yes| D[Extract Document Text]
C -->|No| E[Use Text Input Only]
D --> F[Create Review Tasks]
E --> F
F --> G[ThreadPoolExecutor: Parallel Generation]
G --> H[Generate Persona 1]
G --> I[Generate Persona 2]
G --> J[Generate Persona N]
H --> K[Gemini API Call]
I --> K
J --> K
K --> L[Parse JSON Response]
L --> M[Extract Review + Metadata]
M --> N[Store in Session]
N --> O[Generate Summary]
O --> P[Return to Frontend]
style A fill:#4a90e2
style K fill:#ff6b6b
style N fill:#50c878
style P fill:#ffd93d
flowchart LR
A[User Message] --> B[Retrieve Persona from Session]
B --> C[Build Context Prompt]
C --> D[Gemini API Call]
D --> E{Success?}
E -->|Yes| F[Return Response]
E -->|No| G[Try OpenAI Fallback]
G --> H{Success?}
H -->|Yes| F
H -->|No| I[Return Offline Message]
F --> J[Update Chat History]
I --> J
style A fill:#4a90e2
style D fill:#ff6b6b
style G fill:#4ecdc4
style F fill:#50c878
- Glassmorphism: Modern frosted glass aesthetic with transparency and blur effects
- Dark Theme: Eye-friendly dark background with neon accent colors
- Responsive Design: Mobile-first approach with adaptive layouts
- Real-time Feedback: Immediate visual updates during processing
- Accessibility: Keyboard navigation and screen reader support
- Primary: Cyan (#00ffff) - Main actions and highlights
- Secondary: Violet (#8b5cf6) - Secondary actions
- Background: Dark (#0a0e27) - Base background
- Cards: Semi-transparent with blur effects
- Text: Light gray/white for readability
Problem: "Gemini API key not configured"
Solution:
- Verify
.envfile exists in project root - Check
GEMINI_API_KEYis set correctly - Restart the Flask server after updating
.env
Problem: No audio playback or microphone access
Solution:
- Grant browser microphone permissions
- Verify
ELEVENLABS_API_KEYis configured - Check browser console for errors
- Ensure HTTPS in production (required for microphone)
Problem: File not processing
Solution:
- Verify file format (PDF, DOC, DOCX only)
- Check file size (recommended < 5MB)
- Ensure
pdfplumberandpython-docxare installed - Check server logs for parsing errors
Problem: Personas disappear on refresh
Solution:
- Verify
FLASK_SECRET_KEYis set - Check browser allows cookies
- Ensure session storage is enabled
- API Keys: Never commit
.envfile to version control - File Uploads: Files are validated and processed securely
- Session Management: Flask sessions use secure cookies
- Input Validation: All user inputs are sanitized
- Error Handling: Graceful fallbacks prevent information leakage
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
For issues, questions, or contributions, please open an issue on the repository.
Built with β€οΈ using Flask, Gemini AI, and modern web technologies
Transform ideas into insights, one persona at a time