Skip to content

An automation tool for stress-free online shopping experiences.

Notifications You must be signed in to change notification settings

thiagosanches/bp

Repository files navigation

BuyPal

Tests

Experience stress-free online shopping with our automation tool. Simply connect your Android device to the USB port, and let BuyPal take care of everything else!

Tip

I initially used a playwright approach, which was functional but had the drawback of sessions expiring too quickly and requiring excessive maintenance. Therefore, I switched to using ADB to control a real Android device, and this method has proven to be much more reliable for my needs.

Overview

BuyPal automates online purchases to reduce anxiety and decision fatigue. It handles the entire checkout process for you, from product selection to payment confirmation.

alt text

Why BuyPal?

  • Eliminates repetitive checking and verification steps
  • Reduces decision paralysis during checkout
  • Creates a predictable, consistent shopping experience
  • Streamlines the purchase process from start to finish

Tip

You simply need to know where to tap on the screen to navigate through the necessary steps for each shopping application. In the developer settings, you can enable the display of the X and Y coordinates to identify the appropriate clicking locations. Make sure to note these coordinates and incorporate them into your code.

Web Interface

BuyPal includes a user-friendly web interface that allows you to:

  1. Create a list of products you're considering
  2. Let BuyPal randomly select one item from your list after a set timer
  3. Automatically complete the purchase process

To access the web interface, simply navigate to http://localhost:3000 after starting the server.

Supported Platforms

  • AliExpress (NEEDS UPDATE)
  • MercadoLivre

Quick Start (Local Development)

Prerequisites: Node.js (v22+)

# Clone and setup
git clone https://github.com/thiagosanches/buypal.git
cd buypal

# Install dependencies
npm install
cp .env.example .env  # Configure with your credentials

# Start the server
npm start

# Make a purchase
curl http://localhost:3000/buy/[domain]/[encoded-product-url]

Docker Setup

# Build docker image
docker build -t buypal .

# Let's clean up (if needed)
docker stop buypal 2>/dev/null || true
docker rm buypal 2>/dev/null || true

# Run the docker container with USB access
# root is required for ADB to access USB devices
# Maybe we can put some non-root user in the future
# with group permissions configured properly
docker run -d \
  --privileged \
  -v /dev/bus/usb:/dev/bus/usb \
  --env-file .env \
  --user root \
  -p 3000:3000 \
  --restart unless-stopped \
  --name buypal \
  buypal

# Perform the first ADB device check and accept it on your Android device!!!
docker exec buypal adb devices

# Now you can access the web interface at http://localhost:3000

Security & Privacy

All sensitive information is stored locally in your .env file and never shared externally.

Contributing

Contributions to improve the tool or add support for more platforms are welcome! Please submit PRs or open issues with suggestions.

License

MIT License

About

An automation tool for stress-free online shopping experiences.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published