Skip to content

Webshop component for Foodsoft: web-based software to manage a non-profit food coop.

License

Notifications You must be signed in to change notification settings

foodcoops/foodsoft-shop

Repository files navigation

Foodsoft Webshop

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).

screenshot

Getting started

Though this software is not fully finished, you could try running it if you're interested.

  1. 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
  2. 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.
  1. 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
  2. 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 set window.foodsoftUrl to the url (incl. foodcoop scope).

  3. Start the app

    $ yarn start

    and open http://localhost:8080/

Notes

  • If you want to skip the (initial) OAuth dance, you can set window.foodsoftAccessToken directly.

License

GPL version 3 or later, please see LICENSE for the full text.

Thanks to Icons8 for letting us use their icons.

About

Webshop component for Foodsoft: web-based software to manage a non-profit food coop.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages