A simple private app for Shopify (embedded) using the Shopify API, Ruby on Rails and a database of your choice. The app will list orders that are placed that contain products with the word “narwhal” in them. That’s it.
Merchants can install the app from your application (even though it won't be listed on the app store). They shouldn’t need anything but a Shopify Account and Shopify Store to sign up. After a merchant installs the app they should be able to log into the app again from their Shopify dashboard. After the app is installed, the app should monitor for new orders.
When a new order is received it should check to see if there are any products in the order that contain the word “Narwhal”. If there are, then it should add a record in the DB or somewhere. We’ll call these “Narwhal Orders”.
When a merchant accesses the app through their admin, the app should show a responsive list of Narwhal Orders.
- Ruby 2.6.5
- Rails >= 6
- Postgres DB
- Redis DB
- Sidekiq
- Ensure Postgres is running properly
- Start Redis Server:
$ redis-server
- Copy and Update Environment Variable:
cp .env.sample .env
- Start Sidekiq Worker:
$ sidekiq -C config/sidekiq.yml
- Install Dependencies:
$ bundle install
- Create and Setup Database:
$ rails db:setup
- Migrate DB:
$ rails db:migrate
- Start Application Server
$ rails serve
- To test with ngrok, start a tunnel with:
$ ngrok http 3000
- Access App on
http//:localhost:3000
or via ngrok on generated URL
$ rspec
$ rubocop
- Install Docker
- Run
$ docker-compose up --build
$ docker-compose run -e "RAILS_ENV=test" narwhals_app rspec -f d
- Sidekiq - For Background Job
- Redis - For Job Persistence
- Rspec - For Writing and running tests
- Rubocop - For Linting
- Add and Commit to Git
$ git am 'deploy: deploying to heroku'
$ git push heroku master