HUB
Sign inSign up

subhasishsaha/playstore-review-analyzer

By subhasishsaha

•Updated 6 days ago

Play Store review analytics with RoBERTa INT8, aspect tagging & local Ollama LLMs.

Image
Machine learning & AI
Developer tools
Data science
1

1.1K

subhasishsaha/playstore-review-analyzer repository overview

⁠Play Store Review Analyzer

Play Store Review Analyzer is an enterprise-grade NLP and LLM analytics platform packaged as a lightweight, production-ready container image. It ingests live user feedback from the Google Play Store, classifies sentiment via an INT8-quantized RoBERTa model, categorizes engineering concerns using an ensemble aspect classifier (Random Forest + XGBoost), and synthesizes prioritized developer remediation plans via local Ollama LLMs.


⁠1. Key Capabilities

  • Lightweight Image Footprint: Bypasses 5+ GB of duplicated container and model bloat by bridging to your host Ollama engine.
  • Low-Latency CPU Inference: Features dynamic INT8 PyTorch quantization for RoBERTa, delivering sub-second sentiment scoring on standard multi-core CPUs without requiring host GPU pass-through.
  • Multi-Label Aspect Tagging: Categorizes user friction into five distinct operational domains: Bugs, UI/UX, Performance, Login Problems, and Features.
  • Hermetic JSON Persistence: Persists all raw review metadata, inference classifications, aspect tags, and synthesized AI action plans into atomic, structured JSON files.
  • Hardened Security Posture: Runs strictly as an unprivileged user (appuser, UID 1000), features pre-configured container health probes, and implements POSIX realpath boundary enforcement against path traversal vulnerabilities.
  • Integrated High-Performance Web UI: Built-in glassmorphic single-page application (SPA) with Chart.js analytics and zero node_modules runtime dependencies.

⁠2. Deployment Guide

⁠Prerequisites

Ensure Ollama is running on your host machine with an active model:

# Verify host Ollama service
curl -s http://localhost:11434/api/tags

# Pull the default lightweight model
ollama run qwen3.5:0.8b
⁠Production Run (docker run)

Deploy the container with automatic host-gateway bridging and persistent volume mounting:

docker run -d \
  --name playstore-analyzer \
  --restart unless-stopped \
  -p 8000:8000 \
  --add-host=host.docker.internal:host-gateway \
  -v playstore_reviews_data:/app/data \
  subhasishsaha/playstore-review-analyzer:latest

Cross-Platform Compatibility Note:
The --add-host=host.docker.internal:host-gateway flag injects a DNS entry that maps host.docker.internal to the host bridge IP across Linux, Docker Desktop for Windows, and macOS.


⁠3. Production Docker Compose

For orchestrator and server deployments, save the following as docker-compose.yml:

version: "3.8"

services:
  playstore-analyzer:
    image: subhasishsaha/playstore-review-analyzer:latest
    container_name: playstore-analyzer
    restart: unless-stopped
    ports:
      - "8000:8000"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    environment:
      - PORT=8000
      - OLLAMA_BASE_URL=http://host.docker.internal:11434
      - OLLAMA_MODEL=qwen3.5:0.8b
      - DEFAULT_REVIEW_COUNT=100
      - DEFAULT_LANG=en
      - DEFAULT_COUNTRY=us
    volumes:
      - playstore_reviews_data:/app/data
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
      interval: 30s
      timeout: 5s
      retries: 3
      start_period: 30s

volumes:
  playstore_reviews_data:
    driver: local

Start the service:

docker compose up -d

⁠4. Configuration Reference

All application parameters are declared declaratively via environment variables:

VariableTypeDefaultDescription
PORTint8000Port on which the FastAPI ASGI server listens inside the container
OLLAMA_BASE_URLstringhttp://host.docker.internal:11434Target URL for host Ollama API communications
OLLAMA_MODELstringqwen3.5:0.8bModel identifier used for synthesizing remediation suggestions
DEFAULT_REVIEW_COUNTint100Default review count fetched per analysis request (10–500)
DEFAULT_LANGstringenISO 639-1 language code filter for scraping
DEFAULT_COUNTRYstringusISO 3166-1 alpha-2 Google Play country storefront code
DATA_DIRstring/app/dataPath to persistent storage root for structured review JSON exports
ROBERTA_MODEL_PATHstringroberta-baseModel identifier or local filesystem path for RoBERTa tokenizer/weights

⁠5. Endpoints & Observability

RouteMethodContent-TypeDescription
/GETtext/htmlGlassmorphic visual analytics dashboard
/api/healthGETapplication/jsonContainer health and service readiness check
/api/modelsGETapplication/jsonEnumerates installed Ollama models available on host
/api/analyzePOSTapplication/jsonPrimary ETL pipeline: scrape, classify, tag, and synthesize
/docsGETtext/htmlInteractive Swagger / OpenAPI 3.0 specification
⁠Sample Analysis Request (POST /api/analyze)
curl -X POST http://localhost:8000/api/analyze \
  -H "Content-Type: application/json" \
  -d '{
    "app_id": "com.spotify.music",
    "sort_order": "Most Relevant",
    "count": 50,
    "ollama_model": "qwen3.5:0.8b"
  }'

⁠6. Storage & Data Management

Structured review outputs are written to the persistent volume using atomic writes:

/app/data/
└── <app_id>/
    └── <timestamp>_<reviewcount>_<reviewtype>.json
⁠JSON Schema Contract
{
  "app_id": "com.whatsapp",
  "timestamp": "2026-11-30T02:00:00",
  "review_count": 100,
  "sort_order": "most_relevant",
  "reviews": [
    {
      "reviewId": "gp:AOqpTOE...",
      "userName": "Jordan",
      "content": "App constantly crashes on startup after recent update.",
      "score": 1,
      "at": "2026-11-28T14:32:10",
      "appVersion": "2.24.24.78",
      "sentiment": "Negative",
      "tags": "Bugs, Login Problems",
      "labels": ["Bugs", "Login Problems"]
    }
  ],
  "ai-suggestions": "### Suggestions for: Bugs\n1. Review splash screen null-checks..."
}

⁠7. Security Specifications

  • Non-Root Execution: Container process runs under non-root UID 1000 (appuser).
  • Path Traversal Mitigation: Sanitizes all incoming app_id strings and validates destination paths using pathlib.Path.is_relative_to(target_base).
  • Request Boundaries: Request payloads are schema-validated at the network border with strict length and type constraints via Pydantic.
  • Resource Discipline: In-memory caching uses bounded LRU eviction (20 entries) with strict TTL expiry (300s) to prevent memory saturation.

⁠8. Container Lifecycle & Operations

# Stream live application logs
docker logs -f playstore-analyzer

# Perform container health query
docker inspect --format='{{json .State.Health}}' playstore-analyzer

# Gracefully stop container
docker stop --time=15 playstore-analyzer

# Remove container while preserving named volume
docker rm playstore-analyzer

⁠9. Support & Contribution

Tag summary
Recent tags
Content type
Image
Digest
sha256:3dc6fb467…
Size
3.3 GB
Last updated
6 days ago
docker pull subhasishsaha/playstore-review-analyzer:latest