Developer's Eye
A search engine for developer content that owns the whole pipeline: a polite crawler, a document store, a PostgreSQL full-text index and a FastAPI search API, with a GitHub-authenticated admin console to watch it run.
- Role
- Sole engineer
- Year
- 2026
- Type
- Systems, Backend, Data
Developer's eye
Sole engineer / 2026
- Stack
- Python
- FastAPI
- PostgreSQL
- SQLAlchemy
- Alembic
- HTTPX
- Next.js
- TypeScript
- Flow
- Discover
- Crawl
- Parse
- Process
- Persist
- Index
- Search
- Decisions
- A lease-based crawl frontierWorkers claim due URLs with leases, run fetch, policy, parse, process and write for each target, and finalize in a lease-checked transaction.
- Politeness and safety before every fetchEach fetch passes a host allowlist, DNS and IP checks that block private ranges, cached robots.txt rules, per-host delays and concurrency limits, and redirect checks, all run in order by one policy coordinator.
- Two search vectors per documentThe indexer writes separate PostgreSQL tsvectors for prose (english) and code (simple), GIN indexed, and searches both with websearch_to_tsquery ranked by ts_rank_cd.
- Strict package boundariesThe backend owns the schema and migrations and never imports the crawler; a test enforces it.
- Numbers
- Crawl → Index → SearchPipeline
- PostgreSQL full-textIndex
- 4 sharing one databaseProcesses
developers-eye.vercel.app
Open
Crawl → Index → Search
Pipeline
PostgreSQL full-text
Index
4 sharing one database
Processes
Problem
Developer answers are scattered across docs, issues, Q&A and articles, and general-purpose search engines are not built around how developers look for them. I wanted to understand what a search engine actually is by building one end to end instead of calling one.
Approach
Four processes share one PostgreSQL database: a crawler that fills a leased URL frontier and stores extracted documents, an indexer that keeps weighted text and code search vectors fresh, a FastAPI backend that serves search and read-only reports, and a Next.js frontend with a public search page and an admin console.
The core journey
- 01Discover
- 02Crawl
- 03Parse
- 04Process
- 05Persist
- 06Index
- 07Search
A lease-based crawl frontier
Workers claim due URLs with leases, run fetch, policy, parse, process and write for each target, and finalize in a lease-checked transaction. Expired leases are recovered, and network I/O stays outside the claim and finalization transactions so a retry does not refetch.
Politeness and safety before every fetch
Each fetch passes a host allowlist, DNS and IP checks that block private ranges, cached robots.txt rules, per-host delays and concurrency limits, and redirect checks, all run in order by one policy coordinator.
Two search vectors per document
The indexer writes separate PostgreSQL tsvectors for prose (english) and code (simple), GIN indexed, and searches both with websearch_to_tsquery ranked by ts_rank_cd. A versioned content hash lets it skip unchanged documents and rebuild everything when the analyzer changes.
Strict package boundaries
The backend owns the schema and migrations and never imports the crawler; a test enforces it. The admin console signs in with GitHub OAuth and PKCE, and Next.js server routes forward to the backend with a service key the browser never sees.
Outcome
The crawler, document store, indexer, search API and admin console work end to end locally. The public site is a prototype that serves labeled demo results; BM25 ranking, caching and deployment of the full pipeline are next.
What it taught me
- Write the incident down: search latency problems became recorded incidents, experiments and decision records instead of guesses.