Fuses trend velocity, news freshness, and SEO opportunity into one ranked
feed of content ideas, each carrying an evidence trail ("here's why this is worth
writing about"). See pulse_product_spec.md for the full vision.
This repo is the Phase 0 / Phase 1 foundation: a compiling, end-to-end Rust workspace behind a Tauri 2.x shell with a SvelteKit feed view.
pulse/
├── crates/
│ ├── pulse-core/ # domain types: Topic, TrendSignal, KeywordEvidence, ContentIdea
│ ├── pulse-ingest/ # TrendSource trait + adapters (Google Trends/News later)
│ ├── pulse-seo/ # KeywordDataSource trait (Phase 2 evidence layer)
│ ├── pulse-scoring/ # deterministic opportunity-scoring engine
│ ├── pulse-storage/ # Storage trait + in-memory impl (Postgres/DuckDB later)
│ └── pulse-service/ # transport-agnostic orchestration
├── src-tauri/ # Tauri 2.x shell
└── frontend/ # SvelteKit: ranked feed + evidence drill-down
| Pillar | State |
|---|---|
| 2.1 Trend ingestion | live Google Trends RSS — google (reqwest) or scraprs (scraprs HttpFetcher) feature; synthetic source for offline/dev |
| 2.2 News correlation | live — articles bundled in the Trends RSS, persisted per topic |
| 2.3 SEO evidence | live free-signal source (autocomplete + PAA + SERP competition) via the scraprs feed |
| 2.4 Opportunity scoring | implemented + tested; seo_opportunity now refined with live SERP competition (untuned weights) |
| Storage | in-memory (default) + Postgres via dbkit-rs (postgres feature); DuckDB reads deferred |
By default the app uses a synthetic, offline trend source (deterministic, great for dev). Enable a real-ingestion feature to pull live trending topics from Google's public trending-searches RSS — which bundles correlated news per trend, so one fetch yields both the trend and its news hook:
--features google— plainreqwest.--features scraprs— routed throughscraprs's standaloneHttpFetcher(the sibling scraping framework; takes precedence overgoogle).
bun run tauri dev -- --features scraprs (or swap bun with npm)
# combine with persistence: --features scraprs,postgresEach launch/refresh polls the feed once; velocity & staleness build up across refreshes.
The scraprs feature also turns on the Phase 2 SEO layer: each new topic is
enriched (once) with free keyword signals — Google autocomplete, PAA-style
questions (via question-modifier autocomplete), and a competition score from how
many top DuckDuckGo results sit on high-authority domains. That competition score
feeds the seo_opportunity term, so low-saturation topics rank up. (Enrichment
hits a handful of endpoints per topic — keep refreshes occasional; spec §11.5.)
Deeper signals (interest-over-time from the explore API, real Google SERP) are
the next upgrade, via scraprs's AutoFetcher + antibot behind the same traits.
-
In-memory (default) — zero infrastructure; the whole pipeline runs out of the box.
-
Postgres via
dbkit-rs— the §6 schema (hash-tracked migration), behind the sameStoragetrait. Enable with thepostgresfeature and pointDATABASE_URLat a database:DATABASE_URL=postgres://$(whoami)@localhost:5432/pulse \ bun run tauri dev -- --features postgres (or swap bun with npm) # or: cargo run -p pulse-app --features postgres
When
DATABASE_URLis unset (or connection fails), the app falls back to in-memory. DuckDB analytical reads (spec §6) are a future enhancement on the same backend —dbkit-rsexposeswith_duckdb()+ Arrow for it.To run the Postgres integration test against a throwaway database:
# Include an explicit user — dbkit-rs 0.5 (sqlx) defaults a bare URL's role to # "anonymous" (unlike psql, which uses your OS user). PULSE_TEST_DATABASE_URL=postgres://$(whoami)@localhost:5432/pulse_test \ cargo test -p pulse-storage --features postgres
- Storage defaults to in-memory so the skeleton runs with zero infrastructure, matching the spec's "validate the scoring mechanism cheaply first" philosophy (§2.7, §11.2). The Postgres backend (above) drops in behind the same trait.
- Ingestion sources are stubs that emit synthetic signals, so the full
ingest → score → feed pipeline runs today. The real
scraprs-backed Google Trends / News adapters (spec §2.1, §9) slot in behindTrendSource. - Async traits use
async-traitso sources/storage stay dyn-compatible (Box<dyn TrendSource>), matching the pluggable-source pattern in spec §8.
# Rust core: build + test (no infrastructure needed)
cargo test
# Run the headless end-to-end demo (ingest → score → ranked feed)
cargo run -p pulse-service --example demobun install (or npm) # root: installs the Tauri CLI
bun install --prefix frontend (or npm) # frontend deps (SvelteKit + @tauri-apps/api)
bun run tauri dev (or npm) # builds the frontend, compiles the shell, opens the windowbun run tauri dev runs from the repo root. The first launch seeds a short
synthetic trend history so the feed isn't empty; hit ↻ Refresh in the app to
run another ingest + rescore cycle.
Note — building on an exFAT volume. This repo lives on an exFAT drive, which can't store macOS extended attributes or hard-link — which breaks Tauri's build script (it chokes on the
._*AppleDouble files macOS scatters). So build artifacts go to a shared APFS disk image instead:./targetis a git-ignored symlink to/Volumes/Build/pulse. Runmount-buildonce per login session (it's on your PATH; idempotent), then build any project as usual. Unmount everything withhdiutil detach /Volumes/Build. If a Tauri build ever fails with "stream did not contain valid UTF-8", the target isn't on the image — check thatmount-buildran.