Track sales on your favorite items, all in one place!
Online shoppers often come across products they want but prefer to wait for a sale before purchasing. This project was built to centralize and track those "wait-for-a-sale" items in one place. Users can register products, set a target price, and receive a notification when the item's price drops below their specified threshold — helping them buy at the right time without constantly checking for deals.
After a user has registered, they have the ability to create 'product reminders' in the home page. Here, one can enter a URL for the product and set a target price to receive a notification. Our service then fetches the price from the provided URL and uses that information to populate the entry in the home page. Then, on regular intervals, Timely Buyer will check the current price of the item. If the current price has dropped below the user-specified target price, a notification is sent to the user's email!
Head over to: https://timely.tier-zero.co.uk/
- Register with any (even fake) email.
- Note: When you add a product reminder we scrape Amazon.com for it's price. It's not 100 % reliable, sorry for that! In case we fail to scrape, we won't add item to the list.
- Hosted on Google Cloud Platform.
- SSL by Let's Encrypt.
To quickly setup the application locally, follow these steps. Alternatively, if you are looking to set the project up for development, see the Development Steps section.
-
Install modern docker (or docker-compose) on your machine.
-
Clone the repository:
git clone https://github.com/the-vindex/auto-order.git
-
Navigate to the project directory:
cd auto-order -
Copy over test.env.example to test.env:
cp test.env.example test.env
-
Set up JWT Secret, used for creating JWTs:
-
echo JWT_TOKEN=your_secret_key > jwt.secret
-
(OPTIONAL) Set Up Resend Account To receive email notifications in development, a resend api key is needed. Go to resend.com, create an account, and get an API key. Use this api key in your .env file, as RESEND_API_KEY. Ensure the email you use when tseting this app is the same one you use to create your resend account.
-
Start the application using script below.
./start-stop.sh --test
If you use Rootless Docker, you will need this - drop a file to allow user binding ports below 1024:
sudo echo 'net.ipv4.ip_unprivileged_port_start = 80' > /etc/sysctl.d/99-unprivileged-ports.conf sudo sysctl --system
-
Open your browser at https://localhost
- Navigate to the backend directory:
- Navigate to the backend directory:
cd auto-order/backend - Create a
.envfile from the example. This file will hold your local environment variables, including the database URL and JWT secret.cp .env.example .env # Edit .env with your local database connection string and JWT_SECRET - Start the database with docker compose:
docker compose up -d- Install backend dependencies:
npm install
- Puppeteer needs some additional setup, namely installing the Chromium browser. This can be done by running:
You will also need to follow https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md.
npx puppeteer install
- Applies to Ubuntu 23+, best case you have Chrome installed through apt and end up adding following line to .bashrc:
export CHROME_DEVEL_SANDBOX=/usr/lib/chromium-browser/chrome-sandbox - Start the backend in development mode:
The backend will run on
npm run dev
http://localhost:3000(or the port specified in your.env).
- Navigate to the React frontend directory:
cd auto-order/react - Install frontend dependencies:
npm install
- Start the frontend development server:
The frontend will typically run on
npm run dev
http://localhost:5173.
- To start both FE and BE for development, use dev.sh script:
This will start both the backend and frontend servers concurrently, plus postgres in the background.
./dev.sh
- Backend: Node.js, Express.js
- Frontend: React
- Database: PostgreSQL
- Containerization: Docker