Polls Reddit JSON feeds for free/cheap comics and collectibles. No Reddit account or API key needed — uses Reddit's public JSON endpoint. Scores posts by keyword and location, saves to Postgres, and fires Discord webhook alerts.
This project uses npm workspaces for monorepo management. A single install command handles everything:
npm installCreate a .env file in the project root:
DATABASE_URL=your_neon_postgres_connection_string
DISCORD_WEBHOOK_URL=your_discord_webhook_url
Database: The app uses Neon (cloud Postgres) in development and AWS RDS in production. Run npx prisma db push after setting DATABASE_URL to create the schema.
Discord webhook:
- Open any Discord channel
- Channel Settings → Integrations → Webhooks → New Webhook
- Copy the URL
For development (recommended):
# Single command runs API server + dashboard + Reddit poller
npm run dev:manualIndividual processes:
# Reddit poller (saves alerts to database)
npm start
# API server only (port 3001)
npm run server
# Dashboard only (port 5173)
npm run dashboardVerify the API is up:
curl http://localhost:3001/api/healthProduction build:
npm run buildThe Express server exposes three endpoints:
| Method | Path | Description |
|---|---|---|
| GET | /api/health |
Liveness check |
| GET | /api/alerts |
Paginated alert list with filters |
| GET | /api/alerts/:id |
Single alert by id |
GET /api/alerts query params:
| Param | Default | Description |
|---|---|---|
page |
1 | Page number |
limit |
20 | Results per page (max 100) |
minScore |
0 | Minimum score filter |
localOnly |
false | "true" to show only local posts |
subreddit |
— | Filter by subreddit name |
since |
— | ISO timestamp — only alerts newer than this (for live polling) |
Edit SCORE_THRESHOLD in lib/config.ts:
| Threshold | What you get |
|---|---|
5 |
Everything — very noisy |
10 |
Good starting point |
15 |
Only strong matches |
20+ |
Quiet — only clear wins |
To add content keywords, edit the KEYWORDS array in lib/keywords.ts:
["your keyword", pointValue],To add location keywords (South/Central NJ area), edit LOCATION_KEYWORDS in lib/config.ts.
tmux (simplest):
tmux new -s comics
npm start
# Ctrl+B then D to detach
tmux new -s api
npm run server
# Ctrl+B then D to detachPM2 (recommended):
npm install -g pm2
pm2 start reddit-poller.ts --name comic-hunter-poller
pm2 start api-server.ts --name comic-hunter-api
pm2 save
pm2 startupUsing Turborepo for production:
# Build optimized assets
npm run build
# Deploy built dashboard to S3/CloudFront
# Run API server on EC2/ECS- AWS Cognito auth — per-user settings and seen state
- eBay flip value — price lookup on local posts once API key arrives
- Facebook Marketplace — Playwright scraper, geo-targeted listings
- Buy Nothing — Facebook Buy Nothing group scraper (same session as Marketplace)