Skip to content

PeerPush deals daily via @profullstack/scraper-daemon (1.10.0) - #100

Merged
sh1pt-actions-fleet[bot] merged 1 commit into
masterfrom
feat/peerpush-deals
Nov 2, 2026
Merged

sh1pt-actions-fleet[bot] merged 1 commit into
masterfrom
feat/peerpush-deals

Conversation

@sh1pt-actions-fleet

Copy link
Copy Markdown
Contributor

Adds peerpush.com/deals as a c0upons source, scheduled daily by the house scraper daemon.

  • lib/peerpush-sync.ts: decodes the page's RSC payload (codes are not in the JSON-LD), reads /deals plus ?type=big|ending|free, upserts source='peerpush' coupons per product, prunes expired. Founder text wins over PeerPush's computed discountPercent ("$20 OFF" arrives as 25%); App Store redeem links give the code= param.
  • lib/daemon.ts: @profullstack/scraper-daemon 0.3.0 on BullMQ, REDIS_URL = c0upons' own compose redis (dev2-site "redis": true). Redis down stops and rebuilds the daemon, never exits the web process.
  • GET /api/v1/daemon, POST /api/sync/peerpush (1 h throttle), CLI sync + MCP sync_peerpush, /docs.
  • Fix: parseDiscount read "100% off" as 0%.

Verified: bun test test 91 pass, tsc, next build; built app against a scratch DB + scratch Redis and live peerpush.com: BullMQ engine, 127 deals inserted in 17 s, next run +24 h.

🤖 Generated with Claude Code

peerpush.com/deals lists the discount codes software founders attach to
their PeerPush listings, in full. The codes ride in the page's RSC payload
(not the JSON-LD), so lib/peerpush-sync.ts decodes the __next_f chunks,
brace-matches each product object and maps the ones with a deal to
coupons (source 'peerpush', source_id = product id). It reads the default
view plus type=big|ending|free (~127 deals on 2026-11-02 vs 50 on the
default view) and prunes rows past their valid-until date.

Scheduling is the house scraper daemon (lib/daemon.ts): BullMQ on
c0upons' own Redis (REDIS_URL), a daily `peerpush` job, run as a role of
the web process. A Redis outage stops and rebuilds the daemon instead of
exiting the web server. GET /api/v1/daemon serves its status; POST
/api/sync/peerpush runs it by hand (1 h throttle); both CLIs' sync and
MCP sync_peerpush call it.

Also: parseDiscount read "100% off" as 0% (two-digit regex), which hit
Reddit rows too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​profullstack/​scraper-daemon@​0.3.07710010094100
Addedioredis@​6.0.09410010091100
Addedbullmq@​6.5.39310010096100

View full report

storeId = await upsertStore(db, row.store);
storeIds.set(row.store.slug, storeId);
}
const existing = await db.sql`SELECT id FROM coupons WHERE source = ${SOURCE} AND source_id = ${row.source_id} LIMIT 1`;
WHERE source = ${SOURCE} AND expiry_date IS NOT NULL AND expiry_date <> '' AND expiry_date < ${today}
AND id NOT IN (SELECT coupon_id FROM bounties WHERE coupon_id IS NOT NULL)
`;
for (const r of expired) await db.sql`DELETE FROM coupons WHERE id = ${r.id}`;
const r2 = await syncPeerpushDeals(db, { baseUrl: BASE, fetchText, now: () => new Date('2026-11-03T12:00:00Z') });
assert.equal(r2.inserted, 0);
assert.equal(r2.updated, 4);
const [k] = await db.sql`SELECT code, title FROM coupons WHERE source = 'peerpush' AND source_id = ${ID(1)}`;
@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Priority Alert  (click "▶" to expand/collapse) Action
Low priority
Low adoption: npm @profullstack/scraper-daemon

Location: Package overview

From: apps/web/package.json → npm/@profullstack/scraper-daemon@0.3.0

ℹ Read more on: This package | This alert | What are unpopular packages?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Unpopular packages may have less maintenance and contain other problems.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@profullstack/scraper-daemon@0.3.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn

View full report

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

ThreatCrush Security Scan

40 finding(s)

MEDIUM: 33 | LOW: 7

Severity Rule Location
MEDIUM sql-template-interpolation apps/web/app/api/bounties/[id]/claim/route.ts:18
MEDIUM sql-template-interpolation apps/web/app/api/bounties/[id]/claim/route.ts:34
MEDIUM sql-template-interpolation apps/web/app/api/bounties/[id]/claim/route.ts:43
MEDIUM sql-template-interpolation apps/web/app/api/bounties/route.ts:95
MEDIUM sql-template-interpolation apps/web/app/api/coupons/route.ts:68
MEDIUM sql-template-interpolation apps/web/app/api/coupons/route.ts:75
MEDIUM sql-template-interpolation apps/web/app/api/coupons/vote/route.ts:31
MEDIUM sql-template-interpolation apps/web/app/api/coupons/vote/route.ts:33
MEDIUM sql-template-interpolation apps/web/app/api/stores/[slug]/route.ts:9
MEDIUM sql-template-interpolation apps/web/app/api/webhooks/crawlproof/route.ts:83
MEDIUM sql-template-interpolation apps/web/app/api/webhooks/crawlproof/route.ts:90
MEDIUM js-open-redirect apps/web/app/bounties/new/page.tsx:61
MEDIUM js-unescaped-html-sink apps/web/app/coupons/[id]/page.tsx:57
MEDIUM js-unescaped-html-sink apps/web/app/layout.tsx:88
MEDIUM sql-template-interpolation apps/web/app/stores/[slug]/page.tsx:16
MEDIUM sql-template-interpolation apps/web/lib/bbs-post.ts:164
MEDIUM sql-template-interpolation apps/web/lib/flipp-sync.ts:445
MEDIUM sql-template-interpolation apps/web/lib/inbound-email.ts:573
MEDIUM sql-template-interpolation apps/web/lib/inbound-email.ts:643
MEDIUM sql-template-interpolation apps/web/lib/mcp-tools.ts:81
MEDIUM sql-template-interpolation apps/web/lib/members.ts:54
MEDIUM sql-template-interpolation apps/web/lib/nichedb-sync.ts:186
MEDIUM sql-template-interpolation apps/web/lib/nichedb-sync.ts:206
MEDIUM sql-template-interpolation apps/web/lib/peerpush-sync.ts:338
MEDIUM sql-template-interpolation apps/web/lib/peerpush-sync.ts:353
MEDIUM sql-template-interpolation apps/web/lib/reddit-sync.ts:336
MEDIUM sql-template-interpolation apps/web/lib/reddit-sync.ts:355
MEDIUM sql-template-interpolation apps/web/lib/reddit-sync.ts:361
MEDIUM sql-template-interpolation apps/web/lib/reveal-coupon.ts:115
MEDIUM sql-template-interpolation apps/web/lib/reveal-coupon.ts:170
MEDIUM sh-predictable-temp-path apps/web/public/install.sh:37
MEDIUM sh-predictable-temp-path apps/web/public/install.sh:39
MEDIUM sql-template-interpolation apps/web/scripts/migrate.mjs:192
LOW sql-template-interpolation test/bbs-post.test.mjs:129
LOW sql-template-interpolation test/bbs-post.test.mjs:143
LOW sql-template-interpolation test/bbs-post.test.mjs:164
LOW sql-template-interpolation test/inbound-email.test.mjs:139
LOW sql-template-interpolation test/peerpush-sync.test.mjs:183
LOW sql-template-interpolation test/reveal-sweep.test.mjs:69
LOW sql-template-interpolation test/reveal-sweep.test.mjs:112

Snippets are redacted; ThreatCrush never prints matched credential material.

@sh1pt-actions-fleet
sh1pt-actions-fleet Bot merged commit 31a6cbe into master Nov 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants