$ show towfiqi/serpbear
SerpBear is a search engine position tracking and keyword research application built with Next.js (React) and TypeScript. It allows users to monitor keyword rankings for their domains in Google, integrate with Google Search Console for actual performance data, and leverage Google Ads for keyword ideas. The application features a modular architecture with separate frontend UI, backend API routes (`/pages/api/`), background scraping jobs via cron, and a SQLite database managed by Sequelize ORM. Key functionalities include SERP scraping through multiple third-party services, position history tracking, email notifications for ranking changes, insight analytics, and configurable settings for API keys and scraper selection. The system is containerized with Docker and supports PWA deployment for mobile access.
The LLM identified 4 files worth highlighting for reuse:
Implements a strategy pattern for SERP scraping, enabling interchangeable use of different scraping services (ScrapingAnt, SerpApi, etc.). The core logic defines a scraper interface and delegates to service-specific implementations, making it highly reusable for any search result scraping task with minimal adaptation.
A pure function that processes domain keyword data to generate insights such as top countries, top pages, and position distributions. It has no external dependencies, operates on plain JavaScript objects, and can be extracted for use in any data aggregation or analytics pipeline.
A reusable SVG icon component that dynamically loads and displays icons based on name and size props. It encapsulates icon management through a simple API, is framework-agnostic within React ecosystems, and demonstrates a clean pattern for maintaining icon libraries without external dependencies.
Verifies user identity from a JWT token stored in cookies, returning the user payload or throwing an error. This backend-agnostic utility isolates authentication logic, requires only the secret key, and can be integrated into any Node.js application for secure route protection.