Game Community Sentiment:
1. Project Objective
While sentiment from social media is important for any application, it becomes significantly important for game players, who are often cohesively bonded as a community. Players actively use social media channels to express their opinions, feedback, and frustrations.
From a business perspective, it is critical to gauge this social media sentiment and perform robust analytics. This project provides a serverless platform to capture, structure, and analyze real-time player sentiment from across the web.
2. Key Features & Audience
The platform is built as a suite of API endpoints, each serving a specific business need and audience.
| Feature | Endpoint | Audience |
|---|---|---|
| 1. On-Demand Game Pulse | POST /get_updates/{game_name} | Product Manager, Program Manager, QA |
| 2. Automated Sentiment Pipeline | POST /run-sentiment-analysis | Analytics Team, Machine Learning |
| 3. Weekly Sentiment Summary | GET /get-sentiment-summary/{game_short_name} | Senior Leadership, Analytics Team |
| 4. Real-time Glitch Alerts | GET /send-glitch-report/{game_name} | QA Team, On-Call Developers |
Feature 1: On-Demand Game Pulse (Highlights & Lowlights)
A real-time, on-demand report for any game. This can be used to get an instant snapshot of a an in-house game or to research competitors. The UI provides:
- Game Glimpse: The game's developer and history.
- Highlights: A summary of positive posts from the last 48 hours.
- Lowlights: A summary of bugs, issues, and complaints from the last 24 hours.
GCP Service: Cloud Run URL / Endpoint: https://community-watcher-service-188667005077.us-central1.run.app
- A list of games are loaded in the left pane. This is loaded from game_name.txt
- Click on any game from the left pane brings game history, highlights, and lowlights
Audience - Product Manager, Program Manager, Quality Engineering
Additional Feature
- Search : This could be used by Product Management groups to know with competitors or with other titles.
Feature 2: Automated Sentiment Pipeline (Daily Job)
This is a background-triggered job designed for data warehousing. It processes a master list of games, fetches all highlights and lowlights, structures the data (including priority scores, source, and feedback), and inserts it directly into a BigQuery table. This creates a historical, structured dataset perfect for analytics and training ML models.
GCP Service:
- Cloud Run
- Cloud Scheduler - To invoke the service once daily using HTTP Post
URL / Endpoint: https://community-watcher-service-188667005077.us-central1.run.app/run-sentiment-analysis
(Note - No need to click on this URL as this is a post method. The service could be invoked by CURL)
Audience - Data Scientist and Machine Learning team.
Additional Feature/Scope -
The schema of the underlying BigQuery table has positive_score and negative_score which gets populated based on the recently introduced AI.SCORE function, which uses a Vertex AI Gemini model to rate inputs based on a scoring system that you describe. This could further be leveraged to develop Quantitative, Qualitative sentiment analytics or predictive analytics.
Feature 3: Weekly Sentiment Summary
A high-level executive summary. This endpoint queries the BigQuery database for all positive and negative feedback for all the internal games over the last 7 days. It then uses the Gemini AI to synthesize all this data into two concise paragraphs: one for the positive themes and one for the negative themes. This is presented on a clean HTML page for leadership. Individual Game studios can have a respective URL to get the report.
GCP Service: Cloud Run URL / Endpoint: https://community-watcher-service-188667005077.us-central1.run.app/get-sentiment-summary/pgo
https://community-watcher-service-188667005077.us-central1.run.app/get-sentiment-summary/pikmin
https://community-watcher-service-188667005077.us-central1.run.app/get-sentiment-summary/mhn
Audience - Leadership Team and Product Manager
Additional Feature/Scope - The summary prompt could be tailored to get the report in the desired format.
Feature 4: Real-time Glitch Alerts
A specialized, automated alert. This endpoint can be triggered by a scheduler to perform a targeted search for only negative "glitch/bug" reports and send a formatted summary directly to a Slack channel, alerting the QA and on-call teams to emerging issues.
Additional Feature/Scope - Besides Slack, other channels, like emails, could be used for alerting on daily issues.
3. Architecture & Deployment on Google Cloud
This project is architected as a FastAPI application, deployed as a serverless container on Google Cloud Run.
Core Components
- Application: FastAPI (Python) for a high-performance API and Jinja2 for HTML templating.
- AI Engine: Google Generative AI SDK (Gemini 2.5 Flash) for all summarization, analysis, and data structuring tasks.
- Data Ingestion: Google Search (via google-api-python-client) to query real-time social media and web results.
- Data Warehouse: Google BigQuery for persistent, scalable storage of structured sentiment data.
- Scheduling: Google Cloud Scheduler to trigger the daily pipeline and glitch alerts via HTTPS.
- Alerting: Slack SDK for pushing real-time notifications to the team.
Why Google Cloud Run?
Cloud Run is the ideal choice for this project due to its serverless nature and powerful integrations:
- Serverless & Scalable: There are no servers to manage. Cloud Run automatically scales up instances to handle incoming requests—whether it's one user or thousands—and scales down to zero.
- Pay-per-Invocation: We are only charged when an endpoint is actively processing a request. This is perfect for a job-based application, making it highly cost-effective.
- Endpoint Scheduling: Cloud Run integrates natively with Google Cloud Scheduler. We can easily set up cron jobs to call our API endpoints at different time schedules (e.g., run the /run-sentiment-analysis job every night at 1 AM).
- Role-Based Access (IAM): We can use Google's IAM to secure our application. Public-facing endpoints (like the summary page) can be made public, while sensitive endpoints (like the data insertion job) can be restricted to only be callable by our Cloud Scheduler service account.
4. Architectural Flows
Flow 1: On-Demand Game Pulse (PM/QA)
- A Product Manager opens the web UI and submits a game name (e.g., "Monopoly Go").
- The browser sends a request to the Cloud Run endpoint POST /get_updates/Monopoly Go.
- The FastAPI app calls the run_highlights_agent and run_lowlights_agent.
- The agents use the Google Search tool to find recent posts.
- The search results are fed to the Gemini AI model for summarization.
- Cloud Run returns the structured report as an HTML page to the PM.
Flow 2: Daily Sentiment Pipeline (Scheduled)
- Google Cloud Scheduler triggers a POST request to the /run-sentiment-analysis endpoint on Cloud Run.
- Cloud Run's BackgroundTasks feature starts the job.
- The app loops through its game_names.txt file (e.g., "Pokemon GO", "Monster Hunter Now").
- For each game, it performs the Google Search -> Gemini AI analysis.
- The data_transformer script formats the output into a strict JSON schema.
- The bigquery_client inserts this structured data into the BigQuery sentiment table for permanent storage.
Flow 3: Weekly Sentiment Summary (Leadership)
- A Team Lead navigates to GET /get-sentiment-summary/pgo.
- The Cloud Run server receives the request.
- The query_sentiment_for_game function connects to BigQuery and fetches all positive_view and negative_view strings for "Pokemon GO" from the last 7 days.
- This large batch of raw text is passed to the Gemini AI model via run_weekly_summary_agent.
- Gemini returns two concise paragraphs summarizing all the feedback.
- Cloud Run renders the summary.html template and sends it to the user.
Flow 4: Real-time Glitch Alerts (Scheduled)
- Google Cloud Scheduler triggers a GET request to the /send-glitch-report/{game_name} endpoint.
- The Cloud Run server receives the request.
- The run_lowlights_agent is called, using Google Search to find recent bug/glitch reports.
- The results are summarized by the Gemini AI model.
- The FastAPI app sends the formatted report to a Slack channel as a real-time alert.
Log in or sign up for Devpost to join the conversation.