Commit Graph

14 Commits

Author SHA1 Message Date
09ae03dcec fix(audit): Fix false photo/logo detection in GBP audits
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- Replace hardcoded logo_present=False with heuristic (photo_count>=1)
- Replace hardcoded cover_photo_present=False with heuristic (>=2)
- Fix has_photos to use photo_count>0 instead of score threshold
- Add descriptive photo_status string for AI context
- Add UWAGA section in Gemini prompt for cautious recommendations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 10:36:15 +01:00
a6d7fc343e feat(ai): Use Gemini 3 Pro for audit analyses (GBP, SEO, social media)
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
- Add per-call model override parameter to generate_text()
- GBP audit, SEO/social audit analysis, and audit content generation
  now use gemini-3-pro-preview for highest quality reasoning
- Chat and other features remain on 3-flash (cheaper, faster)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 17:39:44 +01:00
42ddeabf2a feat(backend): Add enhanced audit models and scraper improvements
- database.py: GBPReview, CompanyCitation, CompanyCompetitor, CompetitorSnapshot, AuditReport models
- gbp_audit_service.py: Enhanced review analysis, NAP consistency, keyword analysis
- scripts/seo_audit.py: Core Web Vitals, heading/image/link analysis, SSL, analytics detection
- scripts/social_media_audit.py: Profile enrichment, content types, posting frequency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 12:00:42 +01:00
cebe52f303 refactor: Rebranding i aktualizacja modelu AI
- Zmiana nazwy: "Norda Biznes Hub" → "Norda Biznes Partner"
- Aktualizacja modelu AI: Gemini 2.0 Flash → Gemini 3 Flash
- Zachowano historyczne odniesienia w timeline i dokumentacji

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:08:39 +01:00
c4d6f12840 fix: Translate Google Place types to Polish in GBP audit
- Add comprehensive GOOGLE_TYPES_PL dictionary with 200+ type translations
- Update _check_categories() to use Polish translations
- Fallback to formatted English if translation not available
- Categories like "car_repair" now display as "Warsztat samochodowy"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 10:22:39 +01:00
6f17ef5dfd fix: Generate Google Maps URL from place_id when google_maps_url is missing
- Template now uses google_place_id to generate Maps URL if google_maps_url is empty
- gbp_audit_service.py now copies google_maps_url from website_analysis

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 23:41:44 +01:00
3b2dcc279b feat(gbp-audit): Use Google data for all audit fields
- 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>
2026-01-09 04:43:03 +01:00
7aacdd5951 Fix: include details field in fields_status serialization
The details field (with reviews breakdown) was not being passed to template.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 04:32:40 +01:00
0c1d03418b GBP Audit: show reviews scoring breakdown
Add details field to FieldStatus for passing breakdown info.
Display scoring breakdown like: "3 pkt (1. opinia) + 1 pkt (ocena) = 4/9"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 04:30:04 +01:00
6758e208d4 GBP Audit: fetch Google data + detailed progress overlay
- 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>
2026-01-09 04:19:44 +01:00
fd5a04c02c auto-claude: subtask-3-2 - Update _check_photos() to use google_photos_count
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>
2026-01-08 23:02:49 +01:00
d84588c46b auto-claude: subtask-3-1 - Update _check_hours() method to read from google_opening_hours
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>
2026-01-08 23:01:28 +01:00
47c415a63b auto-claude: subtask-3-4 - Integrate AI recommendations using Gemini service
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>
2026-01-08 19:20:25 +01:00
edb3d41f49 auto-claude: subtask-2-2 - Create GBP audit service with completeness scoring
Add GBPAuditService with:
- Field-by-field completeness checking (name, address, phone, website, hours, categories, photos, description, services, reviews)
- Weighted scoring algorithm (total 100 points)
- AuditResult and FieldStatus dataclasses for structured results
- Automatic recommendation generation with priority levels
- save_audit() to persist results to GBPAudit model
- Convenience functions: audit_company(), get_company_audit(), batch_audit_companies()

Scoring weights:
- Photos: 15 pts (highest impact on engagement)
- Description: 12 pts
- Name, Address, Categories: 10 pts each
- Reviews: 9 pts
- Phone, Website, Hours, Services: 8-10 pts each

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 19:05:35 +01:00