Skip to content

feat: add GMapReview AI reputation intelligence agent#261

Open
Cvr421 wants to merge 12 commits into
Lamatic:mainfrom
Cvr421:gmap-review-ai
Open

feat: add GMapReview AI reputation intelligence agent#261
Cvr421 wants to merge 12 commits into
Lamatic:mainfrom
Cvr421:gmap-review-ai

Conversation

@Cvr421

@Cvr421 Cvr421 commented Jul 17, 2026

Copy link
Copy Markdown

Summary

This PR adds *GMapReview AI, an AI-powered reputation intelligence kit for local businesses built with Lamatic.

GMapReview AI automatically collects live Google Maps reviews using Apify, analyzes customer sentiment with an LLM, identifies recurring strengths and improvement areas, benchmarks competitors, and generates professional owner replies for unanswered negative reviews.

The generated report helps business owners quickly understand customer feedback without manually reading hundreds of reviews.


Features

  • Live Google Maps review collection using Apify
  • AI-powered sentiment analysis
  • Recurring theme detection
  • Competitor benchmarking (optional)
  • Evidence-based business insights
  • Draft replies for unanswered negative reviews
  • Markdown reputation report generation

Technologies

  • Lamatic
  • Apify Google Maps Reviews Scraper
  • Groq LLM

Testing

Successfully tested with:

  • Leopold Cafe (Restaurant)
  • The Taj Mahal Palace (Hotel)

The workflow was validated end-to-end using Lamatic Playground.


PR Checklist

1. Select Contribution Type

  • Kit (kits/<category>/<kit-name>/)
  • Bundle (bundles/<bundle-name>/)
  • Template (templates/<template-name>/)

2. General Requirements

  • PR is for one project only (no unrelated changes)
  • No secrets, API keys, or real credentials are committed
  • Folder name uses kebab-case and matches the flow ID
  • All changes are documented in README.md (purpose, setup, usage)

3. File Structure (Check what applies)

  • lamatic.config.ts present with valid metadata (name, description, tags, steps, author, links)
  • .env.example with placeholder values only (kits only)
  • No hand‑edited flow node graphs (changes via Lamatic Studio export)

4. Validation

  • PR title is clear (e.g., [kit] Add <name> for <use case>)
  • GitHub Actions workflows pass (all checks are green)
  • All CodeRabbit or other PR review comments are addressed and resolved
  • No unrelated files or projects are modified
  • Added new Lamatic kit: kits/gmap-review-ai/ (GMapReviewAI / Reputation Pulse)
  • Env/config & git hygiene:
    • kits/gmap-review-ai/.env.example (adds APIFY_API_TOKEN, LLM_API_KEY placeholders)
    • kits/gmap-review-ai/.gitignore
    • kits/gmap-review-ai/app/.gitignore
  • Documentation & agent guidance:
    • kits/gmap-review-ai/README.md
    • kits/gmap-review-ai/agent.md
    • kits/gmap-review-ai/constitutions/default.md
    • kits/gmap-review-ai/app/README.md
    • kits/gmap-review-ai/app/AGENTS.md
    • kits/gmap-review-ai/app/CLAUDE.md
  • Kit/flow definitions:
    • kits/gmap-review-ai/lamatic.config.ts
    • kits/gmap-review-ai/flows/gmap-review-ai.ts
    • kits/gmap-review-ai/assets/lamatic-flow-config.yaml
  • LLM configuration & prompts:
    • kits/gmap-review-ai/model-configs/gmap-review-ai_llmnode-540_generative-model-name.ts
    • kits/gmap-review-ai/prompts/gmap-review-ai_llmnode-540_system_0.md
    • kits/gmap-review-ai/prompts/gmap-review-ai_llmnode-540_user_1.md
  • Assets:
    • kits/gmap-review-ai/assets/sample-report.md
    • kits/gmap-review-ai/assets/GMapReviewAI.svg
    • kits/gmap-review-ai/assets/playground.png
  • Next.js UI (input + rendering of the generated report):
    • kits/gmap-review-ai/app/package.json
    • kits/gmap-review-ai/app/package-lock.json
    • kits/gmap-review-ai/app/tsconfig.json
    • kits/gmap-review-ai/app/eslint.config.mjs
    • kits/gmap-review-ai/app/next.config.ts
    • kits/gmap-review-ai/app/postcss.config.mjs
    • kits/gmap-review-ai/app/tailwind.config.ts
    • kits/gmap-review-ai/app/app/layout.tsx
    • kits/gmap-review-ai/app/app/page.tsx
    • kits/gmap-review-ai/app/app/globals.css
    • kits/gmap-review-ai/app/app/favicon.ico
    • kits/gmap-review-ai/app/lib/lamatic.ts
    • kits/gmap-review-ai/app/components/AnalysisForm.tsx
    • kits/gmap-review-ai/app/components/SentimentCard.tsx
    • kits/gmap-review-ai/app/components/ReportDashboard.tsx
    • kits/gmap-review-ai/app/public/next.svg
    • kits/gmap-review-ai/app/public/vercel.svg

Flow high-level behavior (from kits/gmap-review-ai/flows/gmap-review-ai.ts and assets/lamatic-flow-config.yaml):

  • Node types introduced/wired:
    • triggerNode (GraphQL trigger; nodeType: graphqlNode)
    • dynamicNode for:
      • codeNode (“Fetch Reviews (Apify)”; code: @scripts/gmap-review-ai_code-node-310_code.ts`` referenced)
      • LLMNode (“Generate Reputation Pulse”; uses referenced system/user prompt files + generative model config)
    • responseNode (GraphQL response; nodeType: graphqlResponseNode)
    • Edges: defaultEdge (main chain) and responseEdge (response wiring)
  • Wiring / execution path:
    • triggerNode_1codeNode_310LLMNode_540responseNode_triggerNode_1
    • Plus triggerNode_1responseNode_triggerNode_1 via a responseEdge
  • GraphQL I/O behavior:
    • Trigger input schema includes: business_name, business_maps_url, competitor_maps_urls, max_reviews_per_place, reviews_since
    • Response mapping returns:
      • reportLLMNode_540.output.generatedResponse
      • business_average_ratingcodeNode_310.output.businessReviewData.sampleAverageRating
      • business_total_reviews_fetchedcodeNode_310.output.businessReviewData.reviewsFetchedInThisRun

Cvr421 added 3 commits July 17, 2026 14:11
Signed-off-by: Cvr421 <chandravijayk42187@gmail.com>
Signed-off-by: Cvr421 <chandravijayk42187@gmail.com>
Signed-off-by: Cvr421 <chandravijayk42187@gmail.com>
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

:robot_face: AgentKit Structural Validation

New Contributions Detected

  • Template: kits/gmap-review-ai

Check Results

Check Status
No edits to existing kits ✅ Pass
Required root files present ✅ Pass
Flow .ts files present ✅ Pass
lamatic.config.ts valid ✅ Pass
No changes outside kits/ ✅ Pass

⚠️ Warnings

  • kits/gmap-review-ai is missing .env.example — bundles and kits should include one

🎉 All checks passed! This contribution follows the AgentKit structure.

@github-actions

Copy link
Copy Markdown
Contributor

Failure recorded at 2026-07-17T09:00:07Z UTC. If this PR is not fixed within 4 weeks it will be automatically closed.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds the GMapReviewAI Lamatic kit with a review-fetching flow, evidence-based LLM report generation, model and safety configuration, a Next.js interface, environment setup, documentation, and a sample report.

Changes

GMapReviewAI kit

Layer / File(s) Summary
Kit setup and flow wiring
kits/gmap-review-ai/lamatic.config.ts, kits/gmap-review-ai/flows/..., kits/gmap-review-ai/assets/lamatic-flow-config.yaml, kits/gmap-review-ai/.env.example, kits/gmap-review-ai/.gitignore
Defines kit metadata, environment placeholders, ignored files, review-fetching and report-generation nodes, their edges, and response mappings.
Report generation contract
kits/gmap-review-ai/model-configs/..., kits/gmap-review-ai/constitutions/default.md, kits/gmap-review-ai/prompts/...
Configures the Groq-backed model and specifies evidence rules, data handling, tone, response drafting, and Markdown report structure.
Analysis web application
kits/gmap-review-ai/app/app/..., kits/gmap-review-ai/app/components/..., kits/gmap-review-ai/app/lib/..., kits/gmap-review-ai/app/*config*, kits/gmap-review-ai/app/package.json
Adds a Next.js interface for submitting business and competitor URLs, invoking the workflow, and rendering review metrics and Markdown results.
Kit documentation and sample output
kits/gmap-review-ai/README.md, kits/gmap-review-ai/assets/sample-report.md, kits/gmap-review-ai/agent.md, kits/gmap-review-ai/app/README.md, kits/gmap-review-ai/app/AGENTS.md, kits/gmap-review-ai/app/CLAUDE.md
Documents setup, flow behavior, guardrails, assumptions, extensions, and directory contents, and adds a representative report and app guidance.

Suggested reviewers: amanintech, d-pamneja

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding the GMapReview AI kit.
Description check ✅ Passed The description includes a summary, features, testing, and a filled PR checklist aligned with the template.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai
coderabbitai Bot requested a review from d-pamneja July 17, 2026 09:00
Signed-off-by: Cvr421 <chandravijayk42187@gmail.com>
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
putComment timed out

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@kits/gmap-review-ai/agent.md`:
- Line 3: Replace the TODO in agent.md with a complete agent identity dossier
covering the agent’s identity, purpose, capabilities, operational flow,
guardrails, and integration references. Ensure the documentation is sufficiently
detailed for deployment and removes the placeholder entirely.

In `@kits/gmap-review-ai/assets/lamatic-flow-config.yaml`:
- Around line 17-24: Update the advance_schema definition in the Lamatic flow
configuration so max_reviews_per_place and reviews_since are required, matching
the schema in gmap-review-ai.ts; remove the optional markers while leaving the
other fields unchanged.
- Around line 33-52: Update obsolete reputation-pulse and GMapReviewAI
references: in kits/gmap-review-ai/assets/lamatic-flow-config.yaml lines 33-52,
use `@scripts/gmap-review-ai_code-node-310_code.ts` and the corresponding
gmap-review-ai_* prompt paths for LLMNode_540; in kits/gmap-review-ai/README.md
lines 78-81 and 108, point all script references to
gmap-review-ai_code-node-310_code.ts; and in
kits/gmap-review-ai/assets/sample-report.md line 4, use the exact
gmap-review-ai_code-node-310_code.ts filename.

In `@kits/gmap-review-ai/assets/sample-report.md`:
- Around line 24-36: The sample report headers must match the system prompt’s
current output format. Rename “Headline” to “Executive Summary,” “What’s
Working” to “Top Positive Themes,” and “What Needs Fixing” to “Highest Priority
Improvements,” while preserving the existing report content and structure.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: a9198b7a-f704-4f7e-bcf1-2fb32524322e

📥 Commits

Reviewing files that changed from the base of the PR and between 0ada432 and a240c07.

⛔ Files ignored due to path filters (2)
  • kits/gmap-review-ai/assets/GMapReviewAI.svg is excluded by !**/*.svg
  • kits/gmap-review-ai/assets/playground.png is excluded by !**/*.png
📒 Files selected for processing (12)
  • kits/gmap-review-ai/.env.example
  • kits/gmap-review-ai/.gitignore
  • kits/gmap-review-ai/README.md
  • kits/gmap-review-ai/agent.md
  • kits/gmap-review-ai/assets/lamatic-flow-config.yaml
  • kits/gmap-review-ai/assets/sample-report.md
  • kits/gmap-review-ai/constitutions/default.md
  • kits/gmap-review-ai/flows/gmap-review-ai.ts
  • kits/gmap-review-ai/lamatic.config.ts
  • kits/gmap-review-ai/model-configs/gmap-review-ai_llmnode-540_generative-model-name.ts
  • kits/gmap-review-ai/prompts/gmap-review-ai_llmnode-540_system_0.md
  • kits/gmap-review-ai/prompts/gmap-review-ai_llmnode-540_user_1.md

Comment thread kits/gmap-review-ai/agent.md Outdated
Comment thread kits/gmap-review-ai/assets/lamatic-flow-config.yaml Outdated
Comment thread kits/gmap-review-ai/assets/lamatic-flow-config.yaml Outdated
Comment thread kits/gmap-review-ai/assets/sample-report.md Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Hi @Cvr421! 👋

Before this PR can be reviewed by maintainers, please resolve all comments and requested changes from the CodeRabbit automated review.

Steps to follow:

  1. Read through all CodeRabbit comments carefully
  2. Address each issue raised (or reply explaining why you disagree)
  3. Push your fixes as new commits
  4. Once all issues are resolved, comment here so we can re-review

This helps keep the review process efficient for everyone. Thank you! 🙏

Signed-off-by: Cvr421 <chandravijayk42187@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@kits/gmap-review-ai/app/app/layout.tsx`:
- Around line 15-18: Update the exported metadata object in the layout to
replace the default Next.js title and description with application-specific
GMapReview AI branding and purpose, leaving the Metadata export structure
unchanged.

In `@kits/gmap-review-ai/app/components/AnalysisForm.tsx`:
- Around line 78-96: Explicitly type formData.competitor_maps_urls as string[]
in AnalysisForm’s initial state so TypeScript infers the intended array element
type. Remove the `as never` casts from addCompetitor and handleCompetitorChange
while preserving their existing behavior.
- Around line 1-72: Remove the entire commented-out duplicate AnalysisForm
implementation, including its unused imports, component definition, handlers,
JSX, and surrounding separator comments. Preserve the active AnalysisForm
implementation that follows.

In `@kits/gmap-review-ai/app/lib/lamatic.ts`:
- Around line 27-36: Update triggerGMapAnalysis to read the Lamatic
configuration from server-only environment variable names by removing the
NEXT_PUBLIC_ prefix from the API key, project ID, workflow ID, and GraphQL URL
lookups. Keep the existing validation behavior and ensure the corresponding
.env.local variable names are updated to match.
- Around line 1-2: Add the Next.js Server Action directive at the top of the
lamatic module so its exported operations execute exclusively on the server and
keep the classified keys out of browser code.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 49f3cc72-f1f7-448b-9f84-a94d74d9ce00

📥 Commits

Reviewing files that changed from the base of the PR and between a240c07 and ef7abc2.

⛔ Files ignored due to path filters (4)
  • kits/gmap-review-ai/app/app/favicon.ico is excluded by !**/*.ico
  • kits/gmap-review-ai/app/package-lock.json is excluded by !**/package-lock.json
  • kits/gmap-review-ai/app/public/next.svg is excluded by !**/*.svg
  • kits/gmap-review-ai/app/public/vercel.svg is excluded by !**/*.svg
📒 Files selected for processing (18)
  • kits/gmap-review-ai/agent.md
  • kits/gmap-review-ai/app/.gitignore
  • kits/gmap-review-ai/app/AGENTS.md
  • kits/gmap-review-ai/app/CLAUDE.md
  • kits/gmap-review-ai/app/README.md
  • kits/gmap-review-ai/app/app/globals.css
  • kits/gmap-review-ai/app/app/layout.tsx
  • kits/gmap-review-ai/app/app/page.tsx
  • kits/gmap-review-ai/app/components/AnalysisForm.tsx
  • kits/gmap-review-ai/app/components/ReportDashboard.tsx
  • kits/gmap-review-ai/app/components/SentimentCard.tsx
  • kits/gmap-review-ai/app/eslint.config.mjs
  • kits/gmap-review-ai/app/lib/lamatic.ts
  • kits/gmap-review-ai/app/next.config.ts
  • kits/gmap-review-ai/app/package.json
  • kits/gmap-review-ai/app/postcss.config.mjs
  • kits/gmap-review-ai/app/tailwind.config.ts
  • kits/gmap-review-ai/app/tsconfig.json

Comment thread kits/gmap-review-ai/apps/app/layout.tsx
Comment thread kits/gmap-review-ai/app/components/AnalysisForm.tsx Outdated
Comment thread kits/gmap-review-ai/apps/components/AnalysisForm.tsx
Comment thread kits/gmap-review-ai/apps/lib/lamatic.ts Outdated
Comment thread kits/gmap-review-ai/apps/lib/lamatic.ts
Cvr421 added 2 commits July 18, 2026 03:27
Signed-off-by: Cvr421 <chandravijayk42187@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@kits/gmap-review-ai/app/components/AnalysisForm.tsx`:
- Around line 13-18: Update addCompetitor to use the functional setFormData
updater, deriving the new competitor_maps_urls array from the latest previous
state rather than the captured formData value; preserve all other form fields
unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 216812c4-f544-4dca-9491-c84fc6a7226c

📥 Commits

Reviewing files that changed from the base of the PR and between 333eb6d and e23f0ec.

📒 Files selected for processing (3)
  • kits/gmap-review-ai/app/README.md
  • kits/gmap-review-ai/app/app/layout.tsx
  • kits/gmap-review-ai/app/components/AnalysisForm.tsx

Comment thread kits/gmap-review-ai/apps/components/AnalysisForm.tsx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@kits/gmap-review-ai/app/components/AnalysisForm.tsx`:
- Around line 14-17: Update handleCompetitorChange and the Trash2 removal
handler to use functional setFormData updates, deriving competitor_maps_urls
from the prev state rather than the formData closure. Preserve the existing
index replacement and removal behavior while applying the same stale-state-safe
pattern already used by the add operation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: be16c319-2add-4d04-a4f9-05b29818e880

📥 Commits

Reviewing files that changed from the base of the PR and between e23f0ec and b1e3588.

📒 Files selected for processing (1)
  • kits/gmap-review-ai/app/components/AnalysisForm.tsx

Comment thread kits/gmap-review-ai/apps/components/AnalysisForm.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant