Summary
Replace the in-memory `IndexerStore` with a persistent storage backend (PostgreSQL) for production deployments.
Context
The current `IndexerStore` (`src/indexer/store.ts`) uses in-memory `Map`/`Set` collections with FIFO eviction (added in the hardening PR #22). This is fine for development but loses all indexed data on restart. A production indexer needs persistent storage.
Scope
Design considerations
- The store interface is already well-defined — `putRepo`, `putStar`, `putFollow`, `getRepo`, `search`, etc.
- Full-text search (`search()` method) maps naturally to PostgreSQL `tsvector`/`tsquery`
- Trending calculation can use SQL window functions
- Connection pooling for the crawl loop + API server
Summary
Replace the in-memory `IndexerStore` with a persistent storage backend (PostgreSQL) for production deployments.
Context
The current `IndexerStore` (`src/indexer/store.ts`) uses in-memory `Map`/`Set` collections with FIFO eviction (added in the hardening PR #22). This is fine for development but loses all indexed data on restart. A production indexer needs persistent storage.
Scope
Design considerations