Skip to content

xtea/app-feedback-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

35 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AppReview.ai - AI-Powered App Store Review Analysis

🌐 Website: AppReview.ai

A comprehensive web-based platform to collect and analyze app store feedback from Apple App Store and Google Play Store using advanced AI/LLM technology for sentiment analysis and feature extraction. Transform app store reviews into actionable insights to improve your app's success.

πŸš€ Features

Core Analysis

  • πŸ“± Multi-Platform Support: Fetch reviews from both Apple App Store and Google Play Store
  • πŸ€– AI-Powered Analysis: Advanced OpenAI GPT models for sentiment analysis and insight extraction
  • πŸ“Š Smart Categorization: Automatically categorize reviews into positive, negative, and neutral
  • πŸ” Feature Extraction: Extract key features, user experiences, and improvement areas
  • πŸ“ˆ Visual Analytics: Interactive charts and visualizations for comprehensive insights

User Experience

  • πŸ‘€ User Authentication: Secure Supabase-powered authentication system
  • πŸͺ™ Credit System: Pay-per-analysis credit system for authenticated users
  • ⚑ Real-time Updates: Live credit balance display in header
  • πŸ’Ύ Smart Caching: 24-hour analysis caching to prevent duplicate charges
  • 🎨 Modern UI: Beautiful, responsive React-based interface

Technical Excellence

  • πŸ”„ Async Processing: Non-blocking job queue for large-scale analysis
  • πŸ“± Mobile Responsive: Optimized for desktop, tablet, and mobile devices
  • πŸš€ High Performance: Efficient data processing and API optimization
  • πŸ”’ Secure: JWT-based authentication and secure data handling

πŸ“‹ Prerequisites

  • Node.js (v18 or higher recommended)
  • npm or yarn
  • OpenAI API key (for AI analysis)
  • Supabase account (for authentication and credit management)
    • Supabase project URL
    • Supabase anon/public key
    • Supabase service role key (for backend)
    • Supabase JWT secret

Installation

  1. Clone the repository

    git clone <repository-url>
    cd app-feedback-analysis
  2. Install backend dependencies

    npm install
  3. Install frontend dependencies

    cd client
    npm install
    cd ..
  4. Set up environment variables

    cp env.example .env

    Edit .env and configure the required services:

    # OpenAI Configuration (Required)
    OPENAI_API_KEY=your_openai_api_key_here
    OPENAI_MODEL=gpt-4o  # Optional: gpt-4o, gpt-4-turbo, gpt-4
    
    # Supabase Configuration (Required for auth & credits)
    SUPABASE_URL=https://your-project.supabase.co
    SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
    SUPABASE_JWT_SECRET=your_supabase_jwt_secret
    
    # Server Configuration
    PORT=8888  # Optional: default 8888
  5. Set up Supabase database

    Create the user_credit table in your Supabase database:

    CREATE TABLE user_credit (
      user_id VARCHAR PRIMARY KEY,
      credit BIGINT DEFAULT 0,
      created_at TIMESTAMPTZ DEFAULT NOW()
    );
  6. Set up frontend environment

    cd client
    cp .env.example .env

    Edit client/.env for React app:

    REACT_APP_SUPABASE_URL=https://your-project.supabase.co
    REACT_APP_SUPABASE_ANON_KEY=your_supabase_anon_key

Usage

Development Mode

Option A: Use the development script (Recommended)

chmod +x dev-start.sh
./dev-start.sh

Option B: Start manually

  1. Start the backend server

    node server.js
  2. Start the frontend (in a new terminal)

    cd client
    npm start
  3. Access the application

πŸ”§ Development Configuration

  • CORS: Configured to allow React dev server connections
  • Proxy: Frontend uses relative URLs that are proxied to backend
  • Hot Reload: Both frontend and backend support hot reloading

Production Mode

  1. Build the frontend

    npm run build
  2. Start the production server

    npm start

How to Use

  1. Enter App ID or URL:

    • Apple: numeric ID (e.g., 284882215) or App Store URL (e.g., https://apps.apple.com/.../id284882215)
    • Google: Android package (e.g., com.facebook.katana) or Play Store URL (e.g., https://play.google.com/store/apps/details?id=com.facebook.katana)
    • The UI auto-detects the store and normalizes the ID.
  2. (Optional) Store Type: The UI switches automatically based on input; you can still choose manually.

  3. Start Analysis: Click "Start Analysis". The backend triggers an async job to fetch reviews (paginated) and run AI analysis.

  4. View Results: The analysis will show:

    • Summary statistics (total reviews, average rating, sentiment distribution)
    • Charts and visualizations
    • Positive insights (features, user experiences)
    • Improvement areas (issues, suggested fixes)

πŸ”Œ API Endpoints

Job Management (Async Analysis)

  • POST /api/jobs/analyze - Submit analysis job (supports both authenticated & anonymous users)
    • Authentication: Optional (JWT Bearer token in Authorization header)
    • Credit Cost: 1 credit for authenticated users, free for anonymous
    • Caching: 24-hour cache prevents duplicate charges
    • Request body fields:
      • appId (string): Apple ID, Android package, or official store URL
      • storeType (string, optional): apple | google | auto (default: auto)
      • usePagination (boolean, optional): default true
      • pageSize (number, optional): Google per-page size (default 100)
      • country (string, optional): default us
      • Note: Apple pagination is inherently capped by the source to 10 pages max.
  • GET /api/jobs/status/:jobId - Check job status and progress
  • GET /api/jobs/result/:jobId - Get completed analysis results
  • GET /api/jobs/app/:appId - Get all jobs for an app

Credit Management (Authenticated Users)

  • GET /api/credit/balance - Get current user's credit balance
  • POST /api/credit/add - Add credits to user account
    • Body: { "amount": number }
  • POST /api/credit/subtract - Subtract credits from user account
    • Body: { "amount": number }
  • POST /api/credit/set - Set user's credit to specific amount
    • Body: { "amount": number, "userId": "optional" }
  • POST /api/credit/check - Check if user has sufficient credits
    • Body: { "requiredAmount": number }
  • GET /api/credit/all - Get all users' credit balances (admin)
    • Query params: ?limit=50&offset=0

App Store Routes (Direct)

  • POST /api/appstore/fetch-apple - Fetch Apple App Store reviews
  • POST /api/appstore/fetch-google - Fetch Google Play Store reviews

Analysis Routes (Legacy)

  • POST /api/analysis/analyze - Analyze reviews using LLM (synchronous)
  • GET /api/analysis/summary/:appId - Get analysis summary

πŸ“ Project Structure

app-feedback-analysis/
β”œβ”€β”€ server.js                      # Main Express server
β”œβ”€β”€ routes/                        # API route handlers
β”‚   β”œβ”€β”€ appStore.js               # App store data (direct)
β”‚   β”œβ”€β”€ analysis.js               # Legacy LLM analysis endpoints
β”‚   β”œβ”€β”€ jobs.js                   # Async job submission & status APIs
β”‚   └── credit.js                 # Credit management APIs
β”œβ”€β”€ services/                      # Business logic
β”‚   β”œβ”€β”€ appStoreService.js        # Apple & Google review fetchers
β”‚   β”œβ”€β”€ jobService.js             # In-memory job queue & processing
β”‚   β”œβ”€β”€ analysisService.js        # OpenAI integration (GPT-4 configurable)
β”‚   β”œβ”€β”€ creditService.js          # Credit management & Supabase integration
β”‚   β”œβ”€β”€ supabase.js               # Supabase backend client
β”‚   β”œβ”€β”€ storeDetector.js          # Auto-detect store from raw input/URL
β”‚   └── db.js                     # SQLite database (local storage)
β”œβ”€β”€ middleware/                    # Express middleware
β”‚   └── auth.js                   # JWT authentication middleware
β”œβ”€β”€ data/                          # Local data storage
β”œβ”€β”€ client/                        # React frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/           # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ Header.js         # Navigation with credit balance
β”‚   β”‚   β”‚   β”œβ”€β”€ Home.js           # Analysis submission form
β”‚   β”‚   β”‚   β”œβ”€β”€ Analysis.js       # Results visualization
β”‚   β”‚   β”‚   β”œβ”€β”€ Auth.js           # Login/signup forms
β”‚   β”‚   β”‚   β”œβ”€β”€ Footer.js         # Site footer
β”‚   β”‚   β”‚   β”œβ”€β”€ Privacy.js        # Privacy policy
β”‚   β”‚   β”‚   └── Terms.js          # Terms of service
β”‚   β”‚   β”œβ”€β”€ lib/                  # Frontend utilities
β”‚   β”‚   β”‚   β”œβ”€β”€ supabase.js       # Supabase frontend client
β”‚   β”‚   β”‚   β”œβ”€β”€ creditService.js  # Frontend credit API calls
β”‚   β”‚   β”‚   β”œβ”€β”€ analytics.js      # Google Analytics integration
β”‚   β”‚   β”‚   └── logger.js         # Frontend logging utilities
β”‚   β”‚   β”œβ”€β”€ App.js                # Main React app component
β”‚   β”‚   └── index.js              # React app entry point
β”‚   └── public/                   # Static assets
β”œβ”€β”€ env.example                   # Environment variables template
β”œβ”€β”€ dev-start.sh                  # Development startup script
β”œβ”€β”€ restart-dev.sh                # Development restart script
└── package.json                  # Dependencies and scripts

Analysis Features

Positive Analysis

  • Top Features: Most mentioned features users love
  • User Experiences: Positive user experiences and satisfaction points
  • Strength Highlights: What makes the app stand out

Negative Analysis

  • Top Issues: Most common problems users face
  • Critical Problems: Issues that need immediate attention
  • Suggested Improvements: Actionable solutions with priority levels

Technical Details

Data Fetching

  • Apple reviews via app-store-scraper (paginated, up to 10 pages; ~50 reviews per page)
  • Google reviews via google-play-scraper with nextPaginationToken
  • Saves each page to /data/{appId}_{store}_reviews_page_{n}.json and an aggregated /data/{appId}_{store}_reviews_all.json

AI Analysis

  • Uses OpenAI GPT models (default: GPT‑4o)
  • Configure via OPENAI_MODEL env var (e.g., gpt-4o, gpt-4-turbo, gpt-4)
  • Structured prompts return strict JSON for easy parsing

Data Storage

  • Saves reviews and analysis results locally in JSON format
  • Organized by app ID and store type
  • Persistent storage for historical analysis

Troubleshooting

Common Issues

  1. Puppeteer Installation

    # If you encounter Puppeteer issues on macOS
    npm install puppeteer --unsafe-perm=true
  2. OpenAI API Errors

    • Ensure your API key is valid and has sufficient credits
    • Check the API rate limits
  3. App Store Access Issues

    • Some apps may have limited review access
    • Try different app IDs for testing

Performance Tips

  • Apple caps pages to 10; plan accordingly (β‰ˆ up to ~500 recent reviews)
  • Google supports deeper pagination via tokens; adjust pageSize as needed
  • Keep OPENAI_MODEL choice in mind for cost/latency tradeoffs

πŸͺ™ Credit System & Authentication

How Credits Work

  • Free Tier: Anonymous users can perform free analysis with basic features
  • Authenticated Users: Pay-per-analysis credit system (1 credit = 1 analysis)
  • Smart Caching: Analyses are cached for 24 hours to prevent duplicate charges
  • Credit Management: Full API for adding, subtracting, and managing credits

Authentication Features

  • Supabase Integration: Secure, scalable authentication system
  • JWT Tokens: Industry-standard authentication tokens
  • User Profiles: Email-based user accounts with secure password handling
  • Session Management: Persistent sessions with automatic token refresh

Pricing Model

  • Transparent: 1 credit per analysis for authenticated users
  • Fair Usage: Anonymous users can test the platform for free
  • No Hidden Costs: Clear credit deduction before analysis starts
  • Cache Optimization: Repeated analysis within 24 hours uses cache (no charge)

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests if applicable
  5. Commit your changes (git commit -m 'Add some amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Submit a pull request

πŸ“„ License

MIT License - see LICENSE file for details

πŸ†˜ Support & Contact

  • 🌐 Website: AppReview.ai
  • πŸ“§ Issues: For technical issues, please open an issue on the GitHub repository
  • πŸ“– Documentation: This README contains comprehensive setup and usage instructions
  • πŸš€ Feature Requests: Submit feature requests through GitHub issues

Built with ❀️ by the AppReview.ai Team

Transform your app store reviews into actionable insights with the power of AI.

About

AI-powered app store review analysis tool with professional React UI and async processing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published