Commit Graph

54 Commits

Author SHA1 Message Date
06c22539d7 auto-claude: subtask-4-2 - Add --company-slug support and dotenv loading
- Add --company-slug argument to social_media_audit.py for easier testing
- Add get_company_id_by_slug() method to SocialMediaAuditor class
- Add python-dotenv support to load .env file from project root
- Create verify_google_places.py script for direct API testing

Note: Full verification blocked - current API key (PageSpeed) doesn't have
Places API enabled. Requires enabling Places API in Google Cloud Console
for project NORDABIZNES (gen-lang-client-0540794446).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 20:49:59 +01:00
3d69d53550 auto-claude: subtask-3-4 - Run all tests and verify they pass
Fixed bug in social media exclusion logic that was too aggressive.
The substring check `any(ex in match.lower() for ex in excludes)`
was incorrectly excluding valid usernames containing exclusion
strings (e.g., 'testcompany' was excluded because it contained 'p').

Changed to exact match only to properly handle Instagram post URLs
(`instagram.com/p/...`) without false positives on valid usernames.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 20:41:54 +01:00
9cd5066afe auto-claude: subtask-3-3 - Add test_search_google_reviews_error for API error
Added test for search_google_reviews method to handle API errors gracefully.
The test mocks GooglePlacesSearcher to simulate a RequestException during
get_place_details and verifies that the method returns None values instead
of crashing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 20:39:11 +01:00
ee6bc656ef auto-claude: subtask-3-2 - Add test_search_google_reviews for successful API response
Added test_search_google_reviews test in TestBraveSearcherGoogleReviews class
that verifies successful Google reviews retrieval via Google Places API:
- Mocks complete place lookup with realistic place_id
- Mocks full place details response including rating, reviews count,
  opening hours, and business status
- Verifies all expected fields are correctly returned
- Validates correct API calls are made with expected parameters

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 20:37:27 +01:00
c057794c64 auto-claude: subtask-3-1 - Create test file for social_media_audit with Google Places tests
Add comprehensive unit tests for social_media_audit.py:
- WebsiteAuditor tests: SSL checks, hosting detection, HTML parsing, social media extraction
- GooglePlacesSearcher tests: find_place, get_place_details, API error handling
- BraveSearcher tests: Google reviews search, fallback mechanisms
- SocialMediaAuditor tests: company auditing, result saving, integration tests
- Pattern tests: hosting providers, social media URL patterns, exclusion rules

Tests follow the same structure and patterns as test_seo_audit.py.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 20:35:27 +01:00
3bdbde1621 auto-claude: subtask-2-3 - Update SocialMediaAuditor to use GooglePlacesSearcher
- Add google_places_searcher attribute to SocialMediaAuditor
- Initialize GooglePlacesSearcher if GOOGLE_PLACES_API_KEY env var is set
- Update audit_company() to use Places API directly when available
- Fallback to Brave Search when API key not configured
- Log which data source is being used for reviews

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 20:31:22 +01:00
b389287697 auto-claude: subtask-2-2 - Replace placeholder search_google_reviews() method
Implemented actual Google reviews data collection in BraveSearcher class:
- Uses GooglePlacesSearcher to find company and get place details
- Returns google_rating, google_reviews_count, opening_hours, business_status
- Falls back to Brave Search API parsing when Google API key not available
- Added _search_brave_for_reviews() helper for fallback implementation
- Proper error handling and logging throughout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 20:29:50 +01:00
4110ef63b5 auto-claude: subtask-2-1 - Add GooglePlacesSearcher class to social_media_audit.py
Implements GooglePlacesSearcher class with:
- find_place() method: searches for business by name and city
  using Google Places findplacefromtext API
- get_place_details() method: retrieves rating, review count,
  opening hours, business status, phone, and website

Features:
- Uses GOOGLE_PLACES_API_KEY environment variable
- Comprehensive error handling (timeout, request errors)
- Polish language locale support
- Follows existing BraveSearcher class pattern

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 20:27:49 +01:00
1426a73e0d auto-claude: subtask-1-2 - Document GOOGLE_PLACES_API_KEY in .env.example 2026-01-08 20:24:37 +01:00
c8d9d295af auto-claude: subtask-1-1 - Add googlemaps package to requirements.txt 2026-01-08 20:23:55 +01:00
6426f97831 auto-claude: Merge auto-claude/006-hej-znasz-ta-aplikacje-i-te-mechanizmy-https-www-f 2026-01-08 19:49:45 +01:00
61caea4903 fix: add navigation to GBP audit feature (qa-requested)
Fixes:
- Added GBP audit link to company profile contact bar
- Link visible to admins on all profiles
- Link visible to regular users only on their own company profile
- Styled consistently with contact bar design (Google blue)

Verified:
- Template syntax balanced (blocks, if, for)
- Route gbp_audit_dashboard exists in app.py

QA Fix Session: 1

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 19:27: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
8fa23bc77e auto-claude: subtask-3-3 - Add GBP audit route accessible to logged-in users
Add user-facing GBP audit dashboard route at /audit/gbp/<company_slug>:
- Requires login (@login_required)
- Admin users can view audit for any company
- Regular users can only view audit for their own company
- Passes can_audit flag to template for run audit button visibility
- Gracefully handles missing audit data (template shows "no audit" state)
- Logs audit dashboard views for monitoring

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 19:17:32 +01:00
0bb6b718f5 auto-claude: subtask-3-2 - Create user-facing audit dashboard template
Creates templates/gbp_audit.html for GBP completeness audit display:

- Score circle with visual conic gradient showing completion percentage
- Field status cards (10 fields) with icons, badges, and progress bars
- Recommendations list sorted by priority (high/medium/low)
- Breadcrumb navigation and responsive mobile layout
- Loading overlay and info modal for audit operations
- Polish UI text matching existing platform conventions

Template follows patterns from admin_seo_dashboard.html and integrates
with the GBP audit API endpoints created in subtask-3-1.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 19:14:54 +01:00
a892626ebc auto-claude: subtask-3-1 - Create API endpoint for running GBP audit on a company
Added GBP (Google Business Profile) audit API endpoints:
- GET /api/gbp/audit/health - Health check for GBP audit service
- GET /api/gbp/audit - Fetch latest audit results by company_id or slug
- GET /api/gbp/audit/<slug> - Fetch audit results by slug path
- POST /api/gbp/audit - Run GBP audit for a company

Features:
- Health endpoint returns service status and version
- GET endpoints return completeness score, field status, and recommendations
- POST endpoint runs audit and saves results (configurable)
- Access control: members can audit own company, admins can audit any
- Rate limited to 20 requests per hour

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 19:11:26 +01:00
ecf811f168 auto-claude: subtask-2-3 - Create database migration script for GBP audit tab
- Create gbp_audits table with all required fields:
  - completeness_score (0-100)
  - fields_status and recommendations (JSONB)
  - Individual field flags (has_name, has_phone, etc.)
  - Photo and review metrics
  - Google Place integration fields
  - Audit metadata (source, version, errors)
- Add indexes for company_id, audit_date, and score
- Add update trigger for updated_at timestamp
- Create views: v_company_gbp_overview, v_gbp_audit_history
- Include GRANT statements for nordabiz_app user

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 19:08:05 +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
1c0680877b auto-claude: subtask-2-1 - Create GBPAudit database model for storing audit results
Add GBPAudit SQLAlchemy model for Google Business Profile audit tracking:
- Completeness score (0-100) with score category property
- Field-by-field status tracking (JSONB)
- AI-generated recommendations storage (JSONB)
- Individual field boolean flags (name, address, phone, etc.)
- Photo/review metrics
- Google Place ID integration
- Audit metadata and timestamps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 19:02:21 +01:00
996e9cbe5c Dodaj informację o źródle danych w panelu SEO
Widoczny link do Google PageSpeed Insights (Lighthouse) w nagłówku panelu.
Użytkownik/admin wie skąd pochodzą metryki.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 16:06:14 +01:00
b7b95c9c11 Aktualizuj nazwę klucza API PageSpeed w dokumentacji 2026-01-08 16:03:51 +01:00
ca7888c325 Dodaj dokumentację audytu SEO do CLAUDE.md
- Konfiguracja Google PageSpeed Insights API
- Metryki i interpretacja wyników
- Skrypty uruchamiania audytów
- WAŻNE: połączenie z bazą przez localhost
- Tabela seo_metrics
- UI stylizowanych modali

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 16:03:01 +01:00
af003798a7 Napraw połączenie z bazą danych w skryptach SEO (localhost zamiast zewnętrznego IP) 2026-01-08 15:57:39 +01:00
90ca2bc618 Dodaj stylizowane modale i link Audyt SEO w menu admina
- Zamieniono natywne confirm/alert na ładne modale CSS
- Dodano link "Audyt SEO" w menu administracyjnym
- Modal z animacją slide-in, ikony ostrzeżenia/info
- Obsługa zamykania przez backdrop

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 15:34:06 +01:00
892cfcc39a Fix: Template url_for errors - use company_id instead of slug
Naprawia błędy BuildError w szablonach admin gdzie używano slug zamiast company_id.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 14:04:09 +01:00
8705a5b015 Fix: Admin SEO dashboard - use Category.name instead of relationship
Problem: /admin/seo zwracał błąd 500 z AttributeError: category
Przyczyna: Company.category jest relacją SQLAlchemy (obiektem), nie stringiem.
Rozwiązanie: Użycie Category.name.label('category_name') z właściwym JOIN.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 14:00:56 +01:00
174316a530 Przywróć logo firm na stronie głównej (katalog)
Naprawione błędy wprowadzone podczas synchronizacji:
- Przywrócono sekcję company-logo z obrazkiem w karcie firmy
- Przywrócono style CSS dla logo (100% szerokość, 80px wysokość)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 13:39:16 +01:00
ee495ce83e Przywróć logo firm i Social Media w profilu firmy
Naprawione błędy wprowadzone podczas synchronizacji:
- Przywrócono sekcję company-logo-header z obrazkiem
- Przywrócono style CSS dla logo (240x240px, shadow, border-radius)
- Przywrócono przyciski Social Media (Facebook, Instagram, LinkedIn, YouTube, X, TikTok)
- Przywrócono style kolorów dla platform social media
- Naprawiono pole website_url → website

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 13:31:13 +01:00
d5e6365d1e auto-claude: Merge auto-claude/005-badanie-jakosci-seo-stron-intrentowych-kazdego-z-c 2026-01-08 12:36:09 +01:00
6e4e7c2240 Sync: Current production state
- Added CompanyRecommendation system
- Made company pages public (removed @login_required)
- CSS refactor: inline styles instead of external fluent CSS
- Added release notes page
- Added admin recommendations panel
- Company logos (webp format)
- Docker compose configuration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 12:26:22 +01:00
28efbfabce auto-claude: 8.3 - Test /admin/seo dashboard rendering, sorting, filt
Created comprehensive test suite for SEO admin dashboard functionality:
- tests/test_admin_seo_dashboard.py with 8 test functions
- Dashboard data query verification (SQLAlchemy joins)
- Statistics calculation (good/medium/poor/not_audited counts)
- Score color coding (green/yellow/red thresholds)
- Sorting logic (name, score, date)
- Filtering logic (category, score range, text search)
- Drill-down links validation
- API response structure verification
- Template data requirements verification

All 8 dashboard tests pass. All 64 existing SEO unit tests pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 09:29:47 +01:00
feaf5d5a49 auto-claude: 8.2 - Fix SQL ANY() to IN() for SQLite compatibility
- Changed PostgreSQL-specific ANY(:ids) to use IN clause with
  dynamic placeholders for SQLite/PostgreSQL compatibility
- Verified SEO audit dry-run extracts all metrics correctly:
  - HTTP status, load time, final URL
  - Meta title, H1 count, image analysis
  - Structured data detection
  - robots.txt, sitemap.xml, indexability
  - Overall SEO score calculation (95 for pixlab.pl)

Note: Company ID 26 has no website configured, tested with ID 1 instead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 09:21:12 +01:00
92055bbe60 auto-claude: 8.1 - Create tests/test_seo_audit.py with tests for PageSpeed client, on-page analyzer, technical checker
Implemented comprehensive unit test suite for SEO audit functionality:

- TestPageSpeedScore: Dataclass creation and serialization
- TestCoreWebVitals: Core Web Vitals dataclass tests
- TestRateLimiter: Rate limiting and quota tracking (7 tests)
- TestGooglePageSpeedClient: API client with mocked responses (6 tests)
- TestOnPageSEOAnalyzer: HTML analysis including meta tags, headings, images, links, structured data, Open Graph, Twitter Cards (12 tests)
- TestTechnicalSEOChecker: robots.txt, sitemap.xml, redirects, canonical, indexability (13 tests)
- TestSEOAuditScoreCalculation: On-page and technical score calculation
- TestSEOAuditResultCategorization: Result categorization logic
- TestParseBatchArgument: CLI batch argument parsing
- TestConvenienceFunctions: Helper functions

Total: 64 tests, all passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 09:18:15 +01:00
15ddbba8b5 auto-claude: 7.1 - Create scripts/seo_report_generator.py that generates HTML reports and JSON exports
Features:
- Single company HTML reports with full SEO audit data
- Batch HTML summary reports for multiple companies
- JSON exports for integration with other tools
- SEO recommendations based on audit findings
- CLI interface with --company-id, --batch, --all selection
- Output format options: --html, --json
- Score visualization with color-coded badges
- Core Web Vitals section with threshold indicators
- Issues and recommendations sections
- Statistics calculation for batch reports
- Polish language support in reports

Usage examples:
- python seo_report_generator.py --company-id 26 --html
- python seo_report_generator.py --all --html --output ./reports
- python seo_report_generator.py --batch 1-10 --json

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 09:13:18 +01:00
7d63d5304a auto-claude: 6.3 - Add SEO metrics section to company profile
Extend templates/company_detail.html to display SEO metrics when
seo_audited_at exists:

- Overall SEO score banner with color-coded gradient (green/yellow/red)
- PageSpeed scores grid (SEO, Performance, Accessibility, Best Practices)
- On-Page SEO card (meta tags, headings, images, links)
- Technical SEO card (canonical, indexing, structured data, OG tags)
- Core Web Vitals section (LCP, FID, CLS) when available
- Structured data types display (Schema.org)
- Score legend with color coding explanation
- Responsive design for mobile/tablet screens

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 08:18:42 +01:00
44f009f027 auto-claude: 6.2 - Add admin route to app.py that renders SEO dashboard
Added /admin/seo route with:
- Admin-only access with @login_required and is_admin check
- Fetches all active companies with SEO analysis data using outerjoin
- Calculates statistics: good_count (90-100), medium_count (50-89),
  poor_count (0-49), not_audited_count, avg_score
- Gets unique categories for filter dropdown
- Passes companies, stats, categories, and now to template
- Uses CompanyRow class for Jinja2 attribute access

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 08:14:43 +01:00
282e807f39 auto-claude: 6.1 - Create admin SEO dashboard template
Created templates/admin_seo_dashboard.html with:
- Sortable table showing all companies with SEO metrics
- PageSpeed scores color-coded (green/yellow/red for good/medium/poor)
- Summary stats cards showing score distribution
- Filtering by category, score range, and search
- Drill-down links to company profiles
- Single company audit trigger button (admin only)
- Responsive design with mobile-friendly layout
- Legend explaining score color coding

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 08:10:43 +01:00
53cd95873e auto-claude: 5.2 - Add POST /api/seo/audit endpoint (admin-only)
Added POST /api/seo/audit endpoint to trigger SEO audits for companies:
- Admin-only access with current_user.is_admin check
- Rate limited to 10 requests per hour per user
- Accepts company_id or slug in JSON body
- Runs full SEO audit (PageSpeed, on-page, technical)
- Saves results to database and returns audit data
- Comprehensive error handling and logging
- Uses existing _build_seo_audit_response helper for response format

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 08:07:00 +01:00
db28aa6419 auto-claude: 5.1 - Add GET /api/seo/audit endpoint for SEO results
Added two API endpoints for retrieving SEO audit data:
- GET /api/seo/audit?company_id=X or ?slug=Y
- GET /api/seo/audit/<slug>

Features:
- Returns pagespeed scores (SEO, performance, accessibility, best practices)
- Returns on-page metrics (meta tags, headings, images, links, structured data)
- Returns technical SEO checks (SSL, sitemap, robots.txt, mobile-friendly)
- Returns Core Web Vitals (LCP, FID, CLS)
- Automatically generates issues list from audit data
- Handles companies without SEO audit gracefully

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 08:03:49 +01:00
c24c545cfe auto-claude: 4.3 - Add save_audit_result method with ON CONFLICT DO UPDATE
- Enhanced save_audit_result method with complete column coverage
- Added missing columns to idempotent upsert query:
  - broken_links_count (for future link checking)
  - viewport_configured (derived from meta viewport tag)
  - is_mobile_friendly (derived from viewport content)
  - has_hreflang (for international SEO detection)
- All 45+ SEO columns now properly mapped for database upserts
- ON CONFLICT (company_id) DO UPDATE ensures idempotent operations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 08:00:12 +01:00
c8eb0829d9 auto-claude: 4.2 - Add CLI argument parsing, progress logging, and error handling
Enhanced scripts/seo_audit.py with comprehensive CLI improvements:

CLI Arguments:
- --company-id: Audit single company by ID
- --company-ids: Audit multiple companies (comma-separated)
- --batch: Audit range of companies (e.g., 1-10)
- --all: Audit all companies
- --dry-run: Print results without database writes
- --verbose/-v: Debug output
- --quiet/-q: Suppress progress output
- --json: JSON output for scripting
- --database-url: Override DATABASE_URL env var

Progress Logging:
- ETA calculation based on average time per company
- Progress counter [X/Y] for each company
- Status indicators (SUCCESS/SKIPPED/FAILED/TIMEOUT)

Summary Reporting:
- Detailed breakdown by result category
- Edge case counts (no_website, unavailable, timeout, ssl_errors)
- PageSpeed API quota tracking (start/used/remaining)
- Visual score distribution with bar charts
- Failed audits listing with error messages

Error Handling:
- Proper exit codes (0-5) for different scenarios
- Categorization of errors (timeout, connection, SSL, unavailable)
- Database connection error handling
- Quota exceeded handling
- Batch argument validation with helpful error messages

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 03:11:22 +01:00
2bebb46f02 auto-claude: 4.1 - Create scripts/seo_audit.py with SEOAuditor class
Implements SEOAuditor class following social_media_audit.py pattern:
- __init__: Initialize database connection and analysis components
- get_companies: Fetch companies by ID, batch, or all
- audit_company: Full SEO audit (PageSpeed, on-page, technical)
- save_audit_result: Upsert to company_website_analysis table
- run_audit: Orchestration with progress logging and summary

Features:
- Integrates GooglePageSpeedClient for Lighthouse scores
- Uses OnPageSEOAnalyzer for meta tags, headings, images, links
- Uses TechnicalSEOChecker for robots.txt, sitemap, canonical
- Calculates overall SEO score from weighted components
- CLI support: --company-id, --batch, --all, --dry-run, --json

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 02:16:36 +01:00
81fc27dfa9 auto-claude: 3.2 - Add TechnicalSEOChecker class to scripts/seo_analyzer.py
Adds TechnicalSEOChecker class that performs technical SEO audits:
- robots.txt: checks existence, parses directives (Disallow, Allow, Sitemap)
  detects if blocks Googlebot or all bots
- sitemap.xml: checks existence, validates XML, counts URLs, detects sitemap index
- Canonical URLs: detects canonical tag, checks if self-referencing or cross-domain
- Noindex tags: checks meta robots and X-Robots-Tag HTTP header
- Redirect chains: follows up to 10 redirects, detects loops, HTTPS upgrades,
  www redirects, and mixed content issues

Includes:
- 8 dataclasses for structured results (RobotsTxtResult, SitemapResult, etc.)
- TechnicalSEOResult container for complete analysis
- check_technical_seo() convenience function
- CLI support: --technical/-t flag for technical-only analysis
- --all/-a flag for combined on-page and technical analysis
- --json/-j flag for JSON output

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 02:12:47 +01:00
0c257f5e48 auto-claude: 3.1 - Create scripts/seo_analyzer.py with OnPageSEOAnalyzer
Add comprehensive on-page SEO analyzer that extracts:
- Meta tags (title, description, keywords, robots, viewport, canonical)
- Open Graph metadata (og:title, og:description, og:image, etc.)
- Twitter Card metadata (card type, site, creator, etc.)
- Heading structure (h1-h6 counts, hierarchy validation)
- Image alt text analysis (missing, empty, quality issues)
- Link analysis (internal/external/nofollow/broken)
- Structured data detection (JSON-LD, Microdata, RDFa)
- Word count and document attributes (DOCTYPE, lang)

Uses dataclasses for structured results following pagespeed_client.py pattern.
Includes CLI interface for testing individual URLs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 02:07:10 +01:00
623ac284bf auto-claude: 2.2 - Document GOOGLE_PAGESPEED_API_KEY env variable
Add PageSpeed Insights API key configuration to .env.example with:
- Environment variable name: GOOGLE_PAGESPEED_API_KEY
- Link to API key setup documentation
- Note about free tier limits (25k requests/day)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 02:02:12 +01:00
9f58e3f8e1 auto-claude: 2.1 - Create scripts/pagespeed_client.py with GooglePageSpeedClient
Implements Google PageSpeed Insights API client with:
- GooglePageSpeedClient class for making API calls
- Exponential backoff retry logic (3 retries, 1-60s backoff)
- RateLimiter class with daily quota tracking (25k req/day)
- Quota persistence to .pagespeed_quota.json
- Support for mobile/desktop strategies
- Core Web Vitals extraction (LCP, FCP, CLS, TTFB)
- Lighthouse audit scores (performance, accessibility, SEO, best-practices)
- Structured dataclasses for results (PageSpeedResult, PageSpeedScore, CoreWebVitals)
- Custom exceptions (QuotaExceededError, RateLimitError, PageSpeedAPIError)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 02:00:37 +01:00
5ef2752e1a auto-claude: 1.3 - Extend CompanyWebsiteAnalysis model with SEO columns
Added 42 new columns to CompanyWebsiteAnalysis model:

PageSpeed Insights (5 columns):
- pagespeed_seo_score, pagespeed_performance_score
- pagespeed_accessibility_score, pagespeed_best_practices_score
- pagespeed_audits (JSONB)

On-Page SEO Details (18 columns):
- meta_title, meta_description, meta_keywords
- h1_count, h2_count, h3_count, h1_text
- total_images, images_without_alt, images_with_alt
- internal_links_count, external_links_count, broken_links_count
- has_structured_data, structured_data_types, structured_data_json

Technical SEO (13 columns):
- has_canonical, canonical_url, is_indexable, noindex_reason
- viewport_configured, largest_contentful_paint_ms
- first_input_delay_ms, cumulative_layout_shift
- has_og_tags, og_title, og_description, og_image, has_twitter_cards
- html_lang, has_hreflang

SEO Audit Metadata (6 columns):
- seo_audit_version, seo_audited_at, seo_audit_errors
- seo_overall_score, seo_health_score, seo_issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 01:56:44 +01:00
8f5bb9a47c auto-claude: 1.2 - Create database/migrations/004_seo_metrics.sql
Add SQL migration for SEO quality assessment metrics:
- PageSpeed Insights scores (seo, performance, accessibility, best_practices)
- PageSpeed audits JSONB column for detailed results
- On-page SEO: headings (h1/h2/h3), images with/without alt, links
- Structured data detection (JSON-LD, Microdata, RDFa)
- Technical SEO: canonical URLs, indexability, Core Web Vitals
- Open Graph & Twitter Cards meta tags
- SEO audit metadata (version, timestamp, errors, scores)
- Created v_company_seo_overview view for admin dashboard
- Added indexes for SEO-related queries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 01:54:32 +01:00
4b2a68af74 auto-claude: 1.1 - Add beautifulsoup4, lxml, python-whois for on-page SEO analysis
Add SEO analysis dependencies to requirements.txt:
- beautifulsoup4==4.12.3: HTML parsing for SEO metrics extraction
- lxml==5.1.0: Fast XML/HTML parser backend for BeautifulSoup
- python-whois==0.9.4: Domain information lookup

These replace seokar/pyseoanalyzer due to compatibility issues.
2026-01-08 01:52:26 +01:00
055d9c1cfa Add company logos, migration and docs
- Add 80+ company logo images (webp/svg)
- Add membership_fees migration SQL
- Add incident report doc
- Update .gitignore for worktrees

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-06 22:31:17 +01:00