Skip to content

aloglu/centsible

Repository files navigation

Centsible

Centsible is a self-hosted price tracking application that monitors product prices across multiple websites. It provides data visualization, historical tracking, and automated alerts via Discord or Telegram.

Features

  • Price Extraction: Automated price retrieval using Cheerio for static pages and Puppeteer Stealth for dynamic content.
  • Price History: Interactive charts showing price trends over time.
  • Alert System:
    • Target price notifications.
    • General price drop alerts.
    • Out of stock alerts.
    • 24-hour percentage drop tracking.
    • All-time low detection.
  • Notifications: Support for Discord Webhooks and Telegram Bot API.
  • System Activity: Unified operational view with Action Queue, Diagnostics Log, and User Activity Log.
  • Purchased Archive: Mark items as purchased, remove them from active tracking, and restore later if needed.
  • Extractor Lab: Tool for testing and configuring custom CSS selectors for specific sites.
  • Currency Support: Automatic detection and conversion between major currencies (USD, EUR, GBP, TRY, JPY, etc.) using live rates.
  • Data Management: JSON and CSV export/import, plus automated local backups.
  • Command Palette: Keyboard-accessible (Ctrl/Cmd+K) interface for rapid navigation.
  • Deployment: Includes Docker and Docker Compose configuration.

Technical Stack

  • Frontend: HTML5, Vanilla JavaScript, CSS.
  • Backend: Node.js, Express.
  • Scraping: Puppeteer, Cheerio, Axios.
  • Storage: Local JSON files.

Installation

Docker (Recommended)

  1. Clone the repository.
  2. cp .env.example .env and configure variables.
  3. Run docker-compose up -d.
  4. Access the UI at http://localhost:3000.

Manual Setup

  1. Clone the repository.
  2. Navigate to server directory and run npm install.
  3. Create a .env file in the root based on .env.example.
  4. Run npm start.

Configuration

The following environment variables can be set in the .env file:

Variable Description Default
PORT Server port 3000
DISCORD_WEBHOOK Discord Webhook URL for alerts -
DISCORD_PROXY_BASE Optional proxy base for Discord webhooks -
TELEGRAM_BOT_TOKEN Telegram Bot API token -
TELEGRAM_CHAT_ID Telegram Chat ID -
DATA_DIR Optional runtime data directory. If unset, Centsible stores runtime state in ./data/. The provided Docker Compose file sets this to /app/data. ./data
ALLOWED_ORIGINS CORS allowed origins (comma-separated). Leave empty to allow all origins. empty
FETCH_ALLOWED_HOSTS Whitelisted hostnames for tracking -

Unraid / LAN CORS setup

If the UI is opened from another host (for example http://192.168.1.50:3000), set ALLOWED_ORIGINS to that exact origin (or origins), separated by commas.

Examples:

  • ALLOWED_ORIGINS=http://192.168.1.50:3000
  • ALLOWED_ORIGINS=http://192.168.1.50:3000,http://localhost:3000

Custom Selectors

If the automated extractor fails on a specific site, use the Extractor Lab to provide a custom CSS selector. Once verified, the application will use that selector for future checks of that item.

Backup and Portability

Runtime state is stored in local JSON files under the runtime data directory:

  • prices.json (tracked items + history)
  • settings.json (lists, alert rules, interval, notification settings)
  • diagnostics.json
  • audit.json

Scheduled backups are saved to the backups/ directory under that same data root.

By default, manual runs also use ./data/. For Docker deployments, those files live under ./data/ on the host because Docker mounts that directory into /app/data.

Current backup format is a full-state snapshot containing:

  • items
  • settings
  • diagnostics
  • audit

In-app import and restore support only encrypted full-state backups created after a backup password is configured.

License

Released under the MIT License.

About

Centsible is a self-hosted price tracking application that monitors product prices across multiple websites

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors