Commit graph

8 commits

Author SHA1 Message Date
fd907c40cb
Add credo with --strict mode and fix all issues 2026-03-12 13:35:12 -05:00
77ff082ebb
Switch to self-scheduling scrapes with longer intervals
Replace cron-based scheduling (every 4h) with self-scheduling jobs
that randomly pick 7-12 hours between runs. Also increase the
inter-request delay from 5-15 minutes to 10-20 minutes.
2026-03-12 13:26:46 -05:00
0171ef1570
Separate 5.56x45 NATO and .223 Remington into distinct calibers
Previously combined as a single "556-223" caliber. Now tracked separately
with dedicated scraper URLs per retailer. Also fixes broken URLs for
Lucky Gunner, True Shot Ammo, and Palmetto State Armory.
2026-03-12 12:27:59 -05:00
0340fc85be
Increase scrape delay to 5-15 minutes between requests 2026-03-12 10:06:43 -05:00
9eb85faebd
Add 4 new retailer scrapers for broader price coverage
Add True Shot Ammo (Shopify JSON), Palmetto State Armory (Magento HTML),
Bulk Ammo (Magento HTML), and Natchez Shooters Supply (GraphQL API).

Extends scraper infrastructure with HttpClient.post_json/3 and an
optional fetch/2 callback on the Scraper behaviour for scrapers that
need custom HTTP flows (e.g. GraphQL POST requests).
2026-03-12 10:00:59 -05:00
0583bd14cf
Add 16 gauge shotgun caliber 2026-03-12 09:04:00 -05:00
16a28ac01c
Add Target Sports USA scraper, product filtering, and subsonic detection
- Add subsonic boolean field to products with composite filter indexes
- Add TextDetector utility for detecting subsonic/casing from product titles
- Wire TextDetector into SgAmmo (casing + subsonic) and LuckyGunner (subsonic + fallback casing)
- Extend latest_prices_for_caliber with casing, grain_weight, and subsonic filter options
- Add distinct_grain_weights_for_caliber and distinct_casings_for_caliber queries
- Add filter UI with toggleable casing, grain weight, and subsonic buttons
- Add grain weight column and subsonic badge to product table
- Refresh filter options on PubSub price updates for real-time UI
- Implement Target Sports USA scraper with 18 caliber mappings
- Display all prices in dollar format ($0.38 instead of 38¢)
2026-03-11 16:28:04 -05:00
bbe5bde145
Initial implementation of ammo price tracker
Phoenix 1.8 app that scrapes ammunition retailers (Lucky Gunner,
SGAmmo) for price data and displays historical price trends.

- Data model: retailers, calibers, products, price snapshots
- Scraper infrastructure with Req, Floki, realistic browser headers
- Oban-scheduled scrape jobs (every 4h with randomized delays)
- LiveView pages: homepage with category cards, caliber detail with
  price table, Chart.js price history, and price stats banner
- 18 seeded calibers across handgun/rifle/rimfire/shotgun categories
- 77 tests
2026-03-11 15:58:12 -05:00