Skip to content
OsanchezPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

459 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AmmoTrack — Self-Hosted Ammunition Price Tracker

AmmoTrack is a full-stack, self-hosted ammunition price tracking platform inspired by AmmoSeek. It scrapes ammo retailer websites, stores historical prices in a TimescaleDB time-series database, serves a Vue.js dashboard with price charts, and sends Discord alerts when prices hit your threshold.

Stack

Component Technology
Web scraper crawl4ai + asyncio
LLM extraction Ollama (self-hosted GPU) or OpenRouter (cloud, free tier)
Database PostgreSQL + TimescaleDB
Backend API Django + Django REST Framework
Frontend Vue.js 3 + Tailwind CSS + ApexCharts
Discord bot discord.py (existing PewPewBoyzBot extended)
Orchestration Docker Compose

Quick Start

1. Configure environment

cp .env.example .env
# Edit .env — set DISCORD_TOKEN, DB_PASSWORD, DJANGO_SECRET_KEY, API_SECRET_KEY

2. Start the stack

Full local stack with self-hosted DB + GPU Ollama:

docker compose --profile local-db --profile gpu up -d

Local DB + OpenRouter LLM (no GPU required):

# Set LLM_PROVIDER=openrouter and OPENROUTER_API_KEY in .env first
docker compose --profile local-db up -d

External DB + OpenRouter:

# Set DB_HOST to your external DB in .env, LLM_PROVIDER=openrouter
docker compose up -d

3. Create your admin user

docker compose exec backend python manage.py createsuperuser

4. Pull an Ollama model (if using GPU profile)

docker compose exec ollama ollama pull llama3.2:3b

5. Access the app

Service URL
Web dashboard http://localhost
Django admin (direct) http://localhost:8001/admin
crawl4ai dashboard http://localhost:11235/dashboard

Adding a New Site to Scrape

  1. Log in as Admin → Sites in the nav
  2. Click + Add Site, enter the URL and scrape interval
  3. Leave CSS Schema blank to use LLM extraction (works immediately)
  4. Click ▶ Trigger Scrape Now to test it
  5. Once working, inspect the page with DevTools and add a CSS schema for faster, free scraping

Discord Commands

Command Description
/ammo prices <caliber> Show current cheapest prices
/ammo track <caliber> [max_cpr] [manufacturer] Create a price drop alert
/ammo alerts List your active alerts
/ammo untrack <id> Delete an alert

Project Structure

PewPewBoyzBot/
├── main.py              # Discord bot entrypoint
├── cogs/                # Discord cogs (existing + ammo_alerts.py)
├── utils/               # Existing bot utilities
├── backend/             # Django API
│   ├── apps/ammo/       # Models: Site, Product, Listing, PricePoint
│   ├── apps/alerts/     # Alert model + check endpoint
│   └── apps/accounts/   # User auth (login, user management)
├── scraper/             # Standalone scraper service
│   ├── main.py          # Async poll loop
│   ├── pipeline.py      # crawl4ai → LLM → DB
│   ├── llm_client.py    # Ollama/OpenRouter adapter
│   └── site_configs/    # Example CSS schemas
└── frontend/            # Vue.js dashboard
    └── src/
        ├── views/       # BrowseView, ProductDetail, Analytics, Alerts
        └── views/admin/ # Sites, ScrapeLogs, Users

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages