How kenancn/seo-analysis-tool works
Frontend Layer
• UI components for URL input, keyword input, and analysis results display
• Three main feature sections: Lighthouse Analysis, Competitor Analysis, and Content Analysis
Backend Layer (app.py)
• Connection to the utilities package and its modules:
• lighthouse.py (Performance analysis)
• compare_pages.py (Competitor analysis)
• lightHTMLsum.py (Content analysis)
External Services Layer
• Google Gemini AI API
• Brightdata Scraping Browser
• Brightdata Web Unlocker
• Brightdata SERP API
Data Flow Layer
• Data transformation and processing steps
• [User Interface Layer]
• ↓
• [Application Layer]
• ↓
• [Utilities Layer]
• ↓
• [External Services Layer]
Component Relationships
• How app.py orchestrates the utilities
• Demonstrate how external APIs are accessed through the utility modules
• Data flow between components
Specific Flows
• URL/keyword input → app.py → appropriate utility module
• Lighthouse analysis flow through lighthouse.py
• Competitor analysis flow through compare_pages.py
• Content analysis flow through lightHTMLsum.py
• Results aggregation and presentation back to frontend
Technical Details
• Python 3.12+ runtime environment
• Streamlit framework
• API authentication flow
• Environment configuration (.env)