An application for saving you money. Find items online and save it to BFrugal. Get notified when a price drop occurs.
This application uses Nokogiri to parse websites for product data and can be scheduled to run updates. When a price has dropped for a product users will receive an email with the product link.
NOTE: BFrugal supports a finite number of sites check ./lib/modules/url_helper.rb for list of sites
Make sure you have Ruby, Rails, Bundler and Node.js installed.
Create an .env file in the root directory
DEVISE_JWT_SECRET_KEY=<YOUR_OWN_SECRET_KEY>
# [OPTIONAL]
# (For usage with ./config/environments/production.rb)
GMAIL_USERNAME=<YOUR_GMAIL_ADDRESS>
GMAIL_PASSWORD=<YOUR_GMAIL_PASSWORD>
Tip: you can run rake secret to get a key for <YOUR_OWN_SECRET_KEY>
- Install server dependencies
bundle install(Note: Make sure to have the same version of Ruby and Rails as the project) - Install client dependencies
cd client && npm install(Note: remember to return to root after installation has finishedcd..) - Start PostgresSQL server (Mac: Postgres.app, Windows: EDBPostgres)
- Run migrations
rake db:create db:migrate db:seed - Run the application
bin/rake start
Install server dependencies for Heroku in the root directory npm install
Make sure you have Heroku Toolbelt installed and are logged in
heroku create <name_of_application>
heroku buildpacks:add heroku/nodejs --index 1
heroku buildpacks:add heroku/ruby --index 2
git push heroku master
heroku run rake db:migrate db:seed- Login to Heroku and open up your your app (
<name_of_application>) - Go to settings and under
Config Varsadd:
DEVISE_JWT_SECRET_KEY=<YOUR_OWN_SECRET_KEY>
GMAIL_USERNAME=<YOUR_GMAIL_ADDRESS>
GMAIL_PASSWORD=<YOUR_GMAIL_PASSWORD>
Tip: you can run rake secret to get a key for <YOUR_OWN_SECRET_KEY>
- Add Heroku Scheduler to your application
- Open up your app in the Heroku and go to the
Resourcestab - Click on
Heroku Scheduleradd on - Click on
Add new joband addrake scrape:update_itemswith your desired schedule and save
heroku open
- Open up https://localhost:3000 or your Heroku App
- Register for an account and Login
- Find a product from a web that is supported by this application and copy the url link (check
./lib/modules/url_helper.rbfor supported sites) - Paste the URL link into the form input
- Run
rake scrape:update_itemstask to update data or user Heroku Scheduler to run the task everyday/hour/etc...
- Frontend: ReactJS, Redux
- Backend: Ruby 2.5.1, Rails 5.2.2
- Database: PostgresSQL 10
