shivam@portfolio:~$ cat README.md
shivam@portfolio:~$ cat notes.md
One binary, three services
external sources: cvelistV5 · NVD · CISA KEV · EPSS · Exploit-DB · Metasploit · Nuclei · feeds
│ scheduled HTTPS pulls
┌─────────────────────────────▼──────────────────────────────┐
│ backend (Go, single binary) │
│ intelligence · news · endpoint scanner (services) │
│ store · config · scheduler · job queue · HTTP (core) │
└───────────────▲─────────────────────────────┬──────────────┘
│ JSON │ SQL (pgx)
React + Vite frontend Postgres: source of truth
(nginx, proxies /api) + full-text search
Pahredar is a modular monolith: each product service owns its domain over a shared core. One deployable, because a single operator and $0 hosting rule out microservices, but clear seams so services grow independently. Cross-service reads go through named interfaces — the scanner asks intelligence "which CVEs affect this technology?" without touching its internals.
A sync engine you can trust
- Idempotent: every job is an upsert, so re-running a job or replaying a window is safe.
- Cursor-based: incremental jobs only advance their cursor after a successful commit.
- Never concurrent with itself: a Postgres advisory lock guards each source.
- Failures are isolated: a failing source doesn't block the others; it is retried with exponential backoff.
- Bulk loads use
COPYinto a staging table, then oneINSERT … ON CONFLICT DO UPDATE. - No clobbering: CVE writes are serialised and every writer derives the row from both the CVE List and NVD records, so neither job can overwrite the other's contribution with stale data.
The first start streams the ~615 MB CVE List archive without writing it all to disk, pulls NVD four pages at a time inside its rate limit, and the database ends up around 4.5 GB.

Built with
Go (standard library HTTP, pgx, goose migrations embedded in the binary), Postgres 17 with tsvector full-text search and pg_trgm, React + Vite + TypeScript with TanStack Query, Tailwind and Recharts, all run with Docker Compose.