How towfiqi/serpbear works
SerpBear is a web app for tracking keyword rankings and researching search demand. Users add domains and keywords, configure a SERP scraping provider, and view tracked rankings; optional branches provide Google Ads research and Search Console performance data, with notifications documented as a product capability. The graph preserves these major workflows, but most API handlers and background-job internals were not sampled, so uncertain runtime links are omitted or marked unverified.
Main entry points: [slug]/index.tsx Search Console view · database.ts SQLite database · cron.js Scheduled jobs · domains/index.tsx Domain pages
Components 20
Web app
- Domain pages
pages/domains/index.tsx - Tracked keywords
pages/domain/[slug]/index.tsx - Search Console view
pages/domain/console/[slug]/index.tsx - Settings panel
components/settings/Settings.tsx
Rank tracking
- Domain services
services/domains.tsx - Keyword services
services/keywords.tsx - Domain API
pages/api/domains.ts - Keyword API
pages/api/keywords.ts - SERP providers
scrapers/index.ts - Ranking refresh
utils/scraper.ts - Scheduled jobs
cron.js
Research and insights
- Keyword research page
pages/research/index.tsx - Keyword ideas
components/ideas/KeywordIdeasTable.tsx - Google Ads integration
services/adwords.tsx - Search Console integration
utils/searchConsole.ts - Search insights
utils/insight.ts
Data and integrations
- Domain and keyword models
database/models/keyword.ts - SQLite database
database/database.ts - Email notifications
utils/generateEmail.ts
Other components
- User
Connections 19
- User → Domain pages: manages domains
README.md - User → Tracked keywords: tracks keywords
README.md - Domain pages → Domain services: fetches domains
pages/domains/index.tsx - Domain services → Domain API: requests domains
services/domains.tsx - Tracked keywords → Keyword services: loads keywords
pages/domain/[slug]/index.tsx - Keyword services → Keyword API: requests keywords
services/keywords.tsx - Keyword API → SQLite database: reads and writes
- Domain API → SQLite database: reads and writes
- SQLite database → Domain and keyword models: registers models
database/database.ts - Scheduled jobs → Ranking refresh: refreshes rankings
- Ranking refresh → SERP providers: scrapes results
- User → Keyword research page: researches keywords
README.md - Keyword research page → Keyword ideas: renders ideas
pages/research/index.tsx - Keyword ideas → Google Ads integration: loads ideas
components/ideas/KeywordIdeasTable.tsx - User → Search Console view: views performance
README.md - Search Console view → Search Console integration: loads console data
- Search Console view → Search insights: views insights
- User → Settings panel: configures app
README.md - Scheduled jobs → Email notifications: sends updates