mirror of
https://github.com/rersozlu/food402.git
synced 2026-04-25 07:15:49 +03:00
[PR #14] [MERGED] feat: Add Google Reviews integration with branch matching #14
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/food402#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/rersozlu/food402/pull/14
Author: @lemogras
Created: 2/2/2026
Status: ✅ Merged
Merged: 2/3/2026
Merged by: @rersozlu
Base:
master← Head:feat/google-reviews-integration📝 Commits (3)
b358dabfeat: add Google Reviews integration with branch matchinge7018edMerge branch 'master' into feat/google-reviews-integration1d78770refactor: modularize Google Reviews into shared/modules/google-reviews📊 Changes
18 files changed (+3844 additions, -811 deletions)
View changed files
➕
.env.example(+11 -0)📝
README.md(+32 -0)📝
package-lock.json(+2176 -809)📝
package.json(+5 -2)📝
shared/api.ts(+18 -0)➕
shared/modules/google-reviews/api.ts(+274 -0)➕
shared/modules/google-reviews/cache.test.ts(+238 -0)➕
shared/modules/google-reviews/cache.ts(+144 -0)➕
shared/modules/google-reviews/index.ts(+41 -0)➕
shared/modules/google-reviews/matching.test.ts(+170 -0)➕
shared/modules/google-reviews/matching.ts(+184 -0)➕
shared/modules/google-reviews/types.ts(+140 -0)➕
shared/modules/google-reviews/utils.ts(+111 -0)📝
shared/types.ts(+8 -0)📝
src/api.ts(+18 -0)➕
src/google-reviews.test.ts(+230 -0)📝
src/index.ts(+35 -0)➕
vitest.config.ts(+9 -0)📄 Description
Summary
Adds a new
get_google_reviewsMCP tool that fetches ratings and reviews from Google Places API for any restaurant. This helps users make better dining decisions by comparing TGO ratings with Google ratings and reading recent customer reviews.Key Features
Intelligent Branch Matching - Correctly identifies the right restaurant location (crucial for chains like McDonald's, Burger King, etc.) using a weighted algorithm:
Rating Comparison - Shows both TGO and Google ratings side-by-side with a summary (e.g., "Google rates 0.3 higher than TGO")
Recent Reviews - Returns up to 10 most recent reviews sorted by date
Cost Efficient - 24-hour caching reduces API calls; on-demand fetching (not auto-enrichment) keeps costs low
Graceful Degradation - Works without API key configured (returns helpful error message)
Usage
Configuration
Requires
GOOGLE_PLACES_API_KEYenvironment variable (optional - feature gracefully disabled without it).Test Plan
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.