- Add new columns to CompanyWebsiteAnalysis: google_name, google_address,
google_phone, google_website, google_types, google_maps_url
- Update _check_name(), _check_address(), _check_phone(), _check_website(),
_check_categories() to use Google data instead of NordaBiz database
- All audit fields now show real data from Google Business Profile
- Fallback to NordaBiz data only when Google data unavailable
Migration: database/migrations/add_google_gbp_fields.sql
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add fetch_google_business_data() to fetch fresh data from Google Places API
- Progress overlay shows all 10 data fields with actual values:
* Place search, Rating, Reviews, Photos, Hours, Phone, Website, Status
- 5-second delay after completion for user to read results
- Fix opening hours display (show formatted weekday_text)
- Fix reviews scoring (integer-based: 3 base + 1/review + 1 bonus)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed _check_photos method to read from analysis.google_photos_count
instead of total_images. This provides actual GBP photo count rather
than estimated website images.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed _check_hours() in GBP Audit Service to read opening hours from
google_opening_hours field instead of google_business_status. The method
now properly returns the actual hours value when available.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added AI-powered recommendation generation to GBP audit service:
- Import gemini_service module for AI integration
- generate_ai_recommendations(): Main method to generate personalized
recommendations using Gemini with proper cost tracking
- _build_ai_recommendation_prompt(): Builds context-aware prompt with
company info, audit results, and field statuses in Polish
- _parse_ai_recommendations(): Parses JSON response from Gemini with
robust error handling and fallback to static recommendations
- audit_with_ai(): Convenience method for running audit with AI
- audit_company_with_ai(): Module-level convenience function
Features:
- Recommendations are personalized to company industry/category
- Includes action_steps and expected_impact for each recommendation
- Graceful fallback to static recommendations if AI unavailable
- Cost tracking via 'gbp_audit_ai' feature tag
- Updated test runner with --ai flag for testing AI mode
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>