This is an EXPERIMENTAL webshop component for Foodsoft.
Based on React and redux-saga, it may replace the existing rails-based webshop component at some point.
It functions together with Foodsoft API (v1), which is part of Foodsoft v4.7.2 / v4.8 or later (as of yet unreleased).
The hope is that this brings foodcoop-adam/foodsoft#163's Revamped member ordering pages to the main Foodsoft repository in a clean way.
As soon as app.foodcoops.net gets Foodsoft v4.8, you'll be able to try out this demo (login with admin
/ secret
).
Though this software is not fully finished, you could try running it if you're interested.
-
Install the latest Foodsoft for development. For full instructions, see the instructions, but if you already have MySQL and Ruby on Rails running, this may be enough:
$ git clone https://github.com/foodcoops/foodsoft $ cd foodsoft $ bundle install $ rake foodsoft:setup-development $ bundle exec rails s
-
Obtain an application secret.
- Log into Foodsoft as an admin
- Go to Administration > Configuration > Apps (right of screen)
- Press the button New Application
- Fill in any name, and put
http://localhost:8080/
in Redirect URI, then Submit. - Click the application name, and take note of the Application Id, this is the OAuth client id.
-
Install this app. You'll need node.js, since this is a Javascript application, and yarn for installing dependencies:
$ git clone https://github.com/foodcoops/foodsoft-shop.git $ cd foodsoft-shop $ yarn install
-
Create the file
local.js
in the foodsoft-shop directory with contents:window.foodsoftClientId = '1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef';
Replace
12345...
with the OAuth client id you obtained before. And if you happen to run Foodsoft on a different port or url, you can setwindow.foodsoftUrl
to the url (incl. foodcoop scope). -
Start the app
$ yarn start
and open http://localhost:8080/
- If you want to skip the (initial) OAuth dance, you can set
window.foodsoftAccessToken
directly.
GPL version 3 or later, please see LICENSE for the full text.
Thanks to Icons8 for letting us use their icons.